Have you granted the guest account in Archiva read permission to every 
repository? 

-----Original Message-----
From: Burkhardt Stefan (CI/TMP) [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 13, 2008 9:56 AM
To: [EMAIL PROTECTED]
Subject: AW: AW: Re: Ivy with archiva

Hi,

Thanks for the reply. Yes I tried it without the port settings as you 
suggested. But with the same result. 
Here is the output (just a part) from the console (in debug mode).

Overriding previous definition of reference to ivy.resolved.report Adding 
reference: ivy.resolved.report Overriding previous definition of reference to 
ivy.resolved.configurations.ref Adding reference: 
ivy.resolved.configurations.ref Overriding previous definition of reference to 
ivy.resolved.descriptor Adding reference: ivy.resolved.descriptor Overriding 
previous definition of reference to 
ivy.resolved.report.com.artefactGroup.tmp-util
Adding reference: ivy.resolved.report.com.artefactGroup.tmp-util
Overriding previous definition of reference to 
ivy.resolved.descriptor.com.artefactGroup.tmp-util
Adding reference: ivy.resolved.descriptor.com.artefactGroup.tmp-util
Overriding previous definition of reference to 
ivy.resolved.configurations.ref.com.artefactGroup.tmp-util
Adding reference: ivy.resolved.configurations.ref.com.artefactGroup.tmp-util
Overriding previous definition of property "ivy.organisation"
Setting project property: ivy.organisation -> com.artefactGroup setting 
'ivy.organisation' to 'com.artefactGroup'
Overriding previous definition of property "ivy.module"
Setting project property: ivy.module -> tmp-util setting 'ivy.module' to 
'tmp-util'
Overriding previous definition of property "ivy.revision"
Setting project property: ivy.revision -> 0.5-SNAPSHOT setting 'ivy.revision' 
to '0.5-SNAPSHOT'
Overriding previous definition of property "ivy.deps.changed"
Setting project property: ivy.deps.changed -> false setting 'ivy.deps.changed' 
to 'false'
Overriding previous definition of property "ivy.resolved.configurations"
Setting project property: ivy.resolved.configurations -> 
package,provided,compile,compile-test,run-test,all
setting 'ivy.resolved.configurations' to 
'package,provided,compile,compile-test,run-test,all'
Overriding previous definition of property "ivy.resolved.file"
Setting project property: ivy.resolved.file -> C:\svn\trunk\su\TMPUtil\ivy.xml 
setting 'ivy.resolved.file' to 'C:\svn\trunk\su\TMPUtil\ivy.xml'
Overriding previous definition of property "ivy.version"
Setting project property: ivy.version -> 2.0.0-rc1 parameter found as attribute 
value: ivy.organisation=com.artefactGroup
parameter found as attribute value: ivy.module=tmp-util parameter found as 
attribute value: ivy.revision=0.5-SNAPSHOT parameter not found: 
ivy.deliver.branch parameter not found: ivy.deliver.revision parameter found as 
ivy variable: ivy.status=integration
:: publishing :: com.artefactGroup#tmp-util
        validate = false
post 1.3 ivy file: using exact as default matcher
authentication: k='Repository Archiva Managed internal [EMAIL PROTECTED]' 
c='null'
C:\svn\trunk\su\TMPUtil\build.xml:216: impossible to publish artifacts for 
com.artefactGroup#tmp-util;0.5-SNAPSHOT: java.io.IOException: Access to URL 
http://archivaHost:8084/archiva/repository/internal/com/artefactGroup/tmp-util/0.5-SNAPSHOT/tmp-util.pom
 was refused by the server: Unauthorized
        at org.apache.ivy.ant.IvyPublish.doExecute(IvyPublish.java:318)
        at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.GeneratedMethodAccessor100.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
        at 
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at 
org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:277)
        at 
org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:460)
        at 
org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
Caused by: java.io.IOException: Access to URL 
http://archivaHost:8084/archiva/repository/internal/com/artefactGroup/tmp-util/0.5-SNAPSHOT/tmp-util.pom
 was refused by the server: Unauthorized
        at 
org.apache.ivy.util.url.AbstractURLHandler.validatePutStatusCode(AbstractURLHandler.java:63)
        at 
org.apache.ivy.util.url.BasicURLHandler.upload(BasicURLHandler.java:232)
        at 
org.apache.ivy.util.url.URLHandlerDispatcher.upload(URLHandlerDispatcher.java:81)
        at org.apache.ivy.util.FileUtil.copy(FileUtil.java:140)
        at 
org.apache.ivy.plugins.repository.url.URLRepository.put(URLRepository.java:85)
        at 
org.apache.ivy.plugins.repository.AbstractRepository.put(AbstractRepository.java:130)
        at 
org.apache.ivy.plugins.resolver.RepositoryResolver.put(RepositoryResolver.java:219)
        at 
org.apache.ivy.plugins.resolver.RepositoryResolver.publish(RepositoryResolver.java:209)
        at 
org.apache.ivy.core.publish.PublishEngine.publish(PublishEngine.java:282)
        at 
org.apache.ivy.core.publish.PublishEngine.publish(PublishEngine.java:261)
        at 
org.apache.ivy.core.publish.PublishEngine.publish(PublishEngine.java:170)
        at org.apache.ivy.Ivy.publish(Ivy.java:600)
        at org.apache.ivy.ant.IvyPublish.doExecute(IvyPublish.java:299)
        ... 16 more
--- Nested Exception ---
java.io.IOException: Access to URL 
http://archivaHost:8084/archiva/repository/internal/com/artefactGroup/tmp-util/0.5-SNAPSHOT/tmp-util.pom
 was refused by the server: Unauthorized
        at 
org.apache.ivy.util.url.AbstractURLHandler.validatePutStatusCode(AbstractURLHandler.java:63)
        at 
org.apache.ivy.util.url.BasicURLHandler.upload(BasicURLHandler.java:232)
        at 
org.apache.ivy.util.url.URLHandlerDispatcher.upload(URLHandlerDispatcher.java:81)
        at org.apache.ivy.util.FileUtil.copy(FileUtil.java:140)
        at 
org.apache.ivy.plugins.repository.url.URLRepository.put(URLRepository.java:85)
        at 
org.apache.ivy.plugins.repository.AbstractRepository.put(AbstractRepository.java:130)
        at 
org.apache.ivy.plugins.resolver.RepositoryResolver.put(RepositoryResolver.java:219)
        at 
org.apache.ivy.plugins.resolver.RepositoryResolver.publish(RepositoryResolver.java:209)
        at 
org.apache.ivy.core.publish.PublishEngine.publish(PublishEngine.java:282)
        at 
org.apache.ivy.core.publish.PublishEngine.publish(PublishEngine.java:261)
        at 
org.apache.ivy.core.publish.PublishEngine.publish(PublishEngine.java:170)
        at org.apache.ivy.Ivy.publish(Ivy.java:600)
        at org.apache.ivy.ant.IvyPublish.doExecute(IvyPublish.java:299)
        at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.GeneratedMethodAccessor100.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
        at 
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at 
org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:277)
        at 
org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:460)
        at 
org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)


I think the relevant part is:
authentication: k='Repository Archiva Managed internal [EMAIL PROTECTED]' 
c='null'

Do I miss something in my configuration.
Stefan

-----Ursprüngliche Nachricht-----
Von: Maarten Coene [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 11. November 2008 22:26
An: [EMAIL PROTECTED]
Betreff: Re: AW: Re: Ivy with archiva

Stefan,

it's not clear from your answer, but did you try to omit the port when 
declaring the credentials?

<ivy:settings file="./ivysettings.xml">
    <credentials host="archivaHost" realm="Repository Archiva Managed Internal 
Repository" username="upload" passwd="upload2" /> </ivy:settings>

If that doesn't work as well, could you post the log you get on your console 
when running in verbose mode?

Maarten




----- Original Message ----
From: Burkhardt Stefan (CI/TMP) <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Sent: Tuesday, November 11, 2008 9:19:45 AM
Subject: AW:  Re: Ivy with archiva

Hi Tom,

Thanks for your answer. I tried to the same with the URL-Resolver. 
Unfortunately with the same result.
Any other idea?

Stefan



-----Ursprüngliche Nachricht-----
Von: news [mailto:[EMAIL PROTECTED] Im Auftrag von Tom Widmer
Gesendet: Montag, 10. November 2008 16:43
An: [EMAIL PROTECTED]
Betreff: Re: Ivy with archiva

Burkhardt Stefan (CI/TMP) wrote:
> Hi,
> 
> I try to upload an artefact to archiva. I always get an exception
> (Unauthorized) when I have to use Basic Authentication. (The 
> http-client.jar is in the classpath) Before I try to publish the 
> artefact I set the Authentication parameters within Ivy:
> Build file:
>         <ivy:settings file="./ivysettings.xml">
>                 <credentials host="archivaHost:archivaPort"

You could try leaving the port out of host, e.g. host="archivaHost". 
Looking at my local setup, that's what I've done to access our TeamCity build 
server's repository (despite the port being something strange like 8070).

> realm="Repository Archiva Managed Internal Repository" username="upload"
> passwd="upload2" />
>         </ivy:settings>
>         <ivy:publish organisation="${organisation}" module="${module}"
> revision="${version}" resolver="chained"
> artifactspattern="dist/[artifact]-[revision].[ext]" overwrite="true"
> validate="false" publishivy="false"/>
> 
> Ivy-settings:
>     <resolvers>
>         <chain name="chained" returnFirst="true">
>             <ibiblio name="local"
> root="archivaHost:archivaPort/archiva/repository/internal/"
> m2compatible="true"/>

According to
http://ant.apache.org/ivy/history/latest-milestone/resolver/ibiblio.html
ibiblio doesn't support publishing. Apparently URL does though: 
http://ant.apache.org/ivy/history/latest-milestone/resolver/url.html

Hope that helps.

Tom


      

-----------------------------------------
====================================================
This message contains PRIVILEGED and CONFIDENTIAL
information that is intended only for use by the 
named recipient. If you are not the named recipient,
any disclosure, dissemination, or action based on 
the contents of this message is prohibited. In such
case please notify us and destroy and delete all 
copies of this transmission.  Thank you.
====================================================

Reply via email to