+1 I would also be interested to hear more about this. Actually, I'm kind of surprised that compilation of the tests is excluded as well, since I had the impression that compilation is done by the maven-compiler-plugin (compiler:testCompile) in the test-compile phase. (If it is not, then maybe you can force the remaining classes to be compiled by invoking compiler:testCompile from your pom in the pre-integration-test phase. It is just a thought...)
Wilfred On Mon, 2006-03-27 at 16:21 -0700, Wendy Smoak wrote: > If I have some tests that [will eventually] use the Cargo API to start > a container, that need to be run after the package phase (so that the > war file exists) and that I want excluded from the test phase... is > this (see below) close? > > The only problem with it is that the *ServerTest classes never get > compiled. I assume this is because they are excluded from the test > phase. Do I also need to configure the compiler plugin to work during > the integration test phase? > > Then I found this post in which (I think) Vincent is advocating having > the 'ServerTest' classes in a different module entirely: > <http://mail-archives.apache.org/mod_mbox/maven-users/200405.mbox/[EMAIL > PROTECTED]> > (If I go that route, what would the <packaging> be for the module that > only contains in-container tests?) > > A list of references, the complete <profile>, and some output are here: > http://wiki.wsmoak.net/cgi-bin/wiki.pl?Cargo > > Advice on whether I'm headed in the right direction would be > appreciated. There are a few threads on this in the archives, but > those developers were using Ant to start the container and I couldn't > work out how their tests were getting compiled. > > <profile> > ... > <build> > ... > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-surefire-plugin</artifactId> > <executions> > <execution> > <id>surefire-it</id> > <phase>integration-test</phase> > <configuration> > <includes> > <include>**/*ServerTest.java</include> > </includes> > </configuration> > <goals> > <goal>test</goal> > </goals> > </execution> > </executions> > <configuration> > <excludes> > <exclude>**/*ServerTest.java</exclude> > </excludes> > </configuration> > </plugin> > </plugins> > </build> > </profile> > > Thanks, > Wendy > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > Wilfred Springer | Software Architect | TomTom | [EMAIL PROTECTED]