In this post I’ll show you how to create a new Java EE 8 project using an archetype created by me. This archetype is on Maven Central and is an archetype to create a WAR project with the following classes and dependencies.
Dependencies:
- Java EE 8.0
- JUnit 3.8.1
- log4j-core 2.11.1
Classes:
- JobBusiness: An example of Business Object that contains the business logic of Job.
- Dao: An example of abstract DAO class.
- JobDao: An example of DAO to Job using JPA.
- Entity: An example of abstract entity.
- Job: An example of entity to mapping Job with JPA
- JobResource: An example of JAX-RS Resource.
To use this archetype run the following maven command:
mvn archetype:generate -DarchetypeGroupId=net.rhuanrocha -DarchetypeArtifactId=javaee8-war-archetype -DarchetypeVersion=1.0.2 -DgroupId=<new project Group Id> -DartifactId=<new project artifact Id>
After running this command, the project will be created on your current folder.
Leave a Reply