THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block |
---|
mvn archetype:generate -B \
-DgroupId=tutorial \
-DartifactId=tutorial \
-DarchetypeGroupId=org.apache.struts \
-DarchetypeArtifactId=struts2-archetype-blank \
-DarchetypeVersion=<version>
|
where <version> is archetype's version you want to use, eg. 2.
...
2.
...
1
...
Staging repository
If the above command will fail because of missing archetypes in central repository, you can try to use staging repository like below
Code Block |
---|
mvn archetype:generate -DarchetypeCatalog=http://people.apache.org/builds/struts/2.1.8.1<version>/m2-staging-repository/ |
or this
Code Block |
---|
mvn archetype:generate -DarchetypeCatalog=http://struts.apache.org/
|
Archetype Parameters
The -B
option runs archetype:generate
in batch mode; it avoids a prompt to confirm our settings.
...