Hello,
as to me, the best way for integration tests organization is using 'pom'
packaging for it module.
In this case you could manually switch on only necessary plugins like
compiling only tests, copy resources or not, and etc..
My it-module pom:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>...</artifactId>
<groupId>...</groupId>
<version>0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>functional-tests</artifactId>
<packaging>pom</packaging>
<version>0.1-SNAPSHOT</version>
<build>
<testSourceDirectory>${basedir}/it/main/java</testSourceDirectory>
<testResources>
<testResource>
<directory>${basedir}/it/main/resources</directory>
<filtering>true</filtering>
</testResource>
</testResources>
</build>
<profiles>
<profile>
<id>it</id>
<activation>
<property>
<name>it</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>testResources</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkMode>never</forkMode>
</configuration>
<executions>
<execution>
<id>it</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
In hope to help,
Aleksey.
[email protected] пишет:
Hello everyone,
is it possible to remove the maven-resource-plugin with its testResources
mojo execution from the lifecycle when tests are skipped?
The maven-compiler-plugin respects the skipTests parameter and does not
compile the test classes, but the maven-resource-plugin does still process
the test resources. That's not necessary in my opinion.
Is there a solution to my problem without patching the
maven-resource-plugin?
Thanks,
Maik Ebert | R&D ProfessionalGate
InterComponentWare AG | Industriestraße 41 | 69190 Walldorf (Baden) |
Germany
Tel.: +49 (0) 6227 385 203 | Fax: +49 (0) 6227 385
[email protected] | www.icw.de | www.lifesensor.com
InterComponentWare AG:
Vorstand: Dr. Lutz Kleinholz (Vors.), Dr. Georg Ralle, Jörg Stadler / Aufsichtsratsvors.: Prof. Dr. Christof Hettich
Firmensitz: 69190 Walldorf, Industriestraße 41 / AG Mannheim HRB 351761 / USt.-IdNr.: DE 198388516
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]