Trant,
Look at the cargo plugin (http://cargo.codehaus.org/). It is useful for
starting/stopping J2EE containers and deploying modules to them.
With proper configuration of the plugin (<deployable>, <container> and
<configuration> elements), you just need something like this in your build
section:
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<executions>
<execution>
<id>start-container</id>
<phase>pre-integration-test</phase>
<goals>
<goal>deploy</goal>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>stop-container</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
<goal>undeploy</goal>
</goals>
</execution>
</executions>
</plugin>
We use this everyday on our CI machine and it does pretty much what I
understand you need.
On Wed, May 11, 2011 at 3:25 PM, trant <[email protected]> wrote:
> Yep, I didn't understand that concept.
>
> So what I tried now is I added an execution to my plugin, as follows:
>
> <executions>
> <execution>
> <phase>install</phase>
> <goals>
> <goal>deploy</goal>
> </goals>
> </execution>
> </executions>
>
> under the assumption that maven will now consider this plugin as part of
> the
> deploy goal of the install phase?
>
> I tried running it and it actually does do what I want, it now does all the
> steps prior to deploy - build, test, package, etc...
>
> So that's good. Not sure if I did it the right way though or just lucked
> out.
>
> But now what if I also wanted the other goal I mentioned called
> weblogic:start to run prior to this deploy? What would I need to do to the
> pom? I am thinking maybe put that goal in the executions prior to the
> existing deploy goal? like: <goal>weblogic:start</goal> ?? Somehow I dont
> think thats the correct way to do it
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/How-can-I-have-a-goal-depend-on-another-goal-tp4384674p4388271.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>