You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kw...@apache.org on 2024/01/29 18:26:50 UTC
(maven-archetype) branch feature/clarify-repository-server-id-for-remote-catalogs created (now a95f783f)
This is an automated email from the ASF dual-hosted git repository.
kwin pushed a change to branch feature/clarify-repository-server-id-for-remote-catalogs
in repository https://gitbox.apache.org/repos/asf/maven-archetype.git
at a95f783f [ARCHETYPE-654] Clarify used repository/server ids for catalog "remote"
This branch includes the following new commits:
new a95f783f [ARCHETYPE-654] Clarify used repository/server ids for catalog "remote"
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(maven-archetype) 01/01: [ARCHETYPE-654] Clarify used repository/server ids for catalog "remote"
Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
kwin pushed a commit to branch feature/clarify-repository-server-id-for-remote-catalogs
in repository https://gitbox.apache.org/repos/asf/maven-archetype.git
commit a95f783f9b27b96ef9e69c98b8a781606d036331
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Mon Jan 29 19:25:58 2024 +0100
[ARCHETYPE-654] Clarify used repository/server ids for catalog "remote"
---
archetype-common/src/site/apt/internal.apt | 17 ++---------------
.../mojos/CreateProjectFromArchetypeMojo.java | 18 ++++++++++++------
maven-archetype-plugin/src/site/fml/faq.fml | 10 ++++++----
3 files changed, 20 insertions(+), 25 deletions(-)
diff --git a/archetype-common/src/site/apt/internal.apt b/archetype-common/src/site/apt/internal.apt
index 18d5a59c..1461f165 100644
--- a/archetype-common/src/site/apt/internal.apt
+++ b/archetype-common/src/site/apt/internal.apt
@@ -29,18 +29,5 @@
Maven Archetype Internal Catalog
- The Archetype Plugin comes bundled with an internal catalog.
-
-* Updating the Internal Catalog
-
- The source for internal catalog is hosted in the {{{http://docs.codehaus.org/display/MAVENUSER/Archetypes+List}Archetype List}}
- page of the Maven User Wiki.
-
- This page is transformed to a catalog XML file using following command in <<<archetype-common>>> module directory:
-
-----
-mvn -P internal-catalog test
-----
-
- Then merge <<<target/archetype-catalog.xml>>> with
- {{{http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/main/resources/archetype-catalog.xml?view=markup}<<<src/main/resources/archetype-catalog.xml>>>}}.
+ The Archetype Plugin comes bundled with an internal catalog containing archetypes maintained by Apache Maven itself.
+ Its XML source is at {{{https://github.com/apache/maven-archetype/blob/master/archetype-common/src/main/resources/archetype-catalog.xml}<<<src/main/resources/archetype-catalog.xml>>>}}.
diff --git a/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/CreateProjectFromArchetypeMojo.java b/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/CreateProjectFromArchetypeMojo.java
index f82730cd..3c1bc2f9 100644
--- a/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/CreateProjectFromArchetypeMojo.java
+++ b/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/CreateProjectFromArchetypeMojo.java
@@ -91,13 +91,16 @@ public class CreateProjectFromArchetypeMojo extends AbstractMojo implements Cont
* It is a comma separated list of catalogs.
* Catalogs use the following schemes:
* <ul>
- * <li>'<code>local</code>' which is the shortcut to the local repository</li>
- * <li>'<code>remote</code>' which is the shortcut for Maven Central repository or its mirror</li>
- * <li>'<code>internal</code>' which is an internal catalog</li>
+ * <li><code>local</code> which is the shortcut to the local repository</li>
+ * <li><code>remote</code> which is the shortcut for a repository with id {@code archetype},
+ * the Maven Central repository (with id {@code central}) or the first matching mirror for either
+ * of the repository ids {@code archetype} or {@code central}</li>
+ * <li><code>internal</code> which is an <a href="https://maven.apache.org/archetype/archetype-common/internal.html">internal catalog</a></li>
* </ul>
* <p/>
- * If you want the catalogs to come from a different repository, please add the following to your
- * {@code settings.xml}
+ * If you want the catalogs to come from a different repository, please add
+ * a dedicated repository with id {@code archetype} and optionally a server section with the same id to
+ * your {@code settings.xml}
* <pre>
* <repository>
* <id>archetype</id>
@@ -111,7 +114,10 @@ public class CreateProjectFromArchetypeMojo extends AbstractMojo implements Cont
* <password>s3cr3t</password>
* </server>
* </pre>
- * If Maven Central repository catalog file is empty, <code>internal</code> catalog is used instead.
+ *
+ * In case of mirrors for either repository {@code archetype} or {@code central} the <a href="https://maven.apache.org/guides/mini/guide-mirror-settings.html">matching mirror's id</a> is also checked
+ * for server settings (like authentication).
+ * If the Maven Central repository catalog file is empty, <code>internal</code> catalog is used instead.
*/
@Parameter(property = "archetypeCatalog", defaultValue = "remote,local")
private String archetypeCatalog;
diff --git a/maven-archetype-plugin/src/site/fml/faq.fml b/maven-archetype-plugin/src/site/fml/faq.fml
index 131beaab..c4ca93e4 100644
--- a/maven-archetype-plugin/src/site/fml/faq.fml
+++ b/maven-archetype-plugin/src/site/fml/faq.fml
@@ -35,11 +35,13 @@ under the License.
</faq>
<faq id="authentication">
- <question>How to generate a project from an archetype in an authenticated repository?</question>
+ <question>How to generate a project from an archetype in a custom (potentially authenticated) repository?</question>
<answer>
- <p>The server id used to download the artifact is <code><i>[archetypeArtifactId]</i>-repo</code>: you have to
- <a href="/settings.html#Servers">define corresponding server configuration in
- <code>settings.xml</code></a> with this id.</p>
+ <p>The server/repository id used to download the artifact is <code>archetype</code>: You have to
+ <a href="/settings.html#Servers">define corresponding server configuration and repository in
+ <code>settings.xml</code></a> with this id.
+ In case of <a href="/guides/mini/guide-mirror-settings.html">mirroring</a> the mirror id of that mirror which
+ matches repository id <code>archetype</code> or <code>central</code> is used for authentication.</p>
</answer>
</faq>