1 Reply Latest reply on Sep 18, 2006 10:33 AM by Peter Johnson

    Migrating to Maven2

    Steve Dobson Newbie


      I am currently evaluating Maven2 for use in my project. So far I like what I see, and think that it is worth me switching. I have JBoss working the way I want it (with MySQL as the back end), and Ant does a good job of building my JARs and EARs.

      With maven I can create a simple project, and so long as I use only standard J2SE stuff I'm okay. But the moment I start using J2EE stuff it all goes wrong. The compiler complains that it doesn't know about .javax.ejb.EntityBean and the like. With Ant I knew how to extend the class path at build time to find JBoss's JARs that defined all that stuff, but how do I do the same thing in Maven?

      I guess what I'm really looking for is a simple "How to get started with Maven2 and JBoss" tutorial. There are some for Maven2 but when it comes to J2EE stuff they assume that you are using geronimo.

      Thanks for your help


        • 1. Re: Migrating to Maven2
          Peter Johnson Master

          I have been using Maven 2 with JBoss since around last December. The best reference I have found on Maven 2 is Better Build With Maven that you can get from http://www.mergere.com/common/reg.jsp?form_source=m-m2book&form_landing=DefaultPage. Once I got my initial set of projects set up (one for my data model, one form my EJBs, one for my web app, and a final one for the ear file), making new projects has become trivial. (I keep on promising myself to convert these into archetypes, but haven't gotten around to it).

          The biggest issue I have is the fact that many of the javax jar files are not available in the Maven 2 repository. So I always end up downloading them from Sun and manually loading them into my local repository. Once I do that, everything is fine. At least until I haul my build environment to work (or to home if I started at work) and realize I have to repeat the manual load of the jar.