【发布时间】:2017-11-03 12:19:05
【问题描述】:
我使用 maven 将 Angular 应用程序与 java 结合起来。 pom的一部分是这样的
<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 包运行良好,项目在 war 文件中编译,但 eclipse 说 pom 不正确。使用标签 pluginManagement 的解决方案不匹配,因为它不会被执行命令。 如何解决eclipse的问题?
【问题讨论】:
-
- 插件管理在我的情况下没有解决,因为当你使用它时,命令不会被执行,我阅读了这篇文章并尝试了一些解决方案。您具体推荐什么解决方案? -
Eclipse 不知道如何将 exec-maven-plugin 转换为 Eclipse 构建操作。链接的解决方案正在谈论告诉 Eclipse 忽略它,并指出其他可能可用或不可用的可能性,具体取决于您的 Eclipse 版本
标签: maven eclipse-plugin