Peschier J. (Jeroen) wrote:

Hi Pablo,

I believe you can resolve this by added an extra source directory using
the build-helper-maven-plugin. In your use-case you would add the main
source directory like this:

<sourceDirectory>src/webapp/WEB-INF/src</sourceDirectory>

Add any additional source directories using the
build-helper-maven-plugin:

<plugin>
 <groupId>org.codehaus.mojo</groupId>
 <artifactId>build-helper-maven-plugin</artifactId>
 <executions>
   <execution>
     <id>add-source</id>
     <phase>generate-sources</phase>
     <goals>
       <goal>add-source</goal>
     </goals>
     <configuration>
       <sources>
         <source>src/integration-tests</source>
       </sources>
     </configuration>
   </execution>
 </executions>
</plugin>

If you use this plugin you don't need any configuration of the maven-compiler-plugin. Your additional sources will be compiled
automatically.
But isn't it true that the generated classes will be placed in target/test-classes along with junit tests classes ?
I want to avoid it and separete junit tests from integration tests.
I'd like to have junit tests in target/tests-classes and integration-tests in target/integration-tests

In other case "test" phase wouldn't succeed since integration-tests require (in my case) tomcat to be running.

Cheers
Pablo

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to