我正在尝试覆盖maven的deploy插件,并在我的一些项目中得到以下错误,但在其他项目中却没有:
Execution default-deploy of goal org.apache.maven.plugins:maven-deploy-plugin:2.6:deploy failed: Cannot add two different pieces of metadata for:
这是我的插件定义:
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<executions>
<execution>
<id>default-deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
<configuration>
<pomFile>target/modified-pom-replacePomPlaceholder/modified-pom/pom.xml</pomFile>
</configuration>
</execution>
</executions>
</plugin>我也尝试了同样的效果:
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<pomFile>target/modified-pom-replacePomPlaceholder/modified-pom/pom.xml</pomFile>
</configuration>
</plugin>你知道为什么它有时会失败吗?
发布于 2014-12-08 23:20:41
不要重写'default-deploy‘。停用它并编写您自己的代码:
<execution>
<id>default-deploy</id>
<phase>none</phase>
</execution>
<execution>
<id>my-deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
...
</execution>https://stackoverflow.com/questions/12897888
复制相似问题