The new TomEE release will bring a new Maven archetype to quickly start a new web project with TomEE.
Here are the maven needed info:
- groupId: org.apache.openejb.maven
- artifactId: tomee-webapp-archetype
- version: 1.0.1
This is the first version and can still be improved but currently here what you’ll basically get:
- pom.xml:
- JavaEE API in scope provided
- right Arquillian dependencies for either OpenEJB embedded or TomEE Remote commented + surefire plugin up to date to avoid issues with arquillian – that’s commented by default
- tomee-maven-plugin
- maven war plugin configured to not need web.xml
- A sample servlet (@WebServlet)
- An empty beans.xml to activate CDI by default
So currently it is pretty simple but once the project is created you can run:
mvn package tomee:run
and go to the url: http://localhost:8080/%5BartifactId%5D-%5Bversion%5D/index
The archetype will probably be a bit reworked to get some JPA, JSF features pretty soon.
If you think to some particular needs feel free to contribute either a patch or another artifact on TOMEE jira project.
A sample persistence.xml would be beneficial too
Yes totally,
added it since some users asked for tomee maven plugin quickstart sample but on trunk we just got a jsf crud archetype 🙂