ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Marks <topher1...@gmail.com>
Subject Newbie credentials problems
Date Mon, 13 Apr 2009 04:06:06 GMT
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"

This looks like an authorization error, but I think it's an authentication
error.  I can use the account through the web interface to deploy a jar
file.

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]<http://localhost/artifactory/libs-snapshots-local/%5Borganization%5D/%5Bmodule%5D/%5Brevision%5D/%5Bartifact%5D-%5Brevision%5D.%5Bext%5D>"
/>
        </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.  Somewhere I read
that if I use credentials, I should add Commons HttpClient to my executing
classpath.  I've added HttpClient 3.1, but still no luck.

Thoughts on what I'm doing wrong or need to change?

Thanks in advance,
Topher

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message