Last I looked at the sources, the Archetype plugin didn't support
repositories that required authentication. The workaround I put in place
was to basically copy
org.apache.maven.archetypee.mojos.MavenArchetypeMojo and hard-code our
internal repository and repository ID into it. I'd be interested if
there was a better solution.

Justin 

-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Adrian Herscu
Sent: Sunday, September 21, 2008 3:37 AM
To: users@maven.apache.org
Subject: Re: [m2] archetype repository requires authentication

Hi Dave, and thanks for the fast reply.
I already have a settings.xml and the build works by retrieving
artifacts from the repositories defined in it.
However, the archetypes are not searched in those repositories only in
the central Maven repository :( I don't know why it does not use the
settings.xml file to query for additional repositories...
Adrian.

Dave Newton wrote:
> --- On Sat, 9/20/08, Adrian Herscu wrote:
>> I have written an archetype and deployed to my remote repository.
>> The repository requires authentication.
>> The problem is when somebody runs mvn archetype:generate ...
>> -DarchetypeRepository=http://my.repo he gets a 401 from the server 
>> and generation fails of course.
>>
>> Is there any possibility to supply credentials?
> 
> This might help, although I haven't tried it :/
> 
> http://maven.apache.org/guides/mini/guide-configuring-maven.html
> 
> See the "Security and Deployment Settings" section; it sounds like the
<server> element may do what you want.
> 
> HTH,
> Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to