5 Replies Latest reply on Mar 3, 2011 12:11 PM by Snjezana Peco

    Maven + m2eclipse + WTP

    Leandro Iriarte Newbie

      I had a project working without maven and now I'm trying to add it. There are some tutorials around but I couldn't find a complete one.

       

      I could handle the dependencies stuff (specially the transitive ones) with exclusions. I also could handle the WTP integration with m2eclipse.

       

      However, I would like to know the correct way to integrate the server handler from jboss studio to maven build/package, because I' doing something wrong.

       

      For instance, maven will generate a folder like /target/myProject-1.0 with the compiled code, and depending the project type:

       

      *) WAR project: generates  /target/myProject-1.0/WEB-INF/lib/*.jar   (therefore no more jars inside lib folder in the source code)

      *) EAR project: generates /target/myProject-1.0/ with WAR, EJB and *.jars files inside. (therefore no more jars in EarContent folder in the source code)

       

      My questions are:

       

      1) How should I configure eclipse to synchronize the code that maven generates and the jars that maven move to the appropriate place with the runtime environment, in order to run the server correctly?

       

      2) Should I change the assembly point in all the projects? For instance:

       

         A) Change "/ <-- WebContent" for "/ <-- /target/myProject-1.0/"  (WAR project)

         B) Change "/ <-- EarContent" for "/ <-- /target/myProject-1.0-ear/"  (EAR project)

         C) What about the EJB ?

       

      3) Should I do anything else?

       

      Many thanks, Leandro.