How to deploy maven web project to Virgo? [message #976004] |
Thu, 08 November 2012 03:38  |
Eclipse User |
|
|
|
My challenge is to come up with a web project that can be built with maven, and deployed to Virgo. After many days of experiments I found a very cumbersome way to do it, but I hope the experts on this forum can guide me to something more practical.
What works for me today:
1) Organize the code in a typical maven way with src/main/java, src/test/java, src/main/resources, src/test/resources, but with the web configuration directly under 'WebContent', where eclipse dynamic web modules hope to find it
2) Build that code with a mvn clean install, and create an eclipse project with mvn eclipse:eclipse
3) Import that project in eclipse, and add a Virgo Bundle Facet to it
4) Deploy the bundle to Virgo (the server is not running for the time being)
5) Add a Dynamic Web Module Facet to the web bundle project
6) Remove the deployment from step 4 from the virgo server, and add the new bundle (the one with a web icon next to it, created in step 5) to the list of bundles to deploy
7) Start the server ...
My main problem is that when I leave out step 4 from the procedure above, I don't have anything to deploy in step 6. So adding the dynamic web facet somehow makes Virgo/Eclipse forget that this is a deployable bundle. WHY ????
[Updated on: Mon, 12 November 2012 02:26] by Moderator
|
|
|
Re: How to deploy maven web project to Virgo? [message #984922 is a reply to message #976004] |
Wed, 14 November 2012 22:00  |
Eclipse User |
|
|
|
As far as the tools are concerned, Virgo Tomcat supports Dynamic Web Modules 2.5 but not 3.0. So what happens when you add your web bundle to the Virgo is you're associating the project with the Virgo runtime and you're limited to all its compatible facets. If you go to the Project Facet dialog it will present Dynamic Web Module v. 2.5 as the default version to pick because anything greater won't work with Virgo.
Of course if you've never associated the bundle to Virgo, then when you go into the Project Facets dialog you'll be presented with all available facets defaulted to their latest versions, including Dynamic Web Modules v. 3.0. Selecting this facet & version combination will exclude the project from deploying to Virgo.
That dialog tries to do a decent job about maintaing compatibility across different facets & versions and runtimes, but it's not always intuitive. If you select the Runtimes button from that Details/Runtimes panel and select the "Show all runtimes" checkbox, you can attempt to manage your facets and server runtimes until you've struck a balance between them all.
|
|
|
Powered by
FUDForum. Page generated in 0.23480 seconds