0
我使用maven将角度应用程序与java结合在一起。 POM的部分看起来像这样如何解决生命周期配置中未包含的插件执行:org.codehaus.mojo:exec-maven-plugin:1.5.0:exec?
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.5.0</version>
<executions>
<execution>
<id>exec-npm-install</id>
<phase>generate-sources</phase>
<configuration>
<workingDirectory>${project.basedir}/src/main/angular-app</workingDirectory>
<executable>npm.cmd</executable>
<arguments>
<argument>install</argument>
</arguments>
</configuration>
<goals>
<goal>exec</goal>
</goals>
</execution>
<execution>
<id>exec-npm-ng-build</id>
<phase>generate-sources</phase>
<configuration>
<workingDirectory>${project.basedir}/src/main/angular-app</workingDirectory>
<executable>ng.cmd</executable>
<arguments>
<argument>build</argument>
<argument>--base-href=/testangularmaven/src/main/webapp/angular_build/</argument>
</arguments>
</configuration>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
</plugin>
MVN包装运作良好,并计划在战争文件编译的,但是Eclipse说,POM是不正确的。解决方案使用标签pluginManagement不匹配,因为它不会执行命令。 如何解决eclipse的问题?
参见https://stackoverflow.com/questions/6352208/how-to-solve-plugin-execution-not-covered-by-lifecycle-configuration-for-sprin – Tome
Eclipse不知道如何将exec-maven-plugin转换为Eclipse构建操作。链接的解决方案正在讨论告诉Eclipse忽略它,并指出其他可能可用或不可用的其他可能性,具体取决于您的Eclipse版本 – Tome