Le jeudi 30 août 2007, Craig Ryan a écrit :
> Here is an Ant build.xml snippet using maven tasks:
>
>     <artifact:remoteRepository id="my.repo"
> url="dav:http://fred:[EMAIL PROTECTED]" 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?
Did you try not to use a repository reference but directly declare the 
repository in the deploy task?
    <artifact:install-provider artifactId="wagon-webdav" 
version="1.0-beta-2"/>
    <artifact:deploy file="my.jar">
      <remoteRepository id="my.repo" url="dav:http://maven.mycompany.ie"; 
layout="default">
        <authentication username="fred" password="secret" />
      <remoteRepository>
        <pom refid="my.pom"/>
    </artifact:deploy>

Hervé
>
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to