Я пытаюсь запустить проект для нашего репозитория Artifactory. Пользователь qazwart
является администратором и имеет разрешение на развертывание на сервере. У меня есть эта пользовательская информация в файле settings.xml
под идентификаторами <central>
и <snapshots>
. У меня есть правильный URL-адрес в разделе <distributionManagement>
в моем pom.xml
файле. Похоже, все настроено правильно. Тем не менее, когда я пытаюсь развернуть, я получаю ошибку Return code is: 405, ReasonPhrase: Method Not Allowed. -> [Help 1]
.
Что я должен искать или пытаться?
Вывод mvn deploy
(я добавил разрывы строк в разделе [ERORR]
, чтобы сделать его более читаемым):
$ mvn deploy
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] ....
[INFO] ------------------------------------------------------------------------
[INFO] Building Project Aggregate POM 2.5.2
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ rez ---
[INFO] Installing /home/qazwart/project/workspace/pom.xml to \
/home/tomcat/.m2/repository/com/vegicorp/proj/2.5.2/proj-2.5.2.pom
[INFO]
[INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ proj ---
Uploading: http://repo.vegicorp.net/artifactory/libs-release/net/vegicorp/proj/2.5.2/proj-2.5.2.pom
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Project Aggregate POM ........................ FAILURE [1.984s]
[INFO] ....
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.885s
[INFO] Finished at: Wed Feb 18 12:58:53 EST 2015
[INFO] Final Memory: 10M/149M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal \
org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy \
(default-deploy) on project proj: \
Failed to deploy artifacts: Could not transfer artifact \
net.vegicorp:proj:pom:2.5.2 from/to central \
(http://repo.vegicorp.net/artifactory/libs-release): \
Failed to transfer file: \
http://repo.vegicorp.net/artifactory/libs-release/net/vegicorp/proj/2.5.2/proj-2.5.2.pom. \
Return code is: 405, ReasonPhrase: Method Not Allowed. -> [Help 1]
[INFO] ...
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Мой файл настроек в $HOME/.m2/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">
<proxies>
<proxy>
<id>proxy</id>
<active>true</active>
<protocol>http</protocol>
<host>proxy.vegicorp.net</host>
<port>3128</port>
<nonProxyHosts></nonProxyHosts>
</proxy>
</proxies>
<servers>
<server>
<username>qazwart</username>
<password>swordfish</password>
<id>central</id>
</server>
<server>
<username>qazwart</username>
<password>swordfish</password>
<id>snapshots</id>
</server>
</servers>
<profiles>
<profile>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>libs-release</name>
<url>http://repo.vegicorp.net/artifactory/libs-release</url>
</repository>
<repository>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>snapshots</id>
<name>libs-snapshot</name>
<url>http://repo.vegicorp.net/artifactory/libs-snapshot</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>plugins-release</name>
<url>http://repo.vegicorp.net/artifactory/plugins-release</url>
</pluginRepository>
<pluginRepository>
<snapshots />
<id>snapshots</id>
<name>plugins-snapshot</name>
<url>http://repo.vegicorp.net/artifactory/plugins-snapshot</url>
</pluginRepository>
</pluginRepositories>
<id>artifactory</id>
</profile>
</profiles>
<activeProfiles>
<activeProfile>artifactory</activeProfile>
</activeProfiles>
</settings>
И мой проект POM:
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>proj</artifactId>
<groupId>net.vegicorp</groupId>
<version>2.5.2</version>
<packaging>pom</packaging>
<name>Project Aggregate POM</name>
<description>All Reservation Delivery Projects</description>
<properties>
....
</properties>
<scm>
....
</scm>
<distributionManagement>
<repository>
<id>central</id>
<name>libs-release</name>
<url>http://repo.vegicorp.net/artifactory/libs-release</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<name>libs-snapshot</name>
<url>http://repo.vegicorp.net/artifactory/libs-snapshot</url>
</snapshotRepository>
</distributionManagement>
<dependencyManagement>
....
</dependencyManagement>
<build>
...
</build>
<modules>
...
</modules>
</project>