[ https://issues.apache.org/jira/browse/ARCHETYPE-561?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bruno Borges updated ARCHETYPE-561: ----------------------------------- Description: When creating a project out of an archetype without specifying -DarchetypeVersion, the generator will use version 1.0, even though the maven-metadata.xml points to a later version. The command is the following, for a clean user local repository Maven setup: {code:java} mvn archetype:generate \ -DarchetypeGroupId='com.microsoft.azure' \ -DarchetypeArtifactId='azure-functions-archetype' \ -DgroupId='com.function.hello' \ -DartifactId='helloworld' \ -Dversion='1.0-SNAPSHOT' \ -Dpackage='com.function.hello' \ -DappName='helloworld-1554551180252' \ -B -DarchetypeCatalog=internal {code} Now, even though -DarchetypeCatalog=internal is provided, and because the archetype does not exist in the local repository, Maven does download version 1.0 of this archetype's groupId/artifactId by default, ignoring the <latest> version specified in Maven Central's maven-metadata.xml As one can see in the maven-metadata.xml [1], the latest version is 1.21 (or higher). [1] [https://repo1.maven.org/maven2/com/microsoft/azure/azure-functions-archetype/maven-metadata.xml] was: When creating a project out of an archetype without specifying -DarchetypeVersion, the generator will use version 1.0, even though the maven-metadata.xml points to a later version. The command is the following, for a clean user local repository Maven setup: {{mvn archetype:generate \}} {{ -DarchetypeGroupId='com.microsoft.azure' \}} {{ -DarchetypeArtifactId='azure-functions-archetype' \}} {{ -DgroupId='com.function.hello' \}} {{ -DartifactId='helloworld' \}} {{ -Dversion='1.0-SNAPSHOT' \}} {{ -Dpackage='com.function.hello' \}} {{ -DappName='helloworld-1554551180252' \}} {{ -B -DarchetypeCatalog=internal}} Now, even though -DarchetypeCatalog=internal is provided, and because the archetype does not exist in the local repository, Maven does download version 1.0 of this archetype's groupId/artifactId by default, ignoring the <latest> version specified in Maven Central's maven-metadata.xml As one can see in the maven-metadata.xml [1], the latest version is 1.21 (or higher). [1] [https://repo1.maven.org/maven2/com/microsoft/azure/azure-functions-archetype/maven-metadata.xml] > Plugin picks 1.0 version of archetype when versionId not specified > ------------------------------------------------------------------ > > Key: ARCHETYPE-561 > URL: https://issues.apache.org/jira/browse/ARCHETYPE-561 > Project: Maven Archetype > Issue Type: Bug > Components: Generator > Affects Versions: 3.0.1 > Reporter: Bruno Borges > Priority: Minor > > When creating a project out of an archetype without specifying > -DarchetypeVersion, the generator will use version 1.0, even though the > maven-metadata.xml points to a later version. > The command is the following, for a clean user local repository Maven setup: > {code:java} > mvn archetype:generate \ > -DarchetypeGroupId='com.microsoft.azure' \ > -DarchetypeArtifactId='azure-functions-archetype' \ > -DgroupId='com.function.hello' \ > -DartifactId='helloworld' \ > -Dversion='1.0-SNAPSHOT' \ > -Dpackage='com.function.hello' \ > -DappName='helloworld-1554551180252' \ > -B -DarchetypeCatalog=internal > {code} > Now, even though -DarchetypeCatalog=internal is provided, and because the > archetype does not exist in the local repository, Maven does download version > 1.0 of this archetype's groupId/artifactId by default, ignoring the <latest> > version specified in Maven Central's maven-metadata.xml > As one can see in the maven-metadata.xml [1], the latest version is 1.21 (or > higher). > [1] > [https://repo1.maven.org/maven2/com/microsoft/azure/azure-functions-archetype/maven-metadata.xml] -- This message was sent by Atlassian JIRA (v7.6.3#76005)