You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Dan Tran <da...@gmail.com> on 2009/04/05 21:44:21 UTC

Re: How run test with surefire plugin which resides in a other project ?

Maven is setup to make build projects to be very low coupling with
each other.  What you are trying breaking that rule.

What can't you put the tests together with the war project?

Also you can make the test project to depend on the war project and
use the war file to run the test.

-D

On Sun, Apr 5, 2009 at 12:26 PM, Nafter <Hd...@allshare.nl> wrote:
>
> I create a WAR file which consists of various modules. One of these modules
> is a Test project. This project includes all my test classes.
>
> Now when building the WAR file I would like to run a test which is located
> in the Test project. But at the point the surefire plugin is called, maven
> is busy with the my Web project to create the final WAR.
> How can I refer to test classes located in the other Test project?
>
> This is a snippit of my pom.xml:
> (note: this TestDateUtility class is located in an other project.)
>
>>
>                        <build>
>                                <plugins>
>                                        <plugin>
>                                                <groupId>org.apache.maven.plugins</groupId>
>                                                <artifactId>maven-surefire-plugin</artifactId>
>                                                <executions>
>                                                        <execution>
>                                                                <id>custom_tests</id>
>                                                                <phase>package</phase>
>                                                                <configuration>
>                                                                        <includes>
>                                                                                <include>**/TestDataUtility.java</include>
>                                                                        </includes>
>                                                                </configuration>
>                                                                <goals>
>                                                                        <goal>test</goal>
>                                                                </goals>
>                                                        </execution>
>                                                </executions>
>                                        </plugin>
>                                </plugins>
>                        </build>
>                </profile>
> --
> View this message in context: http://www.nabble.com/How-run-test-with-surefire-plugin-which-resides-in-a-other-project---tp22897591p22897591.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>