ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From CalvinJ <>
Subject 2.0.0rc2 HTTP Authentication For Publishing Not Working
Date Thu, 22 Jan 2009 00:56:07 GMT

I'm hoping some kind person can help answer my question in regards to Ivy and
HTTP authentication when publishing. I'm using Ivy 2.0.0rc2. I believe I've
followed all the instructions correctly, but I can't get HTTP authenication
to work when publishing my artifacts.  I sat the commons-httpclient3.1.jar
on my classpath as instructed and verified it's on the Ant classpath by
seeing the classpath setting in Ant debug mode:


I've tried adding the <credentials tag in both my build.xml using
<ivy:settings and in my ivysettings.xml file and neither way seems to work. 
See below:

<target name="main"
  <ivy:settings id="ivy.settings">
    <credentials host="" username="calvin" passwd="mypassword"/>
  <ivy:retrieve pattern="${lib.dir}/[conf]/[artifact]-[revision].[ext]"
<target name="deploy" depends="main">
  <ivy:publish resolver="my-snapshot-repo"
pubrevision="${ivy.deliver.revision}" forcedeliver="true" overwrite="true"
update="true" conf="runtime" status="milestone" settingsRef="ivy.settings" >
    <artifacts pattern="target/[module]-[revision].[ext]" />
    <artifacts pattern="target/[module]-[revision]-api.[ext]" />
  <settings defaultResolver="my-chain" />
  <credentials host="" username="calvin" passwd="mypassword"/>

    <chain name="my-chain">
      <url name="my-snapshot-repo" m2compatible="true">
      <ibiblio root="${ibiblio-maven2-root}"  m2compatible="true"/>

And yet I get the following error: Access to URL
com/mycompany/app/1.1.6-SNAPSHOT/ was refused by the
server: Authentication is required.
Notice it's using the BasicURLHandler instead of the HttpClient one. When
looking at the source code for URLHandlerRegistry, none of the verbose
messages (e.g., jakarta commons httpclient) are printed out.

Also, in Ant debug mode, my credentials look like they're being picked up by
Ivy. I see the following printed out:
credentials added: calvin/********
credentials added: snapshots@ calvin/********

Any help or suggestions would be appreciated. Thanks.
View this message in context:
Sent from the ivy-user mailing list archive at

View raw message