pom.xml 8.11 KB
<?xml version="1.0"?>
<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<parent>
		<groupId>fr.tlse.irap.pt</groupId>
		<artifactId>pt</artifactId>
		<version>3.0.0</version>
	</parent>

	<modelVersion>4.0.0</modelVersion>
	<artifactId>integration</artifactId>
	<packaging>war</packaging>
	<name>${pt-name} Integration</name>
	<description>${pt-name} Integration test Module</description>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<junit-version>4.10</junit-version>
		<jacoco-version>0.6.4.201312101107</jacoco-version>
		<surefire-version>2.4</surefire-version>
		<failsafe-version>2.16</failsafe-version>
	</properties>

	<repositories>
		<repository>
			<id>.mse.jhu.edu</id>
			<url>http://maven.mse.jhu.edu/m2repository/</url>
		</repository>
	</repositories>

	<dependencies>

		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>calendar</artifactId>
			<version>3.0.0</version>
		</dependency>

		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>common</artifactId>
			<version>3.0.0</version>
		</dependency>

		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>client</artifactId>
			<version>3.0.0</version>
		</dependency>

		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>server</artifactId>
			<version>3.0.0</version>
			<classifier>classes</classifier>
		</dependency>

		<dependency>
			<groupId>com.oracle</groupId>
			<artifactId>javafx</artifactId>
			<version>${javafx.version}</version>
			<systemPath>${javafx.jar}</systemPath>
			<scope>system</scope>
		</dependency>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<version>1.5.6</version>
		</dependency>

		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>jsp-api</artifactId>
			<version>2.0</version>
		</dependency>

		<!-- Global testing libraries -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit-version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.jacoco</groupId>
			<artifactId>org.jacoco.core</artifactId>
			<version>${jacoco-version}</version>
			<scope>test</scope>
		</dependency>

		<!-- for testing javafx applications -->
		<dependency>
			<groupId>jemmy</groupId>
			<artifactId>JemmyCore</artifactId>
			<version>1.0</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>jemmy</groupId>
			<artifactId>JemmyBrowser</artifactId>
			<version>1.0</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>jemmy</groupId>
			<artifactId>JemmySupport</artifactId>
			<version>1.0</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>jemmy</groupId>
			<artifactId>GlassImage</artifactId>
			<version>1.0</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>jemmy</groupId>
			<artifactId>GlassRobot</artifactId>
			<version>1.0</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>jemmy</groupId>
			<artifactId>JemmyFX</artifactId>
			<version>1.0</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>jemmy</groupId>
			<artifactId>JemmyFXBrowser</artifactId>
			<version>1.0</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<directory>target</directory>
		<testOutputDirectory>target/test-classes</testOutputDirectory>
		<testSourceDirectory>src/test/java</testSourceDirectory>

		<plugins>

			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>${jacoco-version}</version>
				<executions>
					<execution>
						<id>prepare-unit-tests</id>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
						<configuration>
							<destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
							<propertyName>surefireArgLine</propertyName>
							<excludes>
								<exclude>org/**</exclude>
								<exclude>junit/**</exclude>
								<exclude>com/sun/**</exclude>
								<exclude>sun/**</exclude>
								<exclude>eu/**</exclude>
								<exclude>javafx/**</exclude>
								<exclude>fr/tlse/irap/test/**</exclude>
							</excludes>
						</configuration>
					</execution>
					<execution>
						<id>pre-integration-test</id>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
						<configuration>
							<destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
							<propertyName>failsafeArgLine</propertyName>
							<excludes>
								<exclude>org/**</exclude>
								<exclude>junit/**</exclude>
								<exclude>com/sun/**</exclude>
								<exclude>sun/**</exclude>
								<exclude>eu/**</exclude>
								<exclude>javafx/**</exclude>
								<exclude>fr/tlse/irap/test/**</exclude>
							</excludes>
						</configuration>
					</execution>
					<execution>
						<id>generate-report</id>
						<phase>site</phase>
						<goals>
							<goal>report</goal>
						</goals>
						<configuration>
							<dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
							<outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>unit-tests</id>
			<activation>
				<property>
					<name>skipUnitTests</name>
					<value>false</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<version>${surefire-version}</version>
						<configuration>
							<forkedProcessTimeoutInSeconds>20</forkedProcessTimeoutInSeconds>
							<testFailureIgnore>true</testFailureIgnore>
							<skipTests>${skipUnitTests}</skipTests>
							<argLine>${surefireArgLine}</argLine>
							<includes>
								<include>**/unit/**.java</include>
							</includes>
							<excludes>
								<exclude>**/integration/**.java</exclude>
							</excludes>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>integration-tests</id>
			<activation>
				<property>
					<name>skipIntegrationTests</name>
					<value>false</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-failsafe-plugin</artifactId>
						<version>${failsafe-version}</version>
						<configuration>
							<forkedProcessTimeoutInSeconds>60</forkedProcessTimeoutInSeconds>
							<testFailureIgnore>true</testFailureIgnore>
							<skipTests>${skipIntegrationTests}</skipTests>
							<argLine>${failsafeArgLine}</argLine>
							<includes>
								<include>**/integration/**.java</include>
							</includes>
							<excludes>
								<exclude>**/unit/**.java</exclude>
							</excludes>
						</configuration>
						<executions>
							<execution>
								<goals>
									<goal>integration-test</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.apache.tomcat.maven</groupId>
						<artifactId>tomcat6-maven-plugin</artifactId>
						<version>2.2</version>
						<configuration>
							<path>PropagationTool</path>
							<url>http://localhost:8080/manager</url>
							<port>8080</port>
							<username>tomcat</username>
							<password>tomcat</password>
							<warFile>${project.basedir}/../server/target/propagationtool.war</warFile>
						</configuration>
						<executions>
							<execution>
								<id>start-tomcat</id>
								<phase>pre-integration-test</phase>
								<goals>
									<goal>deploy</goal>
									<goal>list</goal>
								</goals>
								<configuration>
									<fork>true</fork>
								</configuration>
							</execution>
							<execution>
								<id>stop-tomcat</id>
								<phase>post-integration-test</phase>
								<goals>
									<goal>undeploy</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>

			</build>
		</profile>
	</profiles>
</project>