ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From CalvinJ <calvin...@yahoo.com>
Subject 2.0.0rc2 HTTP Authentication For Publishing Not Working
Date Wed, 21 Jan 2009 23:56:29 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:

commons-httpclient-3.1.jar

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:

build.xml
<target name="main"
  <ivy:settings id="ivy.settings">
    <credentials host="10.50.8.24" username="calvin" passwd="mypassword"/>
  </ivy:settings>
  <ivy:retrieve pattern="${lib.dir}/[conf]/[artifact]-[revision].[ext]"
settingsRef="ivy.settings"/>
    
<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]" />
  </ivy:publish>
</target>
_________________________________________________
ivysettings.xml
<ivysettings>
  <settings defaultResolver="my-chain" />
  <credentials host="100.23.20.7" username="calvin" passwd="mypassword"/>

  <resolvers>
    <chain name="my-chain">
      <url name="my-snapshot-repo" m2compatible="true">
        <ivy
pattern="http://100.23.20.7/artifactory/libs-snapshots/[organisation]/[module]/[revision]/ivy-[revision].xml"/>
        <artifact
pattern="http://100.23.20.7/artifactory/libs-snapshots/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"/>
      </url>
      <ibiblio root="${ibiblio-maven2-root}"  m2compatible="true"/>
    </chain>
  </resolvers>

And yet I get the following error:
java.io.IOException: Access to URL
http://100.23.20.7/artifactory/libs-snapshots/
com/mycompany/app/1.1.6-SNAPSHOT/app-1.1.6-SNAPSHOT.zip was refused by the
server: Authentication is required.
        at
org.apache.ivy.util.url.AbstractURLHandler.validatePutStatusCode(AbstractURLHandler.java:73)
        at
org.apache.ivy.util.url.BasicURLHandler.upload(BasicURLHandler.java:208)
        at
org.apache.ivy.util.url.URLHandlerDispatcher.upload(URLHandlerDispatc
        
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: 100.23.20.7 calvin/********
credentials added: snapshots@100.23.20.7 calvin/********

Any help or suggestions would be appreciated. Thanks.
-- 
View this message in context: http://www.nabble.com/2.0.0rc2-HTTP-Authentication-For-Publishing-Not-Working-tp21593686p21593686.html
Sent from the ivy-user mailing list archive at Nabble.com.


Mime
View raw message