我正在使用exec-maven-plugin
运行我的Maven构建,以将我的reactjs项目构建到我的jar文件中,但是它执行得很好,但是当我进入我的jar文件时,没有任何reactjs文件存在-只有我的存在Java类。
我的pom.xml如下所示:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>exec-npm-install</id>
<phase>generate-sources</phase>
<configuration>
<workingDirectory>${project.basedir}src\main\app</workingDirectory>
<executable>npm.cmd</executable>
<arguments>
<argument>install</argument>
</arguments>
</configuration>
<goals>
<goal>exec</goal>
</goals>
</execution>
<execution>
<id>exec npm build</id>
<phase>generate-sources</phase>
<configuration>
<workingDirectory>${project.basedir}/src/main/app</workingDirectory>
<executable>npm.cmd</executable>
<arguments>
<argument>run-script</argument>
<argument>build</argument>
</arguments>
</configuration>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
</plugin>