Burkhardt Stefan (CI/TMP) wrote:
Hi,
I try to upload an artefact to archiva. I always get an exception
(Unauthorized) when I have to use Basic Authentication. (The
http-client.jar is in the classpath)
Before I try to publish the artefact I set the Authentication parameters
within Ivy:
Build file:
<ivy:settings file="./ivysettings.xml">
<credentials host="archivaHost:archivaPort"
You could try leaving the port out of host, e.g. host="archivaHost".
Looking at my local setup, that's what I've done to access our TeamCity
build server's repository (despite the port being something strange like
8070).
realm="Repository Archiva Managed Internal Repository" username="upload"
passwd="upload2" />
</ivy:settings>
<ivy:publish organisation="${organisation}" module="${module}"
revision="${version}" resolver="chained"
artifactspattern="dist/[artifact]-[revision].[ext]" overwrite="true"
validate="false" publishivy="false"/>
Ivy-settings:
<resolvers>
<chain name="chained" returnFirst="true">
<ibiblio name="local"
root="archivaHost:archivaPort/archiva/repository/internal/"
m2compatible="true"/>
According to
http://ant.apache.org/ivy/history/latest-milestone/resolver/ibiblio.html
ibiblio doesn't support publishing. Apparently URL does though:
http://ant.apache.org/ivy/history/latest-milestone/resolver/url.html
Hope that helps.
Tom