Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Java EE 7 Maven Archetype

DZone's Guide to

Java EE 7 Maven Archetype

· Java Zone ·
Free Resource

Bring content to any platform with the open-source BloomReach CMS. Try for free.

For those of us doing Java EE development with Maven (which by my own account as a former consultant is pretty much all Java EE/GlassFish adopters), Archetypes can be a great productivity boost, especially while getting started. You will be pleased to know that there is already a Java EE 7 Maven Archetype out there in the https://nexus.codehaus.org/content/repositories/snapshots/ repository (courtesy of GlassFish of course).

You can use it directly from the Maven command-line like so:

mvn -DarchetypeGroupId=org.codehaus.mojo.archetypes 

    -DarchetypeArtifactId=webapp-javaee7 

    -DarchetypeVersion=0.3-SNAPSHOT 

    -DarchetypeRepository=https://nexus.codehaus.org/content/repositories/snapshots/ 

    -DgroupId=your_group_id 

    -DartifactId=your_artifact_id 

    -Dversion=your_version

    -Dpackage=your_package

    -Darchetype.interactive=false 

    --batch-mode 

    --update-snapshots 

    archetype:generate

If you prefer NetBeans, you can do that too. Just define a new repository with the URL https://nexus.codehaus.org/content/repositories/snapshots/ under "Maven Repositories" on the "Services" tab. Then proceed to "New Project -> Maven -> Project from Archetype" and enter "webapp-javaee7" into the search box. Select the 0.1-SNAPSHOT and click "Finish".

Either way, once the project is generated, you can of course tweak the POM and source code to meet your needs. It should be pretty straightforward - give me a shout if you need help getting started. Happy hacking!

 

BloomReach CMS: the API-first CMS of the future. Open-source & enterprise-grade. - As a Java developer, you will feel at home using Maven builds and your favorite IDE (e.g. Eclipse or IntelliJ) and continuous integration server (e.g. Jenkins). Manage your Java objects using Spring Framework, write your templates in JSP or Freemarker. Try for free.

Topics:

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}