4

I would like to create a web project using Maven 2 + Struts 1. Would someone provide me some tutorial or a website outlining the steps? Thank you. ;)

Tom11
  • 2,419
  • 8
  • 30
  • 56
Mercer
  • 9,736
  • 30
  • 105
  • 170

3 Answers3

3

In case you need additional information on obtaining the struts-archetype-blank archetype:

Step #1

The struts-archetype-blank archetype is no longer in the default Maven2 repository. Therefore you have to check it out manually from http://svn.apache.org/repos/asf/struts/maven/trunk/struts-archetype-blank.

Step #2

Build the struts-archetype-blank-1.3.5-SNAPSHOT.jar file: mvn install.

Step #3

Install the archetype:

mvn install:install-file
    -DgroupId=org.apache.struts
    -DartifactId=struts-archetype-blank
    -Dversion=1.3.5-SNAPSHOT
    -Dpackaging=jar
    -Dfile=struts-archetype-blank-1.3.5-SNAPSHOT.jar

Step #4

Create your Struts1 Maven2 project (as Pascal Thivent pointed):

mvn archetype:create
    -DarchetypeGroupId=org.apache.struts
    -DarchetypeArtifactId=struts-archetype-blank
    -DarchetypeVersion=1.3.5-SNAPSHOT
    -DgroupId=com.example
    -DpackageName=com.example.projectname
    -DartifactId=my-webapp

Good Luck!

JSN
  • 1,247
  • 1
  • 11
  • 12
2

There is a Struts 1 Blank Archetype for Maven 2:

$ mvn archetype:create                                \
      -DarchetypeGroupId=org.apache.struts            \
      -DarchetypeArtifactId=struts-archetype-blank    \
      -DarchetypeVersion=1.3.5                        \
      -DgroupId=com.example                           \
      -DpackageName=com.example.projectname           \
      -DartifactId=my-webapp
Pascal Thivent
  • 562,542
  • 136
  • 1,062
  • 1,124
0

Are you searching for a tutorial on Maven 2 or on Struts ? mvn archetype:generate should be your friend. Take a look into the docs about archetype.

khmarbaise
  • 92,914
  • 28
  • 189
  • 235