Archetypes


Try Java EE 6 without the commitment

The latest version of the Knappsack Maven Archetypes now supports creating Java EE 6 applications for servlet containers. These projects includes configuration for core Java EE 6 technologies such as JSF, CDI, JPA and Bean Validation and can be run from the command line using the embedded Jetty and Tomcat servlet containers.

Also with this latest release, all the archetypes are available in the Central Maven Repository which means you can dive straight in and create a new Maven project using these archetypes :
Read More »

Knappsack Archetypes are now in the Maven Central Repository

I have finally got around to putting the Mavan Java EE 6 Archetypes into the Maven Central Repository. This means you no longer have to manually download and install the Archetypes, they should be available for you to use out of the box. In some cases, depending on how you are creating your projects, you may need to refresh or update your Repository indexes in the IDE before they are visible.

In Eclipse (with m2Eclipse installed), you open the Maven Repositories view, locate the Central Repository in the global repositories, and right click and select update index to make the archetypes available.

To create a new project from the command line, you can copy the following command into a script or batch file and edit it to setup your own group and archetype values.

mvn archetype:generate -DarchetypeGroupId=org.fluttercode.knappsack -DarchetypeArtifactId=jee6-sandbox-demo-archetype -DinteractiveMode=false -DarchetypeVersion=1.0.4 -DgroupId=org.application -DartifactId=sandboxdemo -Dpackage=org.application

The new version includes the archetypes for creating Java EE 6 applications in servlet containers which lets you play around with CDI, JSF, JPA, validation and other JEE 6 technologies using an embedded servlet container from the command line.

Create A New Project With Maven Archetypes

    Prerequisites

  • Install Maven

In this tutorial, we will create a new project using the Knappsack Archetypes and compile and deploy it. For this example, we will use the jee6-basic-archetype. Before you begin, you will need to have installed Maven, but you no longer need to manually install the Knappsack Archetypes as they are in the Central Maven Repository now, so you just need to make sure your index is up to date. These instructions will work for any Maven Archetype you have installed and creating new maven projects in general.
Read More »