Artifactory的OSS抛出405异常运行Maven发布的时候:执行

问题描述 投票:0回答:1

运行Maven发布时artifactory-oss-6.7.2抛出一个异常405 status code:执行

从artifactory的创建settings.xml上回购“产生的settings.xml”。所有的回购协议是虚拟的回购协议。新增distributionManagement到我的项目POM文件使用从settings.xml快照和版本的ID。

settings.xml中:

<repositories>
 <repository>
   <snapshots>
     <enabled>false</enabled>
   </snapshots>
   <id>central</id>
   <name>libs-release</name>
   <url>http://localhost:8081/artifactory/libs-release</url>
 </repository>
 <repository>
   <snapshots />
   <id>snapshots</id>
   <name>libs-snapshot</name>
   <url>http://localhost:8081/artifactory/libs-snapshot</url>
  </repository>
 </repositories>

MyProject的/ pom.xml中:

     <distributionManagement>
    <repository>
        <id>central</id>
        <name>Artifactory Release Repo</name>
        <url>http://localhost:8081/artifactory/libs-release</url>
    </repository>
    <snapshotRepository>
        <id>snapshots</id>
        <name>Artifactory Snapshot Repo</name>
        <url>http://localhost:8081/artifactory/libs-snapshot</url>
    </snapshotRepository>
</distributionManagement>

run mvn release:perform output

[INFO] [错误]未能执行目标org.apache.maven.plugins:行家 - 部署 - 插件:2.7:部署(默认部署)的项目模式:未能部署文物:无法传输神器com.test:模型:从/到中央(http://localhost:8081/artifactory/libs-release)0.1.0:罐子无法传送文件http://localhost:8081/artifactory/libs-release/com/srcrea/model/0.1.0/model-0.1.0.jar,状态码405 - > [帮助1]

maven exception pom.xml artifactory maven-release-plugin
1个回答
0
投票

所以我也跟着东西我发现这里 - > http://forums.jfrog.org/Error-Code-405-with-mvn-deploy-td7174367.html

并更新了pom.xml中的DistributionManagement

   <distributionManagement>
    <repository>
        <id>central</id>
        <name>Artifactory Release Repo</name>
        <url>http://localhost:8081/artifactory/88888</url>
    </repository>
    <snapshotRepository>
        <id>snapshots</id>
        <name>Artifactory Snapshot Repo</name>
        <url>http://localhost:8081/artifactory/88888</url>
    </snapshotRepository>
</distributionManagement>

重新运行,现在我看到它:

artifactory repo

但是,目前尚不清楚是为了产生的settings.xml你需要虚拟回购到本地回购关联。然后生成关闭该设置和使用distributionManagement配置指回本地回购。什么是虚拟回购的意义呢?

© www.soinside.com 2019 - 2024. All rights reserved.