Skip to content

Instantly share code, notes, and snippets.

@milenkovicm
Created February 20, 2012 13:22
Show Gist options
  • Save milenkovicm/1869158 to your computer and use it in GitHub Desktop.
Save milenkovicm/1869158 to your computer and use it in GitHub Desktop.
separation of functional and integration tests
<?xml version="1.0" encoding="UTF-8"?>
<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">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>remote</artifactId>
<groupId>com.example</groupId>
<version>1.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>remote-jar</artifactId>
<packaging>ejb</packaging>
<name>JAR module</name>
<properties>
<version.maven-ejb-plugin>2.3</version.maven-ejb-plugin>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<version>${version.maven-ejb-plugin}</version>
<configuration>
<ejbVersion>${version.ejb}</ejbVersion>
</configuration>
</plugin>
<!-- START - TEST PLUGINS -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>add-test-source</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>
${basedir}/src/integration/java
</source>
</sources>
</configuration>
</execution>
<!-- <execution>
<id>add-test-resource</id>
<phase>generate-test-resources</phase>
<goals>
<goal>add-test-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>${basedir}/src/integration/resources</directory>
<targetPath>${basedir}/target/integration</targetPath>
</resource>
</resources>
</configuration>
</execution>
-->
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.12</version>
<!-- <configuration>
<testClassesDirectory>${basedir}/target/integration</testClassesDirectory>
<reportsDirectory>${integrationOutputDirectory}/failsafe-reports</reportsDirectory>
<test>**/*.java</test> <additionalClasspathElements> <additionalClasspathElement>${basedir}/target/integration</additionalClasspathElement>
</additionalClasspathElements>
</configuration> -->
<executions>
<execution>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<executions>
<execution>
<phase>pre-integration-test</phase>
<goals>
<goal>testCompile</goal>
</goals>
<configuration>
<compilerArguments>
<d>${basedir}/target/integration</d>
</compilerArguments>
</configuration>
</execution>
</executions>
</plugin> -->
</plugins>
<!-- END - TEST PLUGINS -->
</build>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>${project.parent.artifactId}-api</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment