When I was trying to figure out how to deploy to Nexus I had to use curl to see what was going on. It turned out I needed to use something like <ivy:configure realm="Sonatype Nexus Repository Manager" ...>
HTH, Matt --- On Fri, 4/10/09, Chris Marks <[email protected]> wrote: > From: Chris Marks <[email protected]> > Subject: Newbie credentials problems > To: [email protected] > Date: Friday, April 10, 2009, 4:39 PM > Hi all, > I'm having some issues trying to publish an artifact to a > local Artifactory > repository and need a bit of help understanding how to > apply credentials for > deployment. I've set up Artifactory to allow > anonymous retrieve, but > requires a user account to deploy an artifact. > The result of my publish target in my ant build script is: > "Access to URL > http://localhost/artifactory/libs-snapshots-local/com/mycompany/sers-client/1.1.0/sers-client-1.1.0.jarwas > refused by the server: Unauthorized" > > My settings file looks like: > <ivysettings> > <settings defaultResolver="mainChain" > /> > <include > url="${ivy.default.settings.dir}/ivysettings-local.xml" > /> > <credentials host="localhost" > username="user" passwd="password"/> > <resolvers> > <url > name="publish_artifactory" m2compatible="true"> > <artifact > > pattern=" > http://localhost/artifactory/libs-snapshots-local/[organization]/[module]/[revision]/[artifact]-[revision].[ext]" > /> > </url> > </resolvers> > </ivysettings> > > The contents of my ant publish target is: > > <ivy:publish resolver="publish_artifactory" > pubrevision="${project.version}" > update="true"> > <artifacts > pattern="${dist.packageDir}/[artifact].[ext]" /> > </ivy:publish> > > Within Artifactory, it shows the account I'm using has > deploy permissions on > the repository. > > I'm using Ivy 2.1.0 rc1. The documentation for the > credentials element > doesn't give an example, and all of the general examples > don't seem to show > a private repository other than on the local file system. > > Thoughts on what I'm doing wrong or need to change? > > Thanks in advance, > Topher >
