SBT客户端无法找到部署在私有Maven仓库上的快照

时间:2016-04-21 16:38:56

标签: maven deployment sbt

简而言之:

我在私有Maven仓库上将库作为快照部署。如果我检查了repo的内容,我找到了名为 artifact-id-xxxx.142230-1 的库。但是,如果我尝试下载库,SBT客户端会尝试获取文件 artifact-id-xxxx.142243-2 ,当然,它无法找到它。

详细说明:

我试图下载最近部署在私有Maven仓库上的库,但我收到此消息:

[error] (*:update) sbt.ResolveException: unresolved dependency: com.company.group-id#artifact-id;1.0.0-SNAPSHOT: not found

调试器说SBT正在尝试获取此文件:

http://maven.company.com/snapshot/com/company/group-id/actifact-id/1.0.0-SNAPSHOT/actifact-id-1.0.0-20160420.142243-2.pom

如果我检查Maven回购中部署的最近文件,我发现只有 142230-1 这样的文件:

artifact-id-1.0.0-20160420.142230-1.pom

如果我查看maven-metadata.xml文件,我发现mvn部署了文件 xxxx.142230-1 ,但在元数据文件中,说文件使用 xxxx.142243 -2

<?xml version="1.0" encoding="UTF-8"?>
<metadata modelVersion="1.1.0">
  <groupId>com.company.group-id</groupId>
  <artifactId>artifact-id</artifactId>
  <version>1.0.0-SNAPSHOT</version>
  <versioning>
    <snapshot>
      <timestamp>20160420.142243</timestamp>
      <buildNumber>2</buildNumber>
    </snapshot>
    <lastUpdated>20160420142243</lastUpdated>
    <snapshotVersions>
      <snapshotVersion>
        <extension>jar</extension>
        <value>1.0.0-20160420.142230-1</value>
        <updated>20160420142243</updated>
      </snapshotVersion>
      <snapshotVersion>
        <extension>pom</extension>
        <value>1.0.0-20160420.142230-1</value>
        <updated>20160420142243</updated>
      </snapshotVersion>
      <snapshotVersion>
        <classifier>tests</classifier>
        <extension>jar</extension>
        <value>1.0.0-20160420.142230-1</value>
        <updated>20160420142243</updated>
      </snapshotVersion>
    </snapshotVersions>
  </versioning>
</metadata>

这是用于部署的pom.xml文件的一部分:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.company.group-id</groupId>
  <artifactId>artifact-id</artifactId>
  <packaging>jar</packaging>
  <name>artifact-id</name>
  <version>1.0.0-SNAPSHOT</version>

  <prerequisites>
    <maven>3.3.9</maven>
  </prerequisites>

 <distributionManagement>
    <snapshotRepository>
      <id>maven.company.com</id>
      <url>s3://maven.company.com/snapshot</url>
    </snapshotRepository>
    <repository>
      <id>maven.company.com</id>
      <url>s3://maven.company.com/release</url>
    </repository>
  </distributionManagement>
  <repositories>
    <repository>
      <id>maven.company.com</id>
      <url>s3://maven.company.com/release</url>
    </repository>
  </repositories>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.19.1</version>
        <configuration>
          <systemProperties>
            <property>
              <name>loggerPath</name>
              <value>conf/log4j.properties</value>
            </property>
          </systemProperties>
          <argLine>-Xms512m -Xmx1500m</argLine>
          <parallel>methods</parallel>
          <forkMode>pertest</forkMode>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/lib</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <!-- attach test jar -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.6</version>
        <executions>
          <execution>
            <goals>
              <goal>jar</goal>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.10</version>
        <executions>
          <execution>
            <id>add_sources</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>src/main/java</source>
              </sources>
            </configuration>
          </execution>
          <execution>
            <id>add_test_sources</id>
            <phase>generate-test-sources</phase>
            <goals>
              <goal>add-test-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>src/test/java</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.5.1</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
    <plugin>
      <!-- explicitly define maven-deploy-plugin after other to force exec order -->
        <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-deploy-plugin</artifactId>
        <version>2.8.2</version>
      <executions>
        <execution>
          <id>deploy</id>
          <phase>deploy</phase>
          <goals><goal>deploy</goal></goals>
        </execution>
      </executions>
    </plugin>
    </plugins>
    <extensions>
      <extension>
        <groupId>org.kuali.maven.wagons</groupId>
        <artifactId>maven-s3-wagon</artifactId>
        <version>1.2.1</version>
      </extension>
    </extensions>
  </build>
  <dependencies>
    <!-- Removed to make reading easier -->
  </dependencies>
  <properties>
    <!-- Removed to make reading easier -->
  </properties>
</project>

拜托,我做错了什么?

编辑:我将所有内容删除到Maven仓库和本地仓库中的工件目录中。另外,正如您在pom.xml文件中看到的那样,我将所有插件的版本更新为上次更新,但我得到了相同的结果

编辑:部署后的日志:

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building artifact-id 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ artifact-id ---
[INFO] Deleting /home/jondoe/test-project/source/target
[INFO] 
[INFO] --- build-helper-maven-plugin:1.10:add-source (add_sources) @ artifact-id ---
[INFO] Source directory: /home/jondoe/test-project/source/src/main/java added.
[INFO] 
[INFO] --- maven-resources-plugin:2.3:resources (default-resources) @ artifact-id ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/jondoe/test-project/source/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ artifact-id ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 27 source files to /home/jondoe/test-project/source/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.247 s
[INFO] Finished at: 2016-04-21T17:29:34-04:00
[INFO] Final Memory: 19M/304M
[INFO] ------------------------------------------------------------------------
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building artifact-id 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- build-helper-maven-plugin:1.10:add-source (add_sources) @ artifact-id ---
[INFO] Source directory: /home/jondoe/test-project/source/src/main/java added.
[INFO] 
[INFO] --- maven-resources-plugin:2.3:resources (default-resources) @ artifact-id ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/jondoe/test-project/source/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ artifact-id ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.3:testResources (default-testResources) @ artifact-id ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/jondoe/test-project/source/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:testCompile (default-testCompile) @ artifact-id ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ artifact-id ---
[INFO] No tests to run.
[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ artifact-id ---
[INFO] Building jar: /home/jondoe/test-project/source/target/artifact-id-1.0.0-SNAPSHOT.jar
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:copy-dependencies (default) @ artifact-id ---
[INFO] // DELETED DEPENDENCIES
[INFO] 
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ artifact-id ---
[INFO] Installing /home/jondoe/test-project/source/target/artifact-id-1.0.0-SNAPSHOT.jar to /home/jondoe/.m2/repository/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/artifact-id-1.0.0-SNAPSHOT.jar
[INFO] Installing /home/jondoe/test-project/source/pom.xml to /home/jondoe/.m2/repository/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/artifact-id-1.0.0-SNAPSHOT.pom
[INFO] 
[INFO] --- maven-deploy-plugin:2.8.2:deploy (default-deploy) @ artifact-id ---
Downloading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/maven-metadata.xml
[INFO] Logged in - maven.company.com
[INFO] Downloading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/maven-metadata.xml

Uploading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/artifact-id-1.0.0-20160421.212940-1.jar
[INFO] Uploading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/artifact-id-1.0.0-20160421.212940-1.jar
2 KB   
4 KB   
6 KB   
8 KB   
10 KB   
12 KB   
14 KB   
16 KB   
18 KB   
20 KB   
22 KB   
24 KB   
26 KB   
28 KB   
30 KB   
32 KB   
34 KB   
36 KB   
38 KB   
40 KB   
42 KB   
44 KB   
46 KB   
48 KB   
50 KB   
52 KB   
54 KB   
56 KB   
58 KB   
[INFO] Uploading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/artifact-id-1.0.0-20160421.212940-1.jar.sha1
[INFO] Uploading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/artifact-id-1.0.0-20160421.212940-1.jar.md5

Uploaded: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/artifact-id-1.0.0-20160421.212940-1.jar (58 KB at 28.7 KB/sec)
Uploading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/artifact-id-1.0.0-20160421.212940-1.pom
[INFO] Uploading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/artifact-id-1.0.0-20160421.212940-1.pom
2 KB    
4 KB   
6 KB   
[INFO] Uploading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/artifact-id-1.0.0-20160421.212940-1.pom.sha1
[INFO] Uploading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/artifact-id-1.0.0-20160421.212940-1.pom.md5

Uploaded: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/artifact-id-1.0.0-20160421.212940-1.pom (6 KB at 4.1 KB/sec)
Downloading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/maven-metadata.xml
[INFO] Downloading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/maven-metadata.xml

Uploading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/maven-metadata.xml
[INFO] Uploading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/maven-metadata.xml
767 B   
[INFO] Uploading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/maven-metadata.xml.sha1
[INFO] Uploading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/maven-metadata.xml.md5

Uploaded: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/maven-metadata.xml (767 B at 0.6 KB/sec)
Uploading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/maven-metadata.xml
[INFO] Uploading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/maven-metadata.xml
277 B   
[INFO] Uploading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/maven-metadata.xml.sha1
[INFO] Uploading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/maven-metadata.xml.md5

Uploaded: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/maven-metadata.xml (277 B at 0.2 KB/sec)
[INFO] Logged off - maven.company.com
[INFO] Transfers: 14 Time: 6.572s Amount: 64.7k Throughput: 9.840 KB/s
[INFO] 
[INFO] --- maven-deploy-plugin:2.8.2:deploy (deploy) @ artifact-id ---
Downloading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/maven-metadata.xml
[INFO] Logged in - maven.company.com
[INFO] Downloading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/maven-metadata.xml
767 B   
[INFO] Downloading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/maven-metadata.xml.sha1

Downloaded: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/maven-metadata.xml (767 B at 0.3 KB/sec)
Uploading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/artifact-id-1.0.0-20160421.212940-1.jar
[INFO] Uploading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/artifact-id-1.0.0-20160421.212940-1.jar
2 KB    
4 KB   
6 KB   
8 KB   
10 KB   
12 KB   
14 KB   
16 KB   
18 KB   
20 KB   
22 KB   
24 KB   
26 KB   
28 KB   
30 KB   
32 KB   
34 KB   
36 KB   
38 KB   
40 KB   
42 KB   
44 KB   
46 KB   
48 KB   
50 KB   
52 KB   
54 KB   
56 KB   
58 KB   
[INFO] Uploading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/artifact-id-1.0.0-20160421.212940-1.jar.sha1
[INFO] Uploading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/artifact-id-1.0.0-20160421.212940-1.jar.md5

Uploaded: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/artifact-id-1.0.0-20160421.212940-1.jar (58 KB at 24.9 KB/sec)
Uploading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/artifact-id-1.0.0-20160421.212940-1.pom
[INFO] Uploading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/artifact-id-1.0.0-20160421.212940-1.pom
2 KB    
4 KB   
6 KB   
[INFO] Uploading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/artifact-id-1.0.0-20160421.212940-1.pom.sha1
[INFO] Uploading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/artifact-id-1.0.0-20160421.212940-1.pom.md5

Uploaded: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/artifact-id-1.0.0-20160421.212940-1.pom (6 KB at 3.6 KB/sec)
Downloading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/maven-metadata.xml
[INFO] Downloading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/maven-metadata.xml
277 B   
[INFO] Downloading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/maven-metadata.xml.sha1

Downloaded: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/maven-metadata.xml (277 B at 0.6 KB/sec)
Uploading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/maven-metadata.xml
[INFO] Uploading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/maven-metadata.xml
767 B   
[INFO] Uploading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/maven-metadata.xml.sha1
[INFO] Uploading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/maven-metadata.xml.md5

Uploaded: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/maven-metadata.xml (767 B at 0.4 KB/sec)
Uploading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/maven-metadata.xml
[INFO] Uploading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/maven-metadata.xml
277 B   
[INFO] Uploading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/maven-metadata.xml.sha1
[INFO] Uploading: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/maven-metadata.xml.md5

Uploaded: s3://maven.company.com/snapshot/com/company/group-id/artifact-id/maven-metadata.xml (277 B at 0.2 KB/sec)
[INFO] Logged off - maven.company.com
[INFO] Transfers: 16 Time: 8.742s Amount: 65.8k Throughput: 7.523 KB/s
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.293 s
[INFO] Finished at: 2016-04-21T17:29:57-04:00
[INFO] Final Memory: 27M/370M
[INFO] ------------------------------------------------------------------------

编辑:构建后的日志。

[info] Loading project definition from /home/jondoe/TestCompanyMaven/project
[debug] [naha] 
[debug] [naha] Initial source changes: 
[debug] [naha]  removed:Set()
[debug] [naha]  added: Set()
[debug] [naha]  modified: Set()
[debug] [naha] Invalidated products: Set()
[debug] [naha] External API changes: API Changes: Set()
[debug] [naha] Modified binary dependencies: Set()
[debug] [naha] Initial directly invalidated sources: Set()
[debug] [naha] 
[debug] [naha] Sources indirectly invalidated by:
[debug] [naha]  product: Set()
[debug] [naha]  binary dep: Set()
[debug] [naha]  external source: Set()
[debug] All initially invalidated sources: Set()
[debug] Copy resource mappings: 
[debug] 
Installing the s3:// URLStreamHandler via java.net.URL.setURLStreamHandlerFactory
Creating a new Ivy URLHandlerDispatcher to handle s3:// URLs
[info] Set current project to testcompanymaven (in build file:/home/jondoe/TestCompanyMaven/)
[info] Updating {file:/home/jondoe/TestCompanyMaven/}testcompanymaven...
[info] Resolving com.company.group-id#artifact-id;1.0.0-SNAPSHOT ...
[info] S3URLHandler - Using AWS Access Key Id: THE_AWS_KEY for bucket: maven.company.com
[warn]  module not found: com.company.group-id#artifact-id;1.0.0-SNAPSHOT
[warn] ==== local: tried
[warn]   /home/jondoe/.ivy2/local/com.company.group-id/artifact-id/1.0.0-SNAPSHOT/ivys/ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/artifact-id-1.0.0-SNAPSHOT.pom
[warn] ==== activator-launcher-local: tried
[warn]   /opt/play/repository/com.company.group-id/artifact-id/1.0.0-SNAPSHOT/ivys/ivy.xml
[warn] ==== typesafe-releases: tried
[warn]   https://repo.typesafe.com/typesafe/releases/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/artifact-id-1.0.0-SNAPSHOT.pom
[warn] ==== typesafe-ivy-releasez: tried
[warn]   https://repo.typesafe.com/typesafe/ivy-releases/com.company.group-id/artifact-id/1.0.0-SNAPSHOT/ivys/ivy.xml
[warn] ==== Company Maven repo: tried
[warn]   s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/artifact-id-1.0.0-20160421.212949-2.pom
[warn]   s3://maven.company.com/snapshot/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/artifact-id-1.0.0-SNAPSHOT.pom
[warn] ==== scalaz-bintray: tried
[warn]   https://dl.bintray.com/scalaz/releases/com/company/group-id/artifact-id/1.0.0-SNAPSHOT/artifact-id-1.0.0-SNAPSHOT.pom
[info] Resolving jline#jline;2.12.1 ...
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.company.group-id#artifact-id;1.0.0-SNAPSHOT: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn] 
[warn]  Note: Unresolved dependencies path:
[warn]          com.company.group-id:artifact-id:1.0.0-SNAPSHOT (/home/jondoe/TestCompanyMaven/build.sbt#L11-17)
[warn]            +- testcompanymaven:testcompanymaven_2.11:1.0

2 个答案:

答案 0 :(得分:0)

尝试删除maven元数据文件,并最终重新部署您的工件

答案 1 :(得分:0)

我找到了解决方案:因为我使用的是自动生成的pom.xml,所以我添加了maven-s3-wagon扩展名,以便将库发布到AWS S3服务器上的Maven仓库。因此,pom.xml文件具有Maven的其他插件。我认为mvn正在调用两个进程:常规Maven 部署和 Maven S3 Wagon ,这就是部署过程正在进行的原因“额外步骤”并生成两个名称:artifact-id-xxxx。 142230-1 和artifact-id-xxxx。 142243-2

我已将所有插件移至<build>部分,并仅保留maven-s3-wagon部分。它就像一个魅力。

<build>
  <extensions>
    <extension>
      <groupId>org.kuali.maven.wagons</groupId>
      <artifactId>maven-s3-wagon</artifactId>
      <version>1.2.1</version>
    </extension>
  </extensions>
</build>