|
|
|
@ -51,45 +51,88 @@
|
|
|
|
|
</configuration>
|
|
|
|
|
</plugin>
|
|
|
|
|
<plugin>
|
|
|
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
|
|
|
<artifactId>exec-maven-plugin</artifactId>
|
|
|
|
|
<version>1.5.0</version>
|
|
|
|
|
<groupId>com.github.eirslett</groupId>
|
|
|
|
|
<artifactId>frontend-maven-plugin</artifactId>
|
|
|
|
|
<version>${frontend.mave.version}</version>
|
|
|
|
|
<configuration>
|
|
|
|
|
<workingDirectory>${npm.working.dir}</workingDirectory>
|
|
|
|
|
<!-- where to install npm -->
|
|
|
|
|
<installDirectory>${npm.install.dir}</installDirectory>
|
|
|
|
|
</configuration>
|
|
|
|
|
<executions>
|
|
|
|
|
<execution>
|
|
|
|
|
<id>npm install (initialize)</id>
|
|
|
|
|
<id>install node and npm</id>
|
|
|
|
|
<goals>
|
|
|
|
|
<goal>install-node-and-npm</goal>
|
|
|
|
|
</goals>
|
|
|
|
|
<phase>generate-resources</phase>
|
|
|
|
|
<configuration>
|
|
|
|
|
<nodeVersion>${node.version}</nodeVersion>
|
|
|
|
|
<npmVersion>${npm.version}</npmVersion>
|
|
|
|
|
</configuration>
|
|
|
|
|
</execution>
|
|
|
|
|
<execution>
|
|
|
|
|
<id>npm install</id>
|
|
|
|
|
<goals>
|
|
|
|
|
<goal>exec</goal>
|
|
|
|
|
<goal>npm</goal>
|
|
|
|
|
</goals>
|
|
|
|
|
<phase>initialize</phase>
|
|
|
|
|
<!-- Optional configuration which provides for running any npm command -->
|
|
|
|
|
<configuration>
|
|
|
|
|
<workingDirectory>react-app</workingDirectory>
|
|
|
|
|
<executable>${npm.executable}</executable>
|
|
|
|
|
<arguments>
|
|
|
|
|
<argument>install</argument>
|
|
|
|
|
<argument>--silent</argument>
|
|
|
|
|
</arguments>
|
|
|
|
|
<arguments>install</arguments>
|
|
|
|
|
</configuration>
|
|
|
|
|
</execution>
|
|
|
|
|
<execution>
|
|
|
|
|
<id>npm run build (compile)</id>
|
|
|
|
|
<id>prod</id>
|
|
|
|
|
<goals>
|
|
|
|
|
<goal>exec</goal>
|
|
|
|
|
<goal>npm</goal>
|
|
|
|
|
</goals>
|
|
|
|
|
<phase>compile</phase>
|
|
|
|
|
<configuration>
|
|
|
|
|
<workingDirectory>react-app</workingDirectory>
|
|
|
|
|
<executable>${npm.executable}</executable>
|
|
|
|
|
<arguments>
|
|
|
|
|
<argument>run</argument>
|
|
|
|
|
<argument>${npm.build.command}</argument>
|
|
|
|
|
</arguments>
|
|
|
|
|
<arguments>run-script ${npm.build.command}</arguments>
|
|
|
|
|
</configuration>
|
|
|
|
|
<phase>generate-resources</phase>
|
|
|
|
|
</execution>
|
|
|
|
|
</executions>
|
|
|
|
|
<configuration>
|
|
|
|
|
<workingDirectory>${npm.working.dir}</workingDirectory>
|
|
|
|
|
</configuration>
|
|
|
|
|
</plugin>
|
|
|
|
|
<!-- <plugin>-->
|
|
|
|
|
<!-- <groupId>org.codehaus.mojo</groupId>-->
|
|
|
|
|
<!-- <artifactId>exec-maven-plugin</artifactId>-->
|
|
|
|
|
<!-- <version>1.5.0</version>-->
|
|
|
|
|
<!-- <executions>-->
|
|
|
|
|
<!-- <execution>-->
|
|
|
|
|
<!-- <id>npm install (initialize)</id>-->
|
|
|
|
|
<!-- <goals>-->
|
|
|
|
|
<!-- <goal>exec</goal>-->
|
|
|
|
|
<!-- </goals>-->
|
|
|
|
|
<!-- <phase>initialize</phase>-->
|
|
|
|
|
<!-- <configuration>-->
|
|
|
|
|
<!-- <workingDirectory>react-app</workingDirectory>-->
|
|
|
|
|
<!-- <executable>${npm.executable}</executable>-->
|
|
|
|
|
<!-- <arguments>-->
|
|
|
|
|
<!-- <argument>install</argument>-->
|
|
|
|
|
<!-- <argument>--silent</argument>-->
|
|
|
|
|
<!-- </arguments>-->
|
|
|
|
|
<!-- </configuration>-->
|
|
|
|
|
<!-- </execution>-->
|
|
|
|
|
<!-- <execution>-->
|
|
|
|
|
<!-- <id>npm run build (compile)</id>-->
|
|
|
|
|
<!-- <goals>-->
|
|
|
|
|
<!-- <goal>exec</goal>-->
|
|
|
|
|
<!-- </goals>-->
|
|
|
|
|
<!-- <phase>compile</phase>-->
|
|
|
|
|
<!-- <configuration>-->
|
|
|
|
|
<!-- <workingDirectory>react-app</workingDirectory>-->
|
|
|
|
|
<!-- <executable>${npm.executable}</executable>-->
|
|
|
|
|
<!-- <arguments>-->
|
|
|
|
|
<!-- <argument>run</argument>-->
|
|
|
|
|
<!-- <argument>${npm.build.command}</argument>-->
|
|
|
|
|
<!-- </arguments>-->
|
|
|
|
|
<!-- </configuration>-->
|
|
|
|
|
<!-- </execution>-->
|
|
|
|
|
<!-- </executions>-->
|
|
|
|
|
<!-- <configuration>-->
|
|
|
|
|
<!-- <workingDirectory>${npm.working.dir}</workingDirectory>-->
|
|
|
|
|
<!-- </configuration>-->
|
|
|
|
|
<!-- </plugin>-->
|
|
|
|
|
</plugins>
|
|
|
|
|
</build>
|
|
|
|
|
<profiles>
|
|
|
|
@ -111,6 +154,7 @@
|
|
|
|
|
<npm.executable>npm</npm.executable>
|
|
|
|
|
<npm.build.command>build_prod</npm.build.command>
|
|
|
|
|
<npm.working.dir>./react-app</npm.working.dir>
|
|
|
|
|
<npm.install.dir>./react-app/tmp</npm.install.dir>
|
|
|
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
|
|
|
<npm.output.directory>react-app</npm.output.directory>
|
|
|
|
|
</properties>
|
|
|
|
|