Simple Features Thoughts about simple features in software development

5Sep/120

My first Maven Web Archetype

I have just made my first maven Archetype for my own Web projects.

It includes:

  • Spring MVC
  • Tiles
  • Hibernate
  • SLF4J
  • JUnit4
  • EasyMock 3

To use it you may first download the file (perroazul-webapp-archetype.rar but may not be the lastest) or get it from its Subversion repository. Once downloaded, you enter into the directory and then write mvn install. That's it.

To use it, you must type the following command:

mvn archetype:generate                                \
  -DarchetypeGroupId=net.perroazul                    \
  -DarchetypeArtifactId=perroazul-webapp-archetype    \
  -DarchetypeVersion=1.0-SNAPSHOT                     \
  -DgroupId=<your.groupid>                            \
  -DartifactId=<your-artifactId>

In case you don't realize values for groupId and artifactId, groupId is the package and artifactId is the application name. An example may be:

mvn archetype:generate                                \
  -DarchetypeGroupId=net.perroazul                    \
  -DarchetypeArtifactId=perroazul-webapp-archetype    \
  -DarchetypeVersion=1.0-SNAPSHOT                     \
  -DgroupId=net.perroazul.testapp                     \
  -DartifactId=testapp

And happy coding!

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

Trackbacks are disabled.