Max Korn
Max Korn

Reputation: 275

Struts2 maven archetype

I'm trying to set up a Struts2 project using the struts2-archetype-blank archetype as pointed out in Struts wiki.

mvn archetype:generate -B  -DgroupId=tutorial -DartifactId=tutorial -DarchetypeGroupId=org.apache.struts -DarchetypeArtifactId=struts2-archetype-blank  -DarchetypeVersion=2.1.8

However I get the following error:

[INFO] Archetype repository missing. Using the one from [org.apache.struts:strus2-archetype-blank:2.3.8] found in catalog remote
Downloading: http://repo1.maven.org/maven2/org/apache/struts/struts2-archetype-
lank/2.1.8/struts2-archetype-blank-2.1.8.jar
[INFO] ------------------------------------------------------------------------<br/>
[INFO] BUILD FAILURE<br/>
[INFO] ------------------------------------------------------------------------<br/>
[INFO] Total time: 5.829s<br/>
[INFO] Finished at: Wed Jan 09 10:10:26 CET 2013<br/>
[INFO] Final Memory: 7M/17M<br/>
[INFO] ------------------------------------------------------------------------<br/>
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:.2:generate (default-cli) on project standalone-pom: The desired archetype does not exist <br/>(org.apache.struts:struts2-archetype-blank:2.1.8) -> [Help 1]<br/>
[ERROR]

Do I need a particular repository in my Maven config to use this archetype?

Upvotes: 0

Views: 2097

Answers (1)

Nickmancol
Nickmancol

Reputation: 1044

I think you can use just

mvn archetype:generate -B  -DgroupId=tutorial -DartifactId=tutorial -DarchetypeGroupId=org.apache.struts -DarchetypeArtifactId=struts2-archetype-blank

without

-DarchetypeVersion=2.1.8

to use the latest version available (currently 2.3.8), the 2.1.8 is not available in the central repo.

Upvotes: 1

Related Questions