Installation
Step 1 (download):
Download the file javaee5-maven-archetype-1.0.jar
Step 2 (install in local repo):
Run:
mvn install:install-file -Dfile=javaee5-maven-archetype-1.0.jar -DgroupId=pl.piotrsorobka.maven -DartifactId=javaee5-maven-archetype -Dversion=1.0 -Dpackaging=jar -DgeneratePom=true
Using the archetype
Run:
mvn archetype:create -DarchetypeGroupId=pl.piotrsorobka.maven -DarchetypeArtifactId=javaee5-maven-archetype -DarchetypeVersion=1.0 -DgroupId=your.group.id -DartifactId=project-name
Deploy on Glassfish
Step 1:
Set environment variable GLASSFISH_HOME, pointing to your Glassfish installation folder. Alternatively, point <glassfishDirectory></glassfishDirectory> in your main pom.xml to your Glassfish installation folder.
Step 2:
Inside your project main folder run:
mvn clean install
and after:
mvn -f ear/pom.xml glassfish:deploy
If your Glassfish settings are default it will deploy the ear.