2 Replies Latest reply on Jun 11, 2010 12:41 AM by tbryan

    use maven to build archives

    tiamak

      Hi,


      how do i get maven to generate a war or an ear of my project? using jboss tools and telling the server to only deploy compressed archives and then digging for those archives somewhere in the tmp deploy directory of the jboss server to deploy on production is a bit convoluted. using jboss tools to create a project archive doesn't work, as the mavenized libs aren't included.


      does anyone have any idea how best to do this? (i've spent the better part of the day banging my head against the keyboard in fruitless googling, trying to find any form of documentation for maven in jboss tools beyond getting a project started.


      regards,
      sb

        • 1. Re: use maven to build archives
          shavo26

          Simon you should check out these links:
          Build the enterprise with EJB 3, JBoss Seam, and Maven 2


          and


          Maven ear plugin


          Also if you have jboss tools download in eclipse, select new project wizard - JBoss Tools - project examples, select seam and PhotoAlbum EAR mavenized example. This will help understand setup seam via maven.


          main points to know is your parent pom.xml must have packaging of type ear and define your plugin element


          <plugin>
                      <artifactId>maven-ear-plugin</artifactId>
                      .....
          </plugin>




          • 2. Re: use maven to build archives
            tbryan

            I basically followed these instructions to create a Seam web project with Maven support http://docs.jboss.org/tools/3.1.0.GA/en/seam/html/create_mavenized_seam.html


            Actually, I had already created a Seam project, so I created a new one following those instructions, then I used the new projects to figure out what I needed to change (.project, .classpath, .settings/, pom.xml, etc.) to enable Maven support for my pre-existing projects.  It's a bit of a pain to compare the projects, but it works...mostly.  I'm still trying to figure out why my test project's tests aren't working.