You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Angel Cervera Claudio <an...@silyan.com> on 2009/02/13 21:50:27 UTC

Access to Maven repository with user and password

Hello.
After more than two years using maven, we are trying migrate from maven
environment to ivy, so, we are novice using ivy.
Our objective is continue using  our private repository (nexus maven
repository manager), which is protected with user and password.

After several hours looking for documentation in ivy web  we give up.
What "resolver" should we use?
- ibiblio resolver doesn't admit user and password.
<ivysettings>
    <resolvers>
        <ibiblio name="public" m2compatible="true"
root="http://example.com:8083/nexus/content/groups/example-mirror"
user="username" userPassword="userpass"/>
    </resolvers>
</ivysettings>
- vfs could to be an alternative, but it's looks don't work:
<ivysettings>
    <resolvers>
        <vfs name="public">
          <artifact
pattern="http://username:userpass@example.com:8083/nexus/content/groups/example-mirror/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"
/>
        </vfs>
    </resolvers>
</ivysettings>


Thanks, everybody


Re: Access to Maven repository with user and password

Posted by Angel Cervera Claudio <an...@silyan.com>.
Maarten Coene escribió:
> Hi,
> 
> You can use the ibiblio resolver and specify your username and password in the <credentials> element of you settings.xml.
> http://ant.apache.org/ivy/history/latest-release/settings/credentials.html
Fantastic, i was confused. I understood that credentials are used to configure a lan proxy.
> 
> Maarten

> 
> 
> 
> 
> ----- Original Message ----
> From: Angel Cervera Claudio <an...@silyan.com>
> To: ivy-user@ant.apache.org
> Sent: Friday, February 13, 2009 9:50:27 PM
> Subject: Access to Maven repository with user and password
> 
> Hello.
> After more than two years using maven, we are trying migrate from maven
> environment to ivy, so, we are novice using ivy.
> Our objective is continue using  our private repository (nexus maven
> repository manager), which is protected with user and password.
> 
> After several hours looking for documentation in ivy web  we give up.
> What "resolver" should we use?
> - ibiblio resolver doesn't admit user and password.
> <ivysettings>
>     <resolvers>
>         <ibiblio name="public" m2compatible="true"
> root="http://example.com:8083/nexus/content/groups/example-mirror"
> user="username" userPassword="userpass"/>
>     </resolvers>
> </ivysettings>
> - vfs could to be an alternative, but it's looks don't work:
> <ivysettings>
>     <resolvers>
>         <vfs name="public">
>           <artifact
> pattern="http://username:userpass@example.com:8083/nexus/content/groups/example-mirror/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"
> />
>         </vfs>
>     </resolvers>
> </ivysettings>
> 
> 
> Thanks, everybody
> 
> 
>       
> 

Re: Access to Maven repository with user and password

Posted by Maarten Coene <ma...@yahoo.com>.
Hi,

You can use the ibiblio resolver and specify your username and password in the <credentials> element of you settings.xml.
http://ant.apache.org/ivy/history/latest-release/settings/credentials.html

Maarten




----- Original Message ----
From: Angel Cervera Claudio <an...@silyan.com>
To: ivy-user@ant.apache.org
Sent: Friday, February 13, 2009 9:50:27 PM
Subject: Access to Maven repository with user and password

Hello.
After more than two years using maven, we are trying migrate from maven
environment to ivy, so, we are novice using ivy.
Our objective is continue using  our private repository (nexus maven
repository manager), which is protected with user and password.

After several hours looking for documentation in ivy web  we give up.
What "resolver" should we use?
- ibiblio resolver doesn't admit user and password.
<ivysettings>
    <resolvers>
        <ibiblio name="public" m2compatible="true"
root="http://example.com:8083/nexus/content/groups/example-mirror"
user="username" userPassword="userpass"/>
    </resolvers>
</ivysettings>
- vfs could to be an alternative, but it's looks don't work:
<ivysettings>
    <resolvers>
        <vfs name="public">
          <artifact
pattern="http://username:userpass@example.com:8083/nexus/content/groups/example-mirror/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"
/>
        </vfs>
    </resolvers>
</ivysettings>


Thanks, everybody


      

Re: Access to Maven repository with user and password

Posted by Angel Cervera Claudio <an...@silyan.com>.
Garima Bathla escribió:
> I think vfs ( virtual FileSystem resolver) resolver should work if you can
> validate that the url you are providing does works
> 
> http://username:userpass@example.com:8083/nexus/content/groups/example-mirror/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]<http://username:userpass@example.com:8083/nexus/content/groups/example-mirror/%5Borganisation%5D/%5Bmodule%5D/%5Brevision%5D/%5Bartifact%5D-%5Brevision%5D.%5Bext%5D>
> 
>>>From - http://commons.apache.org/vfs/filesystems.html#HTTP%20and%20HTTPS
> http://[ *username* [: *password* ]@] *hostname* [: *port* ][ *absolute-path
> * ]
Yes, i can access and download using url in firefox or using wget command from my unix machine. :(
> 
> If you are accessing a public repository - do you really need a username and
> password? this is optional Look at common VFS documentation ( link above)
> 
I think that it's public repository because it's a private mirror of various public repositories. But i could be confused.

> Anyways if you want to use other resolvers:
> URL: http is also an option if you are using a webserver to access a
> repository location
> 
>  e.g
> <url name="two-patterns-example" m2compatible="true">
>   <ivy pattern="
> http://ivyrep.mycompany.com/[module]/[revision]/ivy-[revision].xml" />
>   <artifact pattern="
> http://ivyrep.mycompany.com/[module]/[revision]/[artifact]-[revision].[ext]"
> />
>   <artifact pattern="
> http://ivyrep.mycompany.com/[module]/[revision]/[artifact].[ext]" />
> </url>
> 
> Also I will like to disclaim that I am any expert, I am only trying to share
> my knowlege. Please feel free to correct me if it happens to be wrong.
Thanks for share.
> Regards,
> Garima.
Regards

Re: Access to Maven repository with user and password

Posted by Garima Bathla <ga...@gmail.com>.
I think vfs ( virtual FileSystem resolver) resolver should work if you can
validate that the url you are providing does works

http://username:userpass@example.com:8083/nexus/content/groups/example-mirror/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]<http://username:userpass@example.com:8083/nexus/content/groups/example-mirror/%5Borganisation%5D/%5Bmodule%5D/%5Brevision%5D/%5Bartifact%5D-%5Brevision%5D.%5Bext%5D>

>From - http://commons.apache.org/vfs/filesystems.html#HTTP%20and%20HTTPS
http://[ *username* [: *password* ]@] *hostname* [: *port* ][ *absolute-path
* ]

If you are accessing a public repository - do you really need a username and
password? this is optional Look at common VFS documentation ( link above)

Anyways if you want to use other resolvers:
URL: http is also an option if you are using a webserver to access a
repository location

 e.g
<url name="two-patterns-example" m2compatible="true">
  <ivy pattern="
http://ivyrep.mycompany.com/[module]/[revision]/ivy-[revision].xml" />
  <artifact pattern="
http://ivyrep.mycompany.com/[module]/[revision]/[artifact]-[revision].[ext]"
/>
  <artifact pattern="
http://ivyrep.mycompany.com/[module]/[revision]/[artifact].[ext]" />
</url>

Also I will like to disclaim that I am any expert, I am only trying to share
my knowlege. Please feel free to correct me if it happens to be wrong.

Regards,
Garima.

On Fri, Feb 13, 2009 at 12:50 PM, Angel Cervera Claudio <
angelcervera@silyan.com> wrote:

> Hello.
> After more than two years using maven, we are trying migrate from maven
> environment to ivy, so, we are novice using ivy.
> Our objective is continue using  our private repository (nexus maven
> repository manager), which is protected with user and password.
>
> After several hours looking for documentation in ivy web  we give up.
> What "resolver" should we use?
> - ibiblio resolver doesn't admit user and password.
> <ivysettings>
>    <resolvers>
>        <ibiblio name="public" m2compatible="true"
> root="http://example.com:8083/nexus/content/groups/example-mirror"
> user="username" userPassword="userpass"/>
>    </resolvers>
> </ivysettings>
> - vfs could to be an alternative, but it's looks don't work:
> <ivysettings>
>    <resolvers>
>        <vfs name="public">
>          <artifact
> pattern="
> http://username:userpass@example.com:8083/nexus/content/groups/example-mirror/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]<http://username:userpass@example.com:8083/nexus/content/groups/example-mirror/%5Borganisation%5D/%5Bmodule%5D/%5Brevision%5D/%5Bartifact%5D-%5Brevision%5D.%5Bext%5D>
> "
> />
>        </vfs>
>    </resolvers>
> </ivysettings>
>
>
> Thanks, everybody
>
>