Maven. Repository-Authentifizierung
Habe ich versucht das setup bereitstellen, um lokale repository:
-- settings.xml --
<server>
<id>myrepo</id>
<username>deployer</username>
<password>123456</password>
</server>
-- pom.xml ---
<repositories>
<repository>
<id>myrepo</id>
<url>http://myserver.com/artifactory/libs-release-local</url>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
wenn ich ausführen "mvn deploy" ich erhielt den Fehler:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.4:
deploy (default-deploy) on project xxx: Failed to deploy artifacts: Co
uld not transfer artifact xxx:xxx:war:0.1-20130527.121430-3 from/to myserver.com
(http://myserver.com:8083/artifactory/libs-snapshot-local): Failed to transfer file:
http://myserver.com:8083/artifactory/libs-snapshot-local/xxx/0.1-SNAPSHOT
/xxx-0.1-20130527.121430-3.war. Return code is: 401
Artifactory log:
2013-05-27 16:14:38,158 [DENIED DEPLOY] libs-snapshot-local:xxx/0.1-SNAPSHOT
/xxx-0.1-20130527.121430-3.pom for anonymous/192.168.6.36.
Wenn ich server/repository-id "myserver.com" die Bereitstellung der ARBEIT!
Aber es passt mir nicht, weil das nicht funktioniert-plugin-changelog mit svn an myserver.com
I tried to add tags "Profil" und "Spiegel" zu server.xml und "distributionManagement" zu pom.xml - immer die gleichen Fehler
server/repository-id muss den Namen NUR als mein server?
UPDATE1:
Ich Entferne tag "repositories" aus pom.xml und Hinzugefügt tag 'distributionManagment':
--- pom.xml ---
<distributionManagement>
<repository>
<id>myrepo</id>
<name>myrepo</name>
<url>http://myserver.com/artifactory/libs-release-local</url>
</repository>
<snapshotRepository>
<id>myrepo</id>
<name>myrepo</name>
<url>http://myserver.com/artifactory/libs-snapshots-local</url>
<uniqueVersion>false</uniqueVersion>
</snapshotRepository>
</distributionManagement>
(server.xml hat sich nicht verändert), - immer der gleiche Fehler "Fehler beim bereitstellen..."
UPDATE2:
Versuchen...
--- server.xml ---
<profiles>
<profile>
<id>artifactory</id>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>libs-release</name>
<url>http://myserver.com/artifactory/libs-release-local</url>
</repository>
<repository>
<snapshots />
<id>snapshots</id>
<name>libs-snapshot</name>
<url>http://myserver.com/artifactory/libs-snapshot-local</url>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>artifactory</activeProfile>
</activeProfiles>
<server>
<id>snapshots</id>
<username>deployer</username>
<password>123456</password>
</server>
<server>
<id>central</id>
<username>deployer</username>
<password>123456</password>
</server>
--- pom.xml ---
<distributionManagement>
<repository>
<id>central</id>
<name>Internal Releases</name>
<url>http://myserver.com/artifactory/libs-release-local</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<name>Internal Snapshots</name>
<url>http://myserver.com/artifactory/libs-snapshots-local</url>
<uniqueVersion>false</uniqueVersion>
</snapshotRepository>
</distributionManagement>
ausführen "mvn deploy' - wieder error 🙁
Failed to deploy artifacts: Could not transfer artifact xxx:xxx:war:0.1-20130528.050526-1 from/to snapshots (http://myserver.com/artifactory/libs-snapshots-local)
Du musst angemeldet sein, um einen Kommentar abzugeben.
Den 'repositories' - tag wird verwendet für die Auflösung nicht für die Bereitstellung. Ich würde spekulieren, dass die id der repository unter "distributionManagment' tag 'myserver.com' das ist, warum es server übereinstimmt Erklärung settings.xml