【发布时间】:2016-11-07 11:42:28
【问题描述】:
我有一个 pom,它可以获取一些 zip,解压缩并部署其中的 5 个工件(jar + pom)。
它看起来像:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<executions>
<execution>
<id>default-deploy</id>
<phase>none</phase>
</execution>
<execution>
<id>deploy-api-jar</id>
<phase>deploy</phase>
<goals>
<goal>deploy-file</goal>
</goals>
<configuration>
<file>target/xxx.jar</file>
<pomFile>target/xxx/pom.xml</pomFile>
<sources>target/xxx-sources.jar</sources>
<repositoryId>${nexus-repository-id}</repositoryId>
<url>http://${nexus.deploy.server}/${nexus-repository-path}</url>
</configuration>
</execution>
所以我对 5 个不同的工件执行了 5 次。
它适用于第一个工件,但由于它尝试再次上传它而失败:
[INFO] Uploading: http://www.zzz.com:8081/nexus/content/repositories/mobile-r/xxx/server/deployall/8.1.17/deployall-8.1.17-dependencies.dot
由于depedencies.dot 8.1.17 已经部署,它会因400 BadRequest 而失败。
为什么它会尝试在每个工件之间上传depedencies.dot?我可以禁用它吗?
【问题讨论】:
-
这些文件是由 maven 构建自己构建的,还是那些文件以其他方式创建的文件?
标签: maven deployment maven-deploy-plugin