我有一個pom,它可以獲得一些zip,解壓並部署裏面的5個工件(jar + pom)。maven在單個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
它失敗,因爲400 BadRequest
depedencies.dot 8.1.17已經部署。
爲什麼它會嘗試上傳每個構件之間的depedencies.dot?我可以禁用它嗎?
這些文件是由maven build自己構建還是由那些文件創建的文件? – khmarbaise
也許相關:http://stackoverflow.com/questions/40402597/maven-deploy-file-goal-why-does-the-first-execution-interfere-with-the-second-o –