当前位置: 首页 > 知识库问答 >
问题:

无法在Nexus存储库上载工件

舒俊雄
2023-03-14

如果我试图使用命令上传一个jar

mvn deploy:deploy-file \ 
-DgroupId=log4j \ 
-DartifactId=log4j-gwt \ 
-Dversion=1.0 \ 
-Dpackaging=jar \ 
-Dfile=log4j-gwt.jar \ 
-DrepositoryId=nexus \ 
-Durl=http://2.23.45.65:8081/nexus/content/repositories/central
Downloaded: http://2.23.45.65:8081/nexus/content/repositories/central/org/codehaus/plexus/plexus-utils/3.0.15/plexus-utils-3.0.15.jar (0 B at 0.0 KB/sec)
Uploading: http://2.23.45.65:8081/nexus/content/repositories/central/log4j/log4j-gwt/1.0/log4j-gwt-1.0.jar
Uploading: http://2.23.45.65:8081/nexus/content/repositories/central/log4j/log4j-gwt/1.0/log4j-gwt-1.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.964s
[INFO] Finished at: Mon Mar 21 16:45:42 MSK 2016
[INFO] Final Memory: 6M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy-file (default-cli) on project gwtclient: Failed to deploy artifacts: Could not transfer artifact log4j:log4j-gwt:jar:1.0 from/to nexus (http://2.23.45.65:8081/nexus/content/repositories/central): Failed to transfer file: http://2.23.45.65:8081/nexus/content/repositories/central/log4j/log4j-gwt/1.0/log4j-gwt-1.0.jar. Return code is: 401
<mirror>
  <id>nexus</id>
  <url>http://2.23.45.65:8081/nexus/content/repositories/central/</url>
  <mirrorOf>central</mirrorOf>
</mirror>
  <server>
        <id>nexus_public</id>
        <username>username</username>
        <password>passwd</password>
        <filePermissions>664</filePermissions>
        <directoryPermissions>775</directoryPermissions>
        <configuration></configuration>
  </server>
<repositories>
    <repository>
      <id>nexus_public</id>
      <url>http://2.23.45.65:8081/nexus/content/groups/public/</url>
    </repository>
</repositories>
mvn deploy:deploy-file \
-DgroupId=log4j \ 
-DartifactId=log4j-gwt \ 
-Dversion=1.0 \ 
-Dpackaging=jar \ 
-Dfile=log4j-gwt.jar \
-DrepositoryId=nexus_public \ 
-Durl=http://2.23.45.65:8081/nexus/content/groups/public

但我在Nexus Repository Manager OSS中找不到这个选项卡。这应该在tab摘要之后,但它不在那里。

共有1个答案

钱经业
2023-03-14

问题是您试图上载到一个存储库组。那行不通的。您必须上载到托管存储库。

存储库组将代理存储库和托管存储库聚合为虚拟合并。如果您上载到作为组的一部分的托管存储库-工件将在组中可用。

 类似资料:
  • 我是Maven的新手,我的目标是在像(Nexus)这样的存储库中发布一个APK。这个APK是在Jenkins中用Unity3dBuilder插件构建的。我在jenkins的工作是一个Maven2/3项目,因此我需要配置我的pom.xml,以便能够发布我的工件(apk)。 请帮忙!!??

  • 我是Gradle、nexus和Maven的新手,并尝试使用Gradle'publish'任务将Maven工件从Jenkins发布到一个新的nexus存储库。Jenkins作业在发布时失败,出现以下错误。我已经在作业中为Nexus提供了用户名和密码。 在第一次发布之前,我们需要在nexus maven存储库中创建文件夹结构吗?并添加maven-metadata.xml?如何生成*.pom.sha和*

  • 我有两个私人JFrog存储库设置。一个存储库处理发布,另一个处理快照。下面是我如何在我的设置中定义它的。xml文件。 我的多模块maven项目中的多个内部依赖项都收到了这个错误: 从外观上看,Maven似乎并没有试图联系官方的Maven Central repo以获取这些依赖项,而是在我的私有存储库上失败了。我的印象是,如果私有存储库不包含特定工件,它将尝试联系Maven Central。 从Ma

  • 我试图在Firebase存储中使用Firebase上传图像,但文件不能完全上传。它只显示图像的大小9字节,下载时无法预览。 这是我使用的代码:- 我使用的反应本地图像作物选择器。我使用Firebase,但不是反应本机Firebase。请帮助!

  • [链接被替换为[http],因为StackOverflow不允许我使用超过2个链接…] 我已经安装了Apache Maven 3.2.3([超文本传输协议]maven.apache.org/download.cgi?Preferred=ftp://mirror.reverse.net/pub/apache/),它已经下载了所有核心插件。 然后我在XAMPP tomcat服务器上安装了Sonatyp

  • 我有一台在内部网8081端口上运行Nexus OSS存储库(版本3.15.1-01)的机器。我可以通过它的IP ping这台机器,我甚至Jenkins在8080端口上运行,可以通过任何互联网浏览器很好地访问它。然而,当我试图在8081上远程访问Nexus时,我只得到超时。 我已经在Nexus上配置了http/https代理(我们有一个公司代理),它可以毫无问题地从在线repos下载工件,并且我可以