You need the integration test plugin to use /it/ by default, but that plugin has its own quirks and I don't know if it is being actively developed. However, the easiest way I've found is to put all tests in src/test/java and distinguish between them based on naming conventions. This is what we do:
<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>**/*IntegrationTest.java</include> </includes> </configuration> <goals> <goal>test</goal> </goals> </execution> </executions> <configuration> <includes> <include>**/*UnitTest.java</include> </includes> </configuration> </plugin> Kalle On 1/9/07, Wayne Fay <[EMAIL PROTECTED]> wrote:
Maven is happy to compile additional code if you configure it in the pom. The /src/main/java and /src/test/java directories are simply the default. Wayne On 1/9/07, drekka <[EMAIL PROTECTED]> wrote: > > Hi, > I'm just a maven newbie myself, but doesn't maven only compile from > /src/main/java for the project code, and /src/test/java for the test code. I > don't know if you can add further directories without creating nested > subprojects. My guess at an answer would dbe to either create subprojects or > to add your integration source as part of /src/test/java and > /src/test/resources. > > ciao > Derek > > > Wayne Fay wrote: > > > > There are various integration tests run as part of the Maven project > > build itself, which of course uses Maven to do the build and test etc. > > > > I'd take a look at their poms and how they've structured the > > integration test directories etc to see how you might be able to apply > > it to your own project. > > > > Wayne > > > > On 1/9/07, Todd Nine <[EMAIL PROTECTED]> wrote: > >> Hi all, > >> I have a project that has some utility classes, as well as integration > >> classes. The utility classes are mostly for parsing legacy data, so > >> these > >> can be tested with Unit tests. I want to do a full black box test with > >> an > >> integration test. I have the following source directory > >> > >> src/main/java > >> src/main/resources > >> src/test/java > >> src/test/resources > >> src/integration-test/java > >> src/integration-test/resources > >> > >> However, when I execute "mvn integration-test", it says that there are no > >> tests to run. I've also tried "src/it/java" Have I named the directory > >> incorrectly? What do I need to do to get integration tests running? > >> > >> Thanks, > >> Todd > >> > >> > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > View this message in context: http://www.nabble.com/Help-executing-both-unit-and-integration-tests-in-a-single-artifact-tf2949717s177.html#a8250655 > Sent from the Maven - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]