Maven Archetype

Document how to generate a project from archetype with authenticated repository

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.0-alpha-4
  • Fix Version/s: 2.0
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

When the archetypes are in a password protected repository you can't download the archetype unless repository authentication information is specified in the settings.xml file, as follows:

<server>
  <id><archetype name>-repo</id>
  <username>myuser</username>
  <password>XXXXXX</password>
  <filePermissions>664</filePermissions>
  <directoryPermissions>775</directoryPermissions>
  <configuration></configuration>
</server>

And the command should be invoked with the archetypeRepository option as follows:

mvn archetype:generate -DarchetypeGroupId=mygroup \
-DarchetypeArtifactId=<archetype-name> \
-DarchetypeVersion=XXXXX -DgroupId=com.abc \
-DartifactId=dummy \
-Dversion=1.0.0-SNAPSHOT \
-DarchetypeRepository=http://www.abc.com/maven2

Issue Links

Activity

Hide
Marcello Teodori added a comment -

there should be also an option to specify the repositoryId explicitly, I wouldn't want to add a temporary entry in settings.xml every time I download a new archetype... also archetype name means archetypeArtifactId?

Show
Marcello Teodori added a comment - there should be also an option to specify the repositoryId explicitly, I wouldn't want to add a temporary entry in settings.xml every time I download a new archetype... also archetype name means archetypeArtifactId?
Hide
Herve Boutemy added a comment -

Marcello: see ARCHETYPE-204

Show
Herve Boutemy added a comment - Marcello: see ARCHETYPE-204
Hide
Herve Boutemy added a comment -

FAQ entry added in r1024429

Show
Herve Boutemy added a comment - FAQ entry added in r1024429

People

Vote (2)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: