Reputation:
I am trying to learn some Maven and especially how to create own archetypes. Then I came across the default ones provides by Maven. The archetype "org.apache.maven.archetypes:maven-archetype-archetype" looked promising.
mvn archetype:generate \
-DarchetypeGroupId=org.apache.maven.archetypes \
-DarchetypeArtifactId=maven-archetype-archetype \
-DgroupId=my.test \
-DartifactId=my-archetype \
-Dpackage=my.archetype.package \
-Dversion=1.0-SNAPSHOT
After the package was created there's a file src/main/resources/archetype-resources/pom.xml
which uses the groupId, artifactId and version I passed as a parameter with a $ in front, like this:
<groupId>$my.test</groupId>
<artifactId>$my-archetype</artifactId>
<version>$1.0-SNAPSHOT</version>
After installing it to the local repo catalog and using it to create a new Maven project based on it, it still has those dollar signs in it.
Now I am wondering: is this archetype out-dated? It's not mentioned often when you search the web. If not, what am I doing wrong?
Upvotes: 0
Views: 829
Reputation: 124
I'm sorry, i don't have some privileges such as to add a comment; that why i post this like an answer... I'm really sorry for that! I wanted to know if you are using Netbeans IDE! There is a way to create maven project with some configurations of course! But first of all; make me now if Netbeans its your IDE.
Upvotes: 0
Reputation: 336
A maven-archetype-archetype
is an archetype that contains a sample archetype. A list of provided archetypes can be found here.
I suggest using the quickstart archetype
if you are making a test archetype. This example, and this guide will help you get set it up.
I am unsure why the $
is still present in your pom.xml
though.
Upvotes: 2