One of the most wanted feature requests for our tooling is Maven integration/support for our projects, such as Seam.
Unfortunately we won't be able to add 'automatic' maven support in the upcoming JBoss Tools 3 release, but we have though started on doing the preparations to do so in a following release.
The biggest part of supporting Maven is that actual runtimes (i.e. Seam, Hibernate, the various specs involved etc.) is now fully
mavenized and the other part is that m2eclipse have matured greatly the last few months so it is now possible to combine Eclipse WTP projects with Maven without having your head explode too often.
To illustrate how well these things work together today without any additional features from JBoss Tools Snjezana Peco made a few screencasts of how to use the examples she made available through JBoss Tools 'Project Example' functionality which are Seam projects that work with the Maven support m2eclipse offers.
- Eclipse 3.4 with JBoss Tools 3 or Developer Studio 2 (CR2 or latest release works with this)
- JBoss AS 4.2, EAP 4.3 or AS 5 GA (the example work with either)
- Seam 2.1.1 GA
- A recent m2eclipse, from Sonatype's updatesite
The following two screencasts Snjezana recorded shows how it works:
Screencast #1: Installing m2eclipse and get the Seam/Maven project example
- Snjezana starts of with showing JBoss Developer Studio 2 (you can use JBoss Tools too, just requires a bit more typing/manual configuration)
- Shows where Seam and AS is configured
- Goes to Help > Software Updates to install m2eclipse from their update site
- Selects Maven Integration, Doxia editor and Maven Integration for WTP under Maven Project Configurators (you can choose them all, but these are just the important ones)
- Wait's for the download and the install etc.
- When m2eclipse is installed she goes to
Project Examples, types in
mavenand selects the
Seam Booking Example - EAR mavenized - seam 2.1.21.GA
- Wait for the download and Maven getting all its dependencies
- Uses quick fix to configure the proper runtimes (i.e. jboss-seam-2.1.1.GA and JBoss 5.0 Runtime), if you had those configured from the start this step would not be needed.
- Wait for the project to compile
Screencast #2: Using the Project Example and how to deploy/use the application.
- Shows again how to get the Seam booking example via
- Show's that the project is really a Maven project and have all the Maven features enabled
- Find and marks the datasource file (-ds.xml) as Deployable so the datasource will be known to JBoss
- Add the project to server which will deploy it
- Starts the server and goes to http://localhost:8080/booking/home.seam and see the Seam project runs
There you have it - nothing more to it. A mavenized Seam project where all the features of JBoss Tools is available next to all the Maven features m2eclipse brings to the plate.
Snjezana manually adjusted the pom.xml and Seam settings in tools to get this, in upcoming versions of JBoss Tools we will make sure that you can enable this automatically on new Maven/Seam projects.
Hope you like it!
Have fun! /max