Reputation: 49077
I am pretty new to Maven and I have the following question when I shall:
Build a web application (Java EE 6) and use web-services. If I use one of the maven arcetypes I get a src/java/main & src/java/test and a web app folder. This is packaged as a WAR, but can I use webservice API when the package is WAR? How do you use Maven when you want to use all API's and create a web app?
Upvotes: 0
Views: 2484
Reputation: 6173
Not sure I'd I understand your question, but the archetype you use to create the project is of no importance. It is a simple way to create some of the artifacts that is needed. If you want to use Webservices add the appropriate dependencies (most likely scoped as 'provided' since your container will already supply the implementation.
If you package it as a WAR you will not be able to use the full EE stack (only servlets) unless you're deploying to a EE6 compliant application server. If you want to use EJBs and REsource Adapters you need to package it as an EAR (EJB supported in WAR as o EE6 as mentioned above).
I think there is an archetype for a "full" EE application as well if you want more modules and packaging :)
Hope it helps.
Upvotes: 2