Getting started

To create your first Pustefix application:

  • open a shell
  • run mvn archetype:generate -DarchetypeCatalog=http://pustefix-framework.org/repository/maven/ and select pustefix-archetype-application from the list of archetypes. You'll be promped to supply several variables to customize the application -- stick to the defaults if you're not sure about a value. (GroupId, artifactId and version are used by Maven to address your applications; the groupId is similar to a package in Java).
  • change to the newly created application directory
  • run mvn tomcat:run-war to compile and start the application
  • point your browser to http://localhost:8080/myapp where myapp is the artifactId used in the first step

Eclipse

To use Eclipse with a Pustefix application:

  • change to the application directory
  • run mvn eclipse:eclipse to generate Eclipse files for your application
  • start Eclipse
  • only the first time you're doing this: define a variable M2_REPO pointing to your/home/.m2/repository
  • choose File/New/Java Project/Create from existing source and select your application directory to open the application in eclipse.

This is the standard procedure] to open Maven projects in Eclipse.

Maven Basics

mvn clean
wipe all generated stuff
mvn compile
compile the Java sources
mvn test
compile the Java sources, tests, and run them
mvn package
comile, test, and build a war file
mvn tomcat:run-war
runs the application in an embedded Tomcat. There's also a run goal, but it doesn't work if the webapp directory is generated (as done by pustefix applications).
mvn eclipse:eclipse
generate eclipse files for your application (use whenever you changed the dependencies in pom.xml)

Hints about using Maven (like changing the HTTP port of the embedded Tomcat) are collected on MavenHelp.