首页 文章

Jenkins将工件上传到与Nexus 3无关的nexus插件

提问于
浏览
0

我有一个Jenkins项目,它使用Jenkins上传工件到nexus插件进行gradle构建并将构建工件上传到Nexus maven托管存储库 . 当我使用Nexus 2.13时工作正常 - 但升级到Nexus 3后,上传到Nexus的工作不再有效 . 我已经确定我已经像Nexus 2.13存储库一样配置了Nexus 3存储库 . 当我构建我的Jenkins项目时,我得到了回复

GroupId: com.company
ArtifactId: hello-world-util
Version: 1.0.0
File: hello-world-util-1.0.0.jar
Repository:companyDevops
Uploading artifact hello-world-util-1.0.0.jar started....
Reason Phrase: Method Not Allowed

<!DOCTYPE html>
<html>
<head>
  <title>405 - Nexus Repository Manager</title>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

  <!--[if lt IE 9]>
  <script>(new Image).src="http://192.168.99.100:18081/favicon.ico?3.0.1-01"</script>
  <![endif]-->
  <link rel="icon" type="image/png" href="http://192.168.99.100:18081/favicon-32x32.png?3.0.1-01" sizes="32x32">
  <link rel="mask-icon" href="http://192.168.99.100:18081/safari-pinned-tab.svg?3.0.1-01" color="#5bbad5">
  <link rel="icon" type="image/png" href="http://192.168.99.100:18081/favicon-16x16.png?3.0.1-01" sizes="16x16">
  <link rel="shortcut icon" href="http://192.168.99.100:18081/favicon.ico?3.0.1-01">
  <meta name="msapplication-TileImage" content="http://192.168.99.100:18081/mstile-144x144.png?3.0.1-01">
  <meta name="msapplication-TileColor" content="#00a300">

  <link rel="stylesheet" type="text/css" href="http://192.168.99.100:18081/static/css/nexus-content.css?3.0.1-01"/>
</head>
<body>
<div class="nexus-header">
  <a href="http://192.168.99.100:18081">
    <div class="product-logo">
      <img src="http://192.168.99.100:18081/static/images/nexus.png?3.0.1-01"/>
    </div>
    <div class="product-id">
      <div class="product-id__line-1">
        <span class="product-name">Nexus Repository Manager</span>
      </div>
      <div class="product-id__line-2">
        <span class="product-spec">OSS 3.0.1-01</span>
      </div>
    </div>
  </a>
</div>

<div class="nexus-body">
  <div class="content-header">
    <img src="http://192.168.99.100:18081/static/rapture/resources/icons/x32/exclamation.png?3.0.1-01"/>
    <span class="title">Error 405</span>
    <span class="description">Method Not Allowed</span>
  </div>
  <div class="content-body">
    <div class="content-section">
      HTTP method POST is not supported by this URL
    </div>
      </div>
</div>
</body>
</html>

我的Jenkins nexus上传配置为(并且在Nexus 2.13和3之间没有变化)

Upload artifact to nexus
Nexus Details
Protocol HTTP
Nexus URL 192.168.99.100:18081
User admin
Password admin123
Credentials com.company
GroupId com.company
ArtifactId hello-world-ui
Version 1.0.0
Packaging jar
Repository companyDevops
File build/libs/hello-world-util-1.0.0.jar

我的Nexus 3 maven托管存储库配置为

Name companyDevops
Format maven2
Type hosted
URL http://192.168.99.100:18081/repository/companyDevops/
Online
Maven 2
Version policy Release
Layout policy Strict
Storage
Blog store default
Strict content type validation X
Hosted
Deployment policy Allow redeploy

不知道为什么我收到此错误 - 我已经验证Nexus管理员用户有权上传工件 - 我已经验证允许重新部署已启用

可能发生的事情 - 可能是詹金斯的上传工件到nexus插件与Nexus 3不兼容?

有人有这个与Nexus 3一起工作吗?有什么建议?

谢谢!

3 回答

相关问题