Maven部署文件目标:为什么第一次执行会干扰第二次执行?

时间:2016-11-03 13:21:53

标签: java maven

如果我在maven-deploy-plugin中调用两个部署文件执行

<plugin>
      <artifactId>maven-deploy-plugin</artifactId>
      <executions>

        <execution>
          <id>deploy-ejb-impl</id>
          <goals>
            <goal>deploy-file</goal>
          </goals>
          <phase>deploy</phase>
          <configuration>
            <file>${implJarFile}</file>
            <pomFile>${implPomFile}</pomFile>
            <url>${project.distributionManagementArtifactRepository.url}</url>
            <repositoryId>${project.distributionManagementArtifactRepository.id}</repositoryId>
            <javadoc>${project.build.directory}/${project.build.finalName}-hund.jar</javadoc>
          </configuration>
        </execution>
        <execution>
          <id>default-deploy</id>
          <phase>none</phase>
        </execution>
        <execution>
          <id>deploy-ejb-client</id>
          <goals>
            <goal>deploy-file</goal>
          </goals>
          <phase>deploy</phase>
          <configuration>
            <file>${clientJarFile}</file>
            <pomFile>${clientPomFile}</pomFile>
            <url>${project.distributionManagementArtifactRepository.url}</url>
            <repositoryId>${project.distributionManagementArtifactRepository.id}</repositoryId>
            <sources>${project.build.directory}/${project.build.finalName}-hund.jar</sources>
          </configuration>
        </execution>
      </executions>

然后在第二次执行中执行第一次执行的javadoc上传(查找basis-vs-bo-20.0.2-20161103.130940-25-javadoc.jar):

[INFO] 
[INFO] --- maven-deploy-plugin:2.8.2:deploy-file (deploy-ejb-impl) @ basis-vs-bo ---
[INFO] Downloading: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo/20.0.2-SNAPSHOT/maven-metadata.xml
[INFO] Downloaded: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo/20.0.2-SNAPSHOT/maven-metadata.xml (1001 B at 15.5 KB/sec)
[INFO] Uploading: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo/20.0.2-SNAPSHOT/basis-vs-bo-20.0.2-20161103.130940-25.jar
[INFO] Uploaded: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo/20.0.2-SNAPSHOT/basis-vs-bo-20.0.2-20161103.130940-25.jar (160 KB at 3386.2 KB/sec)
[INFO] Uploading: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo/20.0.2-SNAPSHOT/basis-vs-bo-20.0.2-20161103.130940-25.pom
[INFO] Uploaded: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo/20.0.2-SNAPSHOT/basis-vs-bo-20.0.2-20161103.130940-25.pom (5 KB at 282.4 KB/sec)
[INFO] Downloading: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo/maven-metadata.xml
[INFO] Downloaded: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo/maven-metadata.xml (372 B at 11.7 KB/sec)
[INFO] Uploading: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo/20.0.2-SNAPSHOT/maven-metadata.xml
[INFO] Uploaded: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo/20.0.2-SNAPSHOT/maven-metadata.xml (1001 B at 65.2 KB/sec)
[INFO] Uploading: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo/maven-metadata.xml
[INFO] Uploaded: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo/maven-metadata.xml (372 B at 24.2 KB/sec)
[INFO] Uploading: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo/20.0.2-SNAPSHOT/basis-vs-bo-20.0.2-20161103.130940-25-javadoc.jar
[INFO] Uploaded: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo/20.0.2-SNAPSHOT/basis-vs-bo-20.0.2-20161103.130940-25-javadoc.jar (77 KB at 5117.8 KB/sec)
[INFO] Uploading: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo/20.0.2-SNAPSHOT/maven-metadata.xml
[INFO] Uploaded: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo/20.0.2-SNAPSHOT/maven-metadata.xml (2 KB at 74.3 KB/sec)
[INFO] 
[INFO] --- maven-deploy-plugin:2.8.2:deploy-file (deploy-ejb-client) @ basis-vs-bo ---
[INFO] Downloading: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo-client/20.0.2-SNAPSHOT/maven-metadata.xml
[INFO] Downloaded: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo-client/20.0.2-SNAPSHOT/maven-metadata.xml (1008 B at 30.8 KB/sec)
[INFO] Uploading: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo-client/20.0.2-SNAPSHOT/basis-vs-bo-client-20.0.2-20161103.130941-14.jar
[INFO] Uploaded: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo-client/20.0.2-SNAPSHOT/basis-vs-bo-client-20.0.2-20161103.130941-14.jar (24 KB at 1451.9 KB/sec)
[INFO] Uploading: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo-client/20.0.2-SNAPSHOT/basis-vs-bo-client-20.0.2-20161103.130941-14.pom
[INFO] Uploaded: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo-client/20.0.2-SNAPSHOT/basis-vs-bo-client-20.0.2-20161103.130941-14.pom (4 KB at 201.1 KB/sec)
[INFO] Downloading: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo-client/maven-metadata.xml
[INFO] Downloaded: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo-client/maven-metadata.xml (379 B at 11.9 KB/sec)
[INFO] Uploading: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo-client/20.0.2-SNAPSHOT/maven-metadata.xml
[INFO] Uploaded: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo-client/20.0.2-SNAPSHOT/maven-metadata.xml (1008 B at 65.6 KB/sec)
[INFO] Uploading: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo-client/maven-metadata.xml
[INFO] Uploaded: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo-client/maven-metadata.xml (379 B at 24.7 KB/sec)
[INFO] Downloading: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo/20.0.2-SNAPSHOT/maven-metadata.xml
[INFO] Downloaded: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo/20.0.2-SNAPSHOT/maven-metadata.xml (2 KB at 37.1 KB/sec)
[INFO] Uploading: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo/20.0.2-SNAPSHOT/basis-vs-bo-20.0.2-20161103.130940-25-javadoc.jar
[INFO] Uploaded: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo/20.0.2-SNAPSHOT/basis-vs-bo-20.0.2-20161103.130940-25-javadoc.jar (77 KB at 5117.8 KB/sec)
[INFO] Downloading: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo/maven-metadata.xml
[INFO] Downloaded: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo/maven-metadata.xml (372 B at 11.7 KB/sec)
[INFO] Uploading: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo/20.0.2-SNAPSHOT/maven-metadata.xml
[INFO] Uploaded: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo/20.0.2-SNAPSHOT/maven-metadata.xml (2 KB at 79.2 KB/sec)
[INFO] Uploading: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo/maven-metadata.xml
[INFO] Uploaded: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo/maven-metadata.xml (372 B at 24.2 KB/sec)
[INFO] Uploading: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo-client/20.0.2-SNAPSHOT/basis-vs-bo-client-20.0.2-20161103.130941-14-sources.jar
[INFO] Uploaded: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo-client/20.0.2-SNAPSHOT/basis-vs-bo-client-20.0.2-20161103.130941-14-sources.jar (77 KB at 4797.9 KB/sec)
[INFO] Uploading: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo-client/20.0.2-SNAPSHOT/maven-metadata.xml
[INFO] Uploaded: http://ik-repo1:8084/nexus/content/repositories/consnapshots/de/continentale/vs/basis-vs-bo-client/20.0.2-SNAPSHOT/maven-metadata.xml (1008 B at 61.5 KB/sec)
[INFO] ------------------------------------------------------------------------

为什么参数javadoc会导致第二次执行再次上传同一个文件?

1 个答案:

答案 0 :(得分:1)

正如Tunaki在评论中所说,部署插件的3.0.0-SNAPSHOT版本更正了错误。