<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/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<parent>
		<artifactId>documentsharing</artifactId>
		<groupId>dk.nsi.documentsharing</groupId>
		<version>0.9.6</version>
		<relativePath>../..</relativePath>
	</parent>

	<artifactId>documentsharing-integrationtest</artifactId>
	<name>Document Sharing Integration Test</name>

	<properties>
		<testclient-property-file>${basedir}/src/test/resources/testclient.properties</testclient-property-file>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<testcertificates.version>1.2</testcertificates.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>dk.nsi.documentsharing</groupId>
			<artifactId>core</artifactId>
			<version>0.9.6</version>
		</dependency>
		<dependency>
			<groupId>dk.nsi.documentsharing</groupId>
			<artifactId>xdstransformation</artifactId>
			<version>0.9.6</version>
		</dependency>
		<dependency>
			<groupId>dk.nsi.documentsharing</groupId>
			<artifactId>docsharingservices</artifactId>
			<version>0.9.6</version>
		</dependency>
		<dependency>
			<groupId>dk.nsi.documentsharing</groupId>
			<artifactId>docsharingservices</artifactId>
			<version>0.9.6</version>
			<type>test-jar</type>
		</dependency>
		<dependency>
			<groupId>dk.nsi.documentsharing</groupId>
			<artifactId>core</artifactId>
			<version>0.9.6</version>
			<type>test-jar</type>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>dk.nsi.documentsharing</groupId>
			<artifactId>nationalprofile</artifactId>
			<version>0.9.6</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>dk.nsi.hsuid</groupId>
			<artifactId>hsuid</artifactId>
		</dependency>
		<dependency>
			<groupId>dk.nsi.ddsservices</groupId>
			<artifactId>ddsservices-client-types</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>dk.nsi.dgws</groupId>
			<artifactId>consumer</artifactId>
		</dependency>
		<dependency>
			<groupId>dk.nsi.dgws</groupId>
			<artifactId>consumer</artifactId>
			<type>test-jar</type>
			<scope>test</scope>
		</dependency>
		<dependency>
			<artifactId>test-oces-certificates</artifactId>
			<groupId>dk.nsi.testcertificates</groupId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>dk.sosi.seal</groupId>
			<artifactId>seal</artifactId>
		</dependency>
		<dependency>
			<!-- Seal 2.1.9+ uses this -->
			<groupId>org.apache.axis</groupId>
			<artifactId>axis-saaj</artifactId>
			<version>1.4</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<!-- Seal 2.1.9+ uses this -->
			<groupId>xml-apis</groupId>
			<artifactId>xml-apis</artifactId>
			<version>1.3.04</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.sun.xml.ws</groupId>
			<artifactId>jaxws-rt</artifactId>
			<version>2.1.7</version>
			<exclusions>
				<exclusion>
					<groupId>stax</groupId>
					<artifactId>stax-api</artifactId>
				</exclusion>
				<exclusion>
					<groupId>javax.xml.stream</groupId>
					<artifactId>stax-api</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>com.sun.xml.bind</groupId>
			<artifactId>jaxb-impl</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
		</dependency>
		<!-- Test -->
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
		</dependency>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
		</dependency>
		<dependency>
			<groupId>org.easymock</groupId>
			<artifactId>easymock</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<testResources>
			<testResource>
				<directory>${basedir}/src/test/resources</directory>
				<excludes>
					<exclude>testclient.properties</exclude>
				</excludes>
			</testResource>
			<testResource>
				<directory>${project.build.directory}/maven-shared-archive-resources</directory>
			</testResource>
		</testResources>
		<plugins>
			<!-- For some reason this plugin can't be moved into external-test profile -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
				<version>2.8.1</version>
				<configuration>
					<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>integration-test</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>default</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-failsafe-plugin</artifactId>
						<version>2.18.1</version>
						<configuration>
							<skipTests>true</skipTests>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-jar-plugin</artifactId>
						<version>2.2</version>
						<executions>
							<execution>
								<goals>
									<goal>test-jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>external-test</id>
			<activation>
				<property>
					<name>dev</name>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<version>2.9</version>
					</plugin>
					<plugin>
						<artifactId>maven-antrun-plugin</artifactId>
						<version>1.4</version>
						<executions>
							<execution>
								<id>copy</id>
								<phase>initialize</phase>
								<configuration>
									<tasks>
										<copy file="${testclient-property-file}"
											tofile="${project.build.directory}/test-classes/testclient.properties"
											overwrite="true" />
									</tasks>
								</configuration>
								<goals>
									<goal>run</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-remote-resources-plugin</artifactId>
						<version>1.5</version>
						<configuration>
							<resourceBundles>
								<resourceBundle>dk.nsi.testcertificates:test-oces-certificates:${testcertificates.version}</resourceBundle>
							</resourceBundles>
							<attachToMain>false</attachToMain>
						</configuration>
						<executions>
							<execution>
								<phase>initialize</phase>
								<goals>
									<goal>process</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-failsafe-plugin</artifactId>
						<version>2.8.1</version>
						<configuration>
							<systemPropertyVariables>
								<testclient.properties>${project.build.directory}/test-classes/testclient.properties</testclient.properties>
								<soaprequest.log.dir>${soaprequest.log.dir}</soaprequest.log.dir>
							</systemPropertyVariables>
						</configuration>
						<executions>
							<execution>
								<goals>
									<goal>verify</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
