3 Replies Latest reply on Aug 23, 2007 2:23 AM by maxandersen

    Deploying WebApp to JBoss AS on RHDS with Maven Dependencies

    cbeels

      I've been able to add my project to the server in the JBoss view of RHDS, and it starts to load fine, but it fails to load any of the jars that are handled locally in Eclipse/RHDS by the Maven2 plugin. What's the right way to get these jars (the ones listed as dependencies in the pom.xml) to load for this project when I start JBoss?

        • 1. Re: Deploying WebApp to JBoss AS on RHDS with Maven Dependen
          cbeels

          I ended up using the following ant task as a 'hack' to get the libs populated locally.

          <artifact:pom id="pom.xml.id" file="pom.xml" />
          <artifact:dependencies pathId="dependency.classpath" filesetId="dependency.fileset" pomRefId="pom.xml.id">

          </artifact:dependencies>








          I hope there is a better way to get JBoss to pick up the Maven dependencies when starting the App Server...

          • 2. Re: Deploying WebApp to JBoss AS on RHDS with Maven Dependen
            cbeels

            hrm part of my xml didn't show in the last post. Should be

             <artifact:pom id="pom.xml.id" file="pom.xml" />
             <artifact:dependencies pathId="dependency.classpath" filesetId="dependency.fileset" pomRefId="pom.xml.id">
             <remoteRepository refid="dbz.remote.repository" />
             </artifact:dependencies>
             <target name="copyDependenciesLocally">
             <copy todir="web/WEB-INF/lib">
             <fileset refid="dependency.fileset" />
             <mapper type="flatten" />
             </copy>
             </target>
            


            • 3. Re: Deploying WebApp to JBoss AS on RHDS with Maven Dependen
              maxandersen

              I'm not a maven pom file literate but is this needed because of a bug in RHDS or is this not just normal WTP behavior that you need to work around ?