我正在尝试覆盖 maven 的部署插件,并在我的一些项目中出现以下错误,但在其他项目中却没有:
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>
知道为什么有时会失败吗?