Reputation: 6939
I'm new to Maven, but are looking for a maven-based Java EE 6 project. So far, I played around with the Java EE 6 maven archetypes provided from weld and knappsack. They seem to be quite good if you want to go fullstack (jsf, ejb, cdi, jpa).
In my case, I have a pure server-side Java EE 6 application packaged in a war, so only backend (ejb, cdi, jpa), but no frontend at all, in other words, I don't have a web application.
Do I nevertheless start from an archetype like stated above and delete some webapp stuff or is there an archetype around for creating a pure backend Java EE 6 application?
I searched for quite a while, but wasn't able to find something. Any help is very much appreciated.
Upvotes: 1
Views: 2575
Reputation: 76709
Do I nevertheless start from an archetype like stated above and delete some webapp stuff
I would recommend doing this, if you need to manage your own dependencies without relying on an archetype to specify it for you. I've noticed that starting with a plain Maven project and adding dependencies where needed and specifying the packaging, is better than relying on an archetype. Often, it is better to know your dependencies in the compile, test and provided scopes; an archetype might help you get started, but the very nature of Java EE projects will require you to be knowledgeable about what other projects you would depend on.
or is there an archetype around for creating a pure backend Java EE 6 application?
Yes, I presume you might be interested in the ejb-javaee6
or the webapp-javaee6
archetypes. It might be necessary to specify the packaging as WAR in your POM, especially for the ejb-javaee6
archetype.
Upvotes: 3