Excellent - just plug in some phase names and it works like a dream! Thanks Marcelo,
Andy > -----Original Message----- > From: Marcelo Takeshi Fukushima [mailto:[EMAIL PROTECTED] > Sent: 21 June 2007 17:35 > To: user@mojo.codehaus.org > Subject: RE: [mojo-user] Using Maven 2.x JBoss Plugin within > a pom tree > > what i do is have a profile on the ear that undeploys / > deploys the artifact on install and them, from the root pom, > calls mvn clean install -Ddeploy, witch invokes the profile > on the ear, deploying it > > <profiles> > <profile> > <id>deploy_ear</id> > <activation> > <property> > <name>deploy</name> > </property> > </activation> > <build> > <plugins> > <plugin> > > <groupId>org.codehaus.mojo</groupId> > > <artifactId>jboss-maven-plugin</artifactId> > <executions> > <execution> > > <id>undeploy_on_clean</id> > <phase> > > PHASE_TO_UNDEPLOY - better if its after the tests are ran > </phase> > <goals> > > <goal>undeploy</goal> > </goals> > </execution> > <execution> > > <id>deploy_on_package</id> > <phase> > > DEPLOY_PHASE - should be after the undeploy phase (duh) > </phase> > <goals> > > <goal>deploy</goal> > </goals> > </execution> > </executions> > </plugin> > </plugins> > </build> > </profile> > </profiles> > > > > > -----Original Message----- > From: Peel, Andy [mailto:[EMAIL PROTECTED] > Sent: quinta-feira, 21 de junho de 2007 12:55 > To: user@mojo.codehaus.org > Subject: [mojo-user] Using Maven 2.x JBoss Plugin within a pom tree > > > Hi, > > I have a project with multiple poms that are children of a super-pom. > One of the child poms is responsible for packaging the other poms' > deliverables into an EAR file. I'm then trying to use > jboss:deploy from the level of the super-pom to deploy the > EAR from the child module. > > I've tried a couple of ways to do this: > > 1) Specify the fileName parameter to the plugin in the > super-pom. E.g.: > > > <fileName>${project.build.directory}\..\Ear\target\Ear-1.0-SNA > PSHOT.ear< > /fileName> > > where "Ear" is the name of the module that builds the EAR file. > > When I then run the jboss:deploy goal it deploys the EAR > correctly, but then it tries to run the goal against each of > the other sub-modules in the tree, which fails (only one of > the sub-modules has a deliverable to deploy). > > > 2) Use the -f switch to change the pom to run: > > mvn install -f Ear\pom.xml jboss:deploy > > This also successfully deploys the EAR correctly, but it > doesn't build the rest of the modules in the tree, so relies > on "mvn install" having been run against the super-pom. > > > The reason that 2) isn't sufficient is that we're using > Hudson to do continuous builds and it only allows one Maven > command line to be specified, otherwise I could just do this > from the level of the > super-pom: > > mvn install > mvn -f Ear\pom.xml jboss:deploy > > Is there a way to do this in a single-shot command line from > the jboss plugin? > > Thanks for any help, > > > Andy. > > > -------------------------------------------------------------- > -------------- > ---- > The information contained herein is confidential and is > intended solely for the addressee. Access by any other party > is unauthorised without the express written permission of the > sender. If you are not the intended recipient, please contact > the sender either via the company switchboard on +44 (0)20 > 7623 8000, or via e-mail return. If you have received this > e-mail in error or wish to read our e-mail disclaimer > statement and monitoring policy, please refer to > http://www.dresdnerkleinwort.com/disc/email/ or contact the sender. > -------------------------------------------------------------- > -------------- > ---- > > > --------------------------------------------------------------------- > To unsubscribe from this list please visit: > > http://xircles.codehaus.org/manage_email > > > > --------------------------------------------------------------------- > To unsubscribe from this list please visit: > > http://xircles.codehaus.org/manage_email > -------------------------------------------------------------------------------- The information contained herein is confidential and is intended solely for the addressee. Access by any other party is unauthorised without the express written permission of the sender. If you are not the intended recipient, please contact the sender either via the company switchboard on +44 (0)20 7623 8000, or via e-mail return. If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.dresdnerkleinwort.com/disc/email/ or contact the sender. -------------------------------------------------------------------------------- --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email