gpt4 book ai didi

maven - 部署到 Maven 时,上传永远挂起

转载 作者:行者123 更新时间:2023-12-02 05:17:15 25 4
gpt4 key购买 nike

我正在将一个库部署到我的远程 Maven 存储库。

当我运行时 mvn -U deploy或者干脆 mvn deploy上传 Artifact 时,一切看起来都很好。它只是永远卡在那里。

像这样:

Uploading: http://maven.mycompany.com/server-product/com/mycompany/product/server/common/Common/3.0/Common-3.0.jar
213/213 KB

我已阅读 here , here , herehere但它们都与下载有关,而不是上传。我可以下载得很好,但上传我的神器就挂了。这些链接与之前 Maven 版本的一些错误有关,我正在使用 Apache Maven 3.3.3
远程服务器正在运行 Artifactory 3.6.0 (rev. 30178)
有谁知道问题出在哪里?我究竟做错了什么?

这是我的 settings.xml 文件:
<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<servers>
<server>
<username>admin</username>
<password>superSecretPassword</password>
<id>central</id>
</server>
<server>
<id>myCompany Maven</id>
<username>admin</username>
<password>superSecretPassword</password>
</server>
</servers>
<profiles>
<profile>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>libs-release</name>
<url>http://maven.myCompany.com/libs-release</url>
</repository>
<repository>
<snapshots />
<id>snapshots</id>
<name>libs-snapshot</name>
<url>http://maven.myCompany.com/libs-snapshot</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>plugins-release</name>
<url>http://maven.myCompany.com/plugins-release</url>
</pluginRepository>
</pluginRepositories>
<id>artifactory</id>
</profile>
</profiles>
<activeProfiles>
<activeProfile>artifactory</activeProfile>
</activeProfiles>
</settings>

这是我的 pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.myCompany.product.server.common</groupId>
<artifactId>Common</artifactId>
<version>3.0</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
<dependencies>
(dependencies...)
</dependencies>

<distributionManagement>
<repository>
<id>myCompany Maven</id>
<name>myCompany Maven-releases</name>
<url>http://maven.myCompany.com/server-product</url>
</repository>
</distributionManagement>

</project>

这是来自 mvn deploy 的输出
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Common 3.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ Common ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ Common ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ Common ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/dwnz/Development/Server/code/product/Common/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ Common ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ Common ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ Common ---
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ Common ---
[INFO] Installing /Users/dwnz/Development/Server/code/product/Common/target/Common-3.0.jar to /Users/dwnz/.m2/repository/com/mycompany/product/server/common/Common/3.0/Common-3.0.jar
[INFO] Installing /Users/dwnz/Development/Server/code/product/Common/pom.xml to /Users/dwnz/.m2/repository/com/mycompany/product/server/common/Common/3.0/Common-3.0.pom
[INFO]
[INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ Common ---
Uploading: http://maven.mycompany.com/server-product/com/mycompany/product/server/common/Common/3.0/Common-3.0.jar
213/213 KB ---->> Here it hangs *forever*!

最佳答案

我有一个类似的问题。 mvn deploy几乎会完成上传,然后它就会挂起。问题原来是我的凭据。

关于maven - 部署到 Maven 时,上传永远挂起,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30189412/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com