maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig Ryan <craig.r...@puca.com>
Subject ant tasks webdav authentication
Date Thu, 30 Aug 2007 16:12:13 GMT
Here is an Ant build.xml snippet using maven tasks:

    <artifact:remoteRepository id="my.repo" 
url="dav:http://fred:secret@maven.mycompany.ie" layout="default"/>
    <artifact:install-provider artifactId="wagon-webdav" 
version="1.0-beta-2"/>
    <artifact:deploy file="my.jar">
        <remoteRepository refid="my.repo" />
        <pom refid="my.pom"/>
    </artifact:deploy>

the above works fine, and does a PUT of my jar into my company maven2 
repo. The following however does not
work. Note: this time I don't specify username:password in the 
repository URL, instead I use an <authentication> tag.

    <artifact:remoteRepository id="my.repo" 
url="dav:http://maven.mycompany.ie" layout="default">
        <authentication username="fred" password="secret" />
    </artifact:remoteRepository>
    <artifact:install-provider artifactId="wagon-webdav" 
version="1.0-beta-2"/>
    <artifact:deploy file="my.jar">
        <remoteRepository refid="my.repo" />
        <pom refid="my.pom"/>
    </artifact:deploy>

The authentication tag seems to be ignored this time, no auth headers 
are sent and the PUT fails with a 401.
Can someone please explain why this doesn't work?

The above example is highly simplified, in my build system I'd prefer to 
user authentication tags instead of embedding
auth data in the repository url if possible, and also I'm basically 
curious ;-)

thanks,
craig.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message