Для Spring-boot и угловой интеграции, Как настроить npm, узел в maven? - PullRequest
0 голосов
/ 10 октября 2018

Я пытаюсь разработать приложение типа this .Но когда я пытаюсь настроить Maven для угловых не удалось добиться успеха.Я перешел по Link 1 Link2 и некоторым другим ссылкам, но не смог создать.Если есть обходной путь, пожалуйста, дайте мне знать.

pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <artifactId>Angular_Spring</artifactId>
        <groupId>Angular_Spring</groupId>
        <version>0.0.1-SNAPSHOT</version>
    </parent>

<groupId>com.myapp.angular.test</groupId>
<artifactId>app-angular</artifactId>
<version>1</version>
<packaging>jar</packaging>

<name>React.js Blank Project (from https://github.com/making/maven-reactjs-blank)</name>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <npm.executable>npm</npm.executable>
</properties>

<build>
    <plugins>
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>1.5.0</version>
            <executions>
                <!-- <execution> <id>exec-npm</id> <phase>process-resources</phase> 
                    <configuration> <executable>${npm.executable}</executable> <arguments> <argument>install</argument> 
                    </arguments> </configuration> <goals> <goal>exec</goal> </goals> </execution> -->
                <execution>
                    <id>exec-npm-update</id>
                    <phase>generate-sources</phase>
                    <configuration>
                        <workingDirectory>${uiResourcesDir}</workingDirectory>
                        <executable>npm.cmd</executable>
                        <arguments>
                            <argument>update</argument>
                        </arguments>
                    </configuration>
                    <goals>
                        <goal>exec</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <!-- <plugin> <groupId>com.github.eirslett</groupId> <artifactId>frontend-maven-plugin</artifactId> 
            <version>1.3</version> <configuration> <nodeVersion>v8.11.3</nodeVersion> 
            <npmVersion>6.3.0</npmVersion> <workingDirectory>src/main/web/</workingDirectory> 
            </configuration> <executions> <execution> <id>install node and npm</id> <goals> 
            <goal>install-node-and-npm</goal> </goals> </execution> <execution> <id>npm 
            install</id> <goals> <goal>npm</goal> </goals> </execution> <execution> <id>npm 
            run build</id> <goals> <goal>npm</goal> </goals> <configuration> <arguments>run 
            build</arguments> </configuration> </execution> <execution> <id>prod</id> 
            <goals> <goal>npm</goal> </goals> <configuration> <arguments>run-script build</arguments> 
            </configuration> <phase>generate-resources</phase> </execution> </executions> 
            </plugin> -->


        <!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> 
            <version>1.8</version> <executions> <execution> <id>gulp</id> <phase>generate-resources</phase> 
            <goals> <goal>run</goal> </goals> <configuration> <target> <echo message="Gulp!" 
            /> <exec executable="gulp"> <arg value="build" /> </exec> </target> </configuration> 
            </execution> </executions> </plugin> <plugin> <artifactId>maven-resources-plugin</artifactId> 
            <executions> <execution> <id>copy-resources</id> <phase>generate-resources</phase> 
            <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>${basedir}/target/classes/META-INF/resources</outputDirectory> 
            <resources> <resource> <directory>dest</directory> <filtering>false</filtering> 
            </resource> </resources> </configuration> </execution> </executions> </plugin> -->
    </plugins>
</build>
<profiles>
    <profile>
        <id>platform-windows</id>
        <activation>
            <os>
                <family>windows</family>
            </os>
        </activation>
        <properties>
            <!-- Override the executable names for Windows -->
            <npm.executable>npm.cmd</npm.executable>
            <grunt.executable>grunt.cmd</grunt.executable>
            <bower.executable>bower.cmd</bower.executable>
        </properties>
    </profile>
</profiles>

Узел установленной директории

enter image description here

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...