【发布时间】:2016-02-23 22:21:13
【问题描述】:
我正在尝试使用以下命令从 POM 文件构建项目:
mvn clean install
但我不断收到此错误:
生命周期配置未涵盖插件执行:org.apache.maven.plugins:maven-antrun-plugin:1.3:run (execution: build, phase: compile)
Eclipse 的应用商店中似乎没有 Ant 插件。我该如何解决这个问题?
这是我的 pom.xml 文件的插件部分:
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>build</id>
<phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<!-- Use exec instead of ant as src/ant/.ant.properties needs to be read in -->
<exec executable="ant" osfamily="unix" dir="${basedir}/src" failonerror="true">
<arg line="jar" />
</exec>
<exec executable="cmd" osfamily="windows" dir="${basedir}/src" failonerror="true">
<arg value="/c" />
<arg value="ant.bat" />
<arg line="jar" />
</exec>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
【问题讨论】:
-
它们相似但不相同,并且似乎没有解决该问题的方法。也许我应该重命名这个问题
-
没有解决办法。如果 M2E 没有合适的连接器,那么唯一的解决方案是有一个
pluginManagement部分,如链接问题中所述。 -
啊我现在看到了,但是添加
pluginManagement标签只会使错误消失,它似乎仍然没有下载 maven ant 插件
标签: java eclipse maven ant maven-antrun-plugin