1 2 Previous Next 17 Replies Latest reply on Jul 30, 2009 3:44 AM by Alexander Lengson

    Using JBoss Tools in Maven projects

    Alexander Lengson Newbie

      Hello All,

      I wonder whether this is possible to configure project in Eclipse for running and debugging code on JBoss server if project itself is managed by Maven?

      Using pure Maven means (without applying JBoss AS Tools) wastes the time: each minor fix in any EJB requires the EAR to be rebuilt fully and redeployed on the server.

      The goal is to be able to edit and debug server-side code in Eclipse in design time [using JBoss AS Tools] while still having ability to build the whole project by Maven for release.

      The trouble is that Maven exposes some requirements to the structure of the project:
      * location of source and target files (they all may be changed, but this is not the best idea for maven projects) For example, location of java files is not /ejbModule (as AS Tools suggests usually), but /src/main/java
      * eclipse .project file is generated automatically by maven plugin based on pom.xml (project object model, maven main descriptor). Although, Maven plugin does not produce J2EE Eclipse project. Generated project does not contain 'Project Facets' in Project Properties (neither natures nor builders inside .project). Thus JBoss Server Manager Reference Guide http://docs.jboss.org/tools/3.0.1.GA/en/as/html/index.html is hardly applied.
      Manual editing .project file like here: http://greatwebguy.com/programming/eclipse/converting-a-java-project-to-a-dynamic-web-project-in-eclipse/ could help adding facets, but this is awkward solution since it has to be done each time after project's source code is checked out from repository and .project file is generated for eclipse.


      Thanks,
      Alex.

        1 2 Previous Next