Dieses Blog durchsuchen

Samstag, 24. September 2016

ivy: publish to nexus - unauthorized

It tooked me 6 hours and many retries to find out, that its not possible to use the ivy publish task on a host like: "http://localhost:8082"

It shows up in a message like that: impossible to publish artifacts for com-test#coolsoftwaremodule;working@pboethig: java.io.IOException: Access to URL http://localhost:8082/content/repositories/releases/com-test/coolsoftwaremodule/1.2.3.4/coolsoftwaremodule-1.2.3.4.zip was refused by the server: Unauthorized
I wrongly have used a build.properties like that:
repo.protocoll=http
repo.host=localhost:8082
repo.realm=Sonatype Nexus Repository Manager
repo.username=admin
repo.password=admin123

 and a credentialsobject like that:
<credentials 
     host="${repo.host}"
     realm="${repo.realm}" 
     username="${repo.username}" 
     passwd="${repo.password}"
If you want to ivy:publish to a custom port you have to configure the port like that:
repo.protocoll=http
repo.host=localhost
repo.port=8082
repo.realm=Sonatype Nexus Repository Manager
repo.username=admin
repo.password=admin123

 and a credentialsobject like that:
<credentials 
     host="${repo.host}"
     port="${repo.port}"
     realm="${repo.realm}" 
     username="${repo.username}" 
     passwd="${repo.password}"
Hope that will save you some time!

Keine Kommentare:

Kommentar veröffentlichen