Maven Archetype
  1. Maven Archetype
  2. ARCHETYPE-206

Document how to generate a project from archetype with authenticated repository

    Details

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

      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

          Javier Diaz created issue -
          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?
          Hervé Boutemy made changes -
          Field Original Value New Value
          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 \
          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:

          {code:xml}<server>
            <id><archetype name>-repo</id>
            <username>myuser</username>
            <password>XXXXXX</password>
            <filePermissions>664</filePermissions>
            <directoryPermissions>775</directoryPermissions>
            <configuration></configuration>
          </server>{code}

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

          {noformat}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{noformat}
          Hervé Boutemy made changes -
          Fix Version/s 2.0-alpha-6 [ 14604 ]
          Hervé Boutemy made changes -
          Link This issue relates to ARCHETYPE-204 [ ARCHETYPE-204 ]
          Hide
          Hervé Boutemy added a comment -

          Marcello: see ARCHETYPE-204

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

          FAQ entry added in r1024429

          Show
          Hervé Boutemy added a comment - FAQ entry added in r1024429
          Hervé Boutemy made changes -
          Assignee Herve Boutemy [ hboutemy ]
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Hervé Boutemy made changes -
          Link This issue is related to ARCHETYPE-220 [ ARCHETYPE-220 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 09:05:55 UTC 2015 [ 1428224755734 ]
          Mark Thomas made changes -
          Workflow jira [ 12716673 ] Default workflow, editable Closed status [ 12748167 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 22:17:37 UTC 2015 [ 1428272257260 ]
          Mark Thomas made changes -
          Workflow jira [ 12953878 ] Default workflow, editable Closed status [ 12991008 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          749d 12h 28m 1 Hervé Boutemy 19/Oct/10 16:59

            People

            • Assignee:
              Hervé Boutemy
              Reporter:
              Javier Diaz
            • Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development