Maven question

View: New views
2 Messages — Rating Filter:   Alert me  

Maven question

by Amy Roh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I am using maven goal glassfish:runweb as below.

     <build>
         <defaultGoal>install</defaultGoal>
         <plugins>
             <plugin>
                 <groupId>org.glassfish</groupId>
                 <artifactId>maven-glassfish-plugin</artifactId>
                 <configuration>
                     <goalPrefix>glassfish</goalPrefix>
                     <app>target/standalonewar.war</app>
                     <port>8080</port>
                     <name>test</name>
                 </configuration>
                 <executions>
                     <execution>
                         <phase>install</phase>
                         <goals>
                             <goal>runweb</goal>
                         </goals>
                     </execution>
                 </executions>
             </plugin>
         </plugins>
     </build>

What I would like to do -
1. execute the maven goal runweb above to first start embedded web/deploy
2. run the test (src/test) to check whether the deploy app is
accessible, etc.

What happens now - due to maven build lifecycle
1. maven performs the test first (and fails because embedded hasn't been
started nor the app is deployed)
2. execute the maven goal

Can a maven expert tell me if such configuration can be done so that
testing happens after maven execution (i.e. glassfish:runweb)?

Thanks,
Amy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: Maven question

by Amy Roh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Found my answer - using <phase>pre-integration-test</phase> forces the
executions to happen before tests are executed and can be done to set up
the required environment.

Amy Roh wrote:

> Hi,
>
> I am using maven goal glassfish:runweb as below.
>
>     <build>
>         <defaultGoal>install</defaultGoal>
>         <plugins>
>             <plugin>
>                 <groupId>org.glassfish</groupId>
>                 <artifactId>maven-glassfish-plugin</artifactId>
>                 <configuration>
>                     <goalPrefix>glassfish</goalPrefix>
>                     <app>target/standalonewar.war</app>
>                     <port>8080</port>
>                     <name>test</name>
>                 </configuration>
>                 <executions>
>                     <execution>
>                         <phase>install</phase>
>                         <goals>
>                             <goal>runweb</goal>
>                         </goals>
>                     </execution>
>                 </executions>
>             </plugin>
>         </plugins>
>     </build>
>
> What I would like to do -
> 1. execute the maven goal runweb above to first start embedded web/deploy
> 2. run the test (src/test) to check whether the deploy app is
> accessible, etc.
>
> What happens now - due to maven build lifecycle
> 1. maven performs the test first (and fails because embedded hasn't been
> started nor the app is deployed)
> 2. execute the maven goal
>
> Can a maven expert tell me if such configuration can be done so that
> testing happens after maven execution (i.e. glassfish:runweb)?
>
> Thanks,
> Amy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...