You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Greg Thomas <gr...@gmail.com> on 2012/02/17 12:37:01 UTC

Specifying credentials with archetype:generate

If I have a Maven repo that requires authentication, how do I specify
the credentials for that repo when using mvn archetype:generate?

You can specify the URL of the repo using the archetypeRepository
parameter - but I can see no way of tying that up that up with the
credentials specified in settings.xml that is used to supply
credentials. The <server> tag in settings.xml doesn't take a URL, and
archetype:generate doesn't take a server id.

As a result, I can't generate a new project from an archetype in a
password protected repo, as I just get 401 unauthorised.

Thanks for any advice,

Greg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Specifying credentials with archetype:generate

Posted by Greg Thomas <gr...@gmail.com>.
On 17 February 2012 16:35, Matt Walsh <mw...@chartwelltechnology.com> wrote:
> From http://maven.apache.org/archetype/maven-archetype-plugin/faq.html:

Thanks. It's obvious when you know where to look, clearly my
Google-foo failed me on this one!

Greg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Specifying credentials with archetype:generate

Posted by Matt Walsh <mw...@chartwelltechnology.com>.
>From http://maven.apache.org/archetype/maven-archetype-plugin/faq.html:


How to generate a project from an archetype in an authenticated
repository?
The server id used to download the artifact is
[archetypeArtifactId]-repo: you have to define corresponding server
configuration in settings.xml with this id.


> -----Original Message-----
> From: Greg Thomas [mailto:greg.d.thomas@gmail.com]
> Sent: Friday, February 17, 2012 4:37 AM
> To: users@maven.apache.org
> Subject: Specifying credentials with archetype:generate
> 
> If I have a Maven repo that requires authentication, how do I specify
> the credentials for that repo when using mvn archetype:generate?
> 
> You can specify the URL of the repo using the archetypeRepository
> parameter - but I can see no way of tying that up that up with the
> credentials specified in settings.xml that is used to supply
> credentials. The <server> tag in settings.xml doesn't take a URL, and
> archetype:generate doesn't take a server id.
> 
> As a result, I can't generate a new project from an archetype in a
> password protected repo, as I just get 401 unauthorised.
> 
> Thanks for any advice,
> 
> Greg
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org


______________________________________________________________________
This message, including any attachments, is confidential and contains information intended only for the person(s) named above. Any other distribution, copying or disclosure is strictly prohibited. If you are not the intended recipient or have received this message in error, please notify us immediately by reply email and permanently delete the original transmission from all of your systems and hard drives, including any attachments, without making a copy.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org