[ 
https://jira.codehaus.org/browse/ARCHETYPE-460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=349184#comment-349184
 ] 

heapifyman commented on ARCHETYPE-460:
--------------------------------------

FYI, I have read: 
http://maven.apache.org/archetype/maven-archetype-plugin/faq.html#authentication

I know I can add a <server> to my settings.xml with 
<id>my-archetype-id-repo</id> and the needed username and password.

However, this is hugely impractical for 2 reasons:
1. I have to add one entry for each archetype to my settings.xml
2. Every developer needs to do that. Manually! There does not seem to be a way 
to automate this...

If archetype plugin cannot figure out the right credentials automatically, 
wouldn't it be possible to add another parameter like "archetypeRepositoryId" 
so I can pass in the correct repository ID which points to the credentials in 
settings.xml?

> archetype:generate does not use settings.xml when archetype is in repository 
> with restricted access
> ---------------------------------------------------------------------------------------------------
>
>                 Key: ARCHETYPE-460
>                 URL: https://jira.codehaus.org/browse/ARCHETYPE-460
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Generator
>    Affects Versions: 2.2
>         Environment: Apache Maven 3.2.2
> Java version: 1.8.0_05, vendor: Oracle Corporation
> Default locale: de_DE, platform encoding: Cp1252
> OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"
>            Reporter: heapifyman
>            Priority: Blocker
>
> I have an archetype deployed to an Artifactory repository with restricted 
> access.
> I have defined the <server> with <id>, <username> and <password> in my 
> settings.xml.
> When I run
> "mvn archetype:generate 
> -DarchetypeRepository=<my_artifactory_reop_with_restricted_access>"
> I get
> "Caused by: org.apache.maven.wagon.authorization.AuthorizationException: Not 
> authorized , ReasonPhrase:Unauthorized."
> Apparently, archetype:generate does not take into account the access rights 
> defined in settings.xml



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to