tags:

views:

470

answers:

1

Is there anyone have tested how to deploy artifacts within Archiva which security enabled. I have the following configuration

My ivysettings.xml

<ivysettings>
  <settings defaultResolver="archiva"/>
  <resolvers>
    <ibiblio name="archiva" 
             m2compatible="true" 
             root="http://localhost:8080/archiva/repository/internal/[organization]/[module]/[revision]/[artifact]-[revision].[ext]"/&gt;
  </resolvers>
</ivysettings>

My build.xml

<target name="ivy-init">
  <ivy:settings file="${ivy.settings.dir}/ivysettings.xml"  refid="ivy.classpath">
    <credentials host="localhost" 
      realm="Repository Archiva Managed Internal Repository"
                 username="deploy_user" passwd="deploy_pwd" />
  </ivy:settings>             
</target>

<target name="deploy2Archiva" 
      depends="jar,local-maven-version">

   <ivy:makepom ivyfile="${ivy.file}"
         pomfile="dist/demo-core.pom">
       <mapping conf="compile" scope="compile"/>
       <mapping conf="test" scope="test"/>
   </ivy:makepom>


   <ivy:publish 
    resolver="public"
    pubrevision="${version}"
    overwrite="true" 
    pubdate="${now}"
    status="release"
    forcedeliver="true"
    artifactspattern="${dist.dir}/[artifact].[ext]"/>

</target>

My Archiva deploy_user has the 'Repository Manager' Archiva role but I get an unauthorized message. In fact, the credentials doesn't seem to be into account because if I set the 'Repository Manager' to the guest Archiva user (unauthenticated user), the artifacts are deployed.

Archiva uses the protocol webdav. Have you got experimented credentials with an Ivy webdav resolver? Any thoughts on this?

A: 

The realm attribute of the credentials element seems to be case-sensitive so you may want to try using realm="Repository Archiva Managed internal Repository" (note the lower case 'i' in 'internal'!)

Lukas