Maven(m2e)部署开始时进行并行上载

juud5qan  于 2022-11-22  发布在  Maven
关注(0)|答案(3)|浏览(160)

我试着将我的项目工件上传到nexus staging。
上传从并行上传两个工件开始,之后每个arttifact都依次上传:

[...]
[INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ tkscommons ---
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/myproject/myproject-0.1.2.jar
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/myprojekt/myprojekt-0.1.2.pom
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/myprojekt/myprojekt-0.1.2.pom (4 KB at 0.6 KB/sec)
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/myprojekt/myprojekt.jar (12 KB at 1.7 KB/sec)
Downloading: https://oss.sonatype.org/service/local/staging/deploy/maven2/de/thksystems/myprojekt/maven-metadata.xml
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/de/thksystems/myprojekt/maven-metadata.xml
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/de/thksystems/myprojekt/maven-metadata.xml (303 B at 0.2 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/myprojekt/myprojekt-sources.jar
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/myprojekt/myprojekt-sources.jar (8 KB at 2.7 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/myprojekt/myprojekt-javadoc.jar
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/myprojekt/myprojekt-javadoc.jar (91 KB at 24.4 KB/sec)
[...]

如何停止并行上传?它是如何引起的?

**更新(2014/05/02):**如果我在eclipse(m2 e)中开始部署,这个问题才会出现。如果我从命令行启动,它工作正常,没有并行上传。

vhmi4jdf

vhmi4jdf2#

这个问题是由m2eclipse引起的。从comandline使用maven进行部署效果很好,尽管这是我的解决方案。

zsbz8rwp

zsbz8rwp3#

我一直在努力弄清楚为什么我不能得到一个工件部署到Nexus 3和这个主题钉它!
下面您可以看到使用嵌入式Maven M2 elipse进行部署的输出。Jar和POM并行上传。POM成功上传,但Jar无法上传,并返回代码“401未经授权”。当我在Nexus中查看时,我可以看到POM,但看不到Jar。

[INFO] --- maven-deploy-plugin:3.0.0:deploy (default-deploy) @ xxx-project ---
[INFO] Uploading to : https://nexus.***.com/repository/releases/com/***/***-project/7.1.8.2/***-project-7.1.8.2.jar
[INFO] Uploading to : https://nexus.***.com/repository/releases/com/***/***-project/7.1.8.2/***-project-7.1.8.2.pom
[INFO] Uploaded to : https://nexus.***.com/repository/releases/com/***/***-project/7.1.8.2/***-project-7.1.8.2.pom (13 kB at 36 kB/s)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.527 s
[INFO] Finished at: 2022-11-04T08:38:47-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:3.0.0:deploy (default-deploy) on project ***-project: Failed to deploy artifacts: Could not transfer artifact com.***:***-project:jar:7.1.8.2 from/to ***-nexus (https://nexus.***.com/repository/releases/): Access denied to https://nexus.***.com/repository/releases/com/***/***-project/7.1.8.2/***-project-7.1.8.2.jar. Error code 401, Unauthorized -> [Help 1]

下面的日志显示了从命令行Maven进行的成功部署。

[INFO] --- maven-deploy-plugin:3.0.0:deploy (default-deploy) @ ***-project ---
Uploading to ***-nexus: https://nexus.***.com/repository/releases/com/***/***-project/7.1.8.2/***-project-7.1.8.2.pom
Uploaded to ***-nexus: https://nexus.***.com/repository/releases/com/***/***-project/7.1.8.2/***-project-7.1.8.2.pom (6.4 kB at 12 kB/s)
Uploading to ***-nexus: https://nexus.***.com/repository/releases/com/***/***-project/7.1.8.2/***-project-7.1.8.2.jar
Uploaded to ***-nexus: https://nexus.***.com/repository/releases/com/***/***-project/7.1.8.2/***-project-7.1.8.2.jar (22 kB at 77 kB/s)
Uploading to ***-nexus: https://nexus.***.com/repository/releases/com/***/***-project/7.1.8.2/***-project-7.1.8.2-tests.jar
Uploaded to ***-nexus: https://nexus.***.com/repository/releases/com/***/***-project/7.1.8.2/***-project-7.1.8.2-tests.jar (8.0 kB at 29 kB/s)
Downloading from ***-nexus: https://nexus.***.com/repository/releases/com/***/***-project/maven-metadata.xml
Downloaded from ***-nexus: https://nexus.***.com/repository/releases/com/***/***-project/maven-metadata.xml (371 B at 3.1 kB/s)
Uploading to ***-nexus: https://nexus.***.com/repository/releases/com/***/***-project/maven-metadata.xml
Uploaded to ***-nexus: https://nexus.***.com/repository/releases/com/***/***-project/maven-metadata.xml (371 B at 1.4 kB/s)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.860 s
[INFO] Finished at: 2022-11-04T08:54:29-05:00
[INFO] ------------------------------------------------------------------------

总之,Nexus似乎不喜欢并行部署,如果您尝试这样做,它将返回错误401。因此,从M2 Eclipse进行的部署被中断。

相关问题