<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>
	<artifactId>consentservice</artifactId>
	<groupId>dk.nsi.consentservices</groupId>
	<version>1.1.2</version>
	<packaging>pom</packaging>
	<name>Healthcare Consent Services for Verification and Administration</name>
	<url>http://nsi.dk</url>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<dgws-types.version>1.1.8</dgws-types.version>
		<dgws.version>1.1.8</dgws.version>
	</properties>

	<modules>
		<module>common</module>
		<module>consentverification</module>
		<module>consentadministration</module>
		<module>integrationtest</module>
	</modules>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>cobertura-maven-plugin</artifactId>
				<version>2.7</version>
				<configuration>
					<formats>
						<format>html</format>
					</formats>
					<aggregate>true</aggregate>
				</configuration>
			</plugin>
		</plugins>
	</reporting>

	<dependencies>
		<dependency>
			<groupId>net.sourceforge.cobertura</groupId>
			<artifactId>cobertura-runtime</artifactId>
			<version>2.1.1</version>
			<scope>test</scope>
			<type>pom</type>
		</dependency>
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<version>5.1.6</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.easymock</groupId>
			<artifactId>easymock</artifactId>
			<version>3.0</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.8.2</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.sun.xml.bind</groupId>
			<artifactId>jaxb-impl</artifactId>
			<version>2.2</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>servlet-api</artifactId>
			<version>2.5</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>com.sun.xml.ws</groupId>
			<artifactId>jaxws-tools</artifactId>
			<version>2.1.7</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-entitymanager</artifactId>
			<version>4.3.7.Final</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>javax.ejb</groupId>
			<artifactId>ejb-api</artifactId>
			<version>3.0</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.16</version>
		</dependency>

		<dependency>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-failsafe-plugin</artifactId>
			<version>2.8.1</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.codehaus.mojo</groupId>
			<artifactId>properties-maven-plugin</artifactId>
			<version>1.0-alpha-2</version>
			<scope>provided</scope>
		</dependency>

	</dependencies>
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>dk.nsi.testcertificates</groupId>
				<artifactId>test-oces-certificates</artifactId>
				<version>1.2</version>
			</dependency>
			<dependency>
				<groupId>dk.nsi.hsuid</groupId>
				<artifactId>hsuid</artifactId>
				<version>1.1.7</version>
			</dependency>
			<dependency>
				<groupId>dk.nsi.dgws.types</groupId>
				<artifactId>security-types</artifactId>
				<version>${dgws-types.version}</version>
			</dependency>
			<dependency>
				<groupId>dk.nsi.dgws.types</groupId>
				<artifactId>medcom-types</artifactId>
				<version>${dgws-types.version}</version>
			</dependency>
			<dependency>
				<groupId>dk.nsi.dgws</groupId>
				<artifactId>dgws-common</artifactId>
				<version>${dgws.version}</version>
			</dependency>
			<dependency>
				<groupId>dk.nsi.dgws</groupId>
				<artifactId>consumer</artifactId>
				<version>${dgws.version}</version>
			</dependency>
			<dependency>
				<groupId>dk.nsi.dgws</groupId>
				<artifactId>consumer</artifactId>
				<type>test-jar</type>
				<version>${dgws.version}</version>
			</dependency>
			<dependency>
				<groupId>dk.nsi.dgws</groupId>
				<artifactId>provider</artifactId>
				<version>${dgws.version}</version>
			</dependency>
			<dependency>
				<groupId>dk.nsi.dgws</groupId>
				<artifactId>remote-test-resources</artifactId>
				<version>${dgws.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>dk.sdsd.nsp</groupId>
				<artifactId>nsp-util</artifactId>
				<version>1.0.11</version>
			</dependency>
			<dependency>
				<groupId>dk.sosi.seal</groupId>
				<artifactId>seal</artifactId>
				<version>2.2.1</version>
			</dependency>
			<dependency>
				<groupId>dk.nsi.services-common</groupId>
				<artifactId>remote-test-resources</artifactId>
				<version>1.1.8</version>
			</dependency>
			<dependency>
				<groupId>dk.nsi.services-common</groupId>
				<artifactId>services-common</artifactId>
				<version>1.1.8</version>
			</dependency>
			<dependency>
				<groupId>dk.nsi.services-common</groupId>
				<artifactId>services-common</artifactId>
				<version>1.1.8</version>
				<type>test-jar</type>
			</dependency>
			<dependency>
				<groupId>dk.nsi.minlog.registration</groupId>
				<artifactId>minlog-registration-client</artifactId>
				<version>1.2.3</version>
			</dependency>
			<dependency>
				<groupId>dk.nsi.minlog.registration</groupId>
				<artifactId>minlog-registration-serviceinterface</artifactId>
				<version>1.2.3</version>
			</dependency>
		</dependencies>
	</dependencyManagement>
	<build>
		<finalName>${project.artifactId}-${project.version}</finalName>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>cobertura-maven-plugin</artifactId>
				<version>2.7</version>
				<configuration>
					<formats>
						<format>xml</format>
						<format>html</format>
					</formats>
					<aggregate>true</aggregate>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>clean</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.8</version>
				<configuration>
					<excludePackageNames>dk.medcom.*:dk.nsi.consentservices*:dk.nsi.minlog*:dk.oio.*:oasis.*:org.*</excludePackageNames>
				</configuration>
				<executions>
					<execution>
						<phase>site</phase>
						<goals>
							<goal>javadoc</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.9</version>
				<configuration>
					<systemPropertyVariables>
						<net.sourceforge.cobertura.datafile>target/cobertura/cobertura.ser</net.sourceforge.cobertura.datafile>
					</systemPropertyVariables>
				</configuration>
			</plugin>
			<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>
					<destFile>${sonar.jacoco.itReportPath}</destFile>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>integration-test</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.2.1</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>2.7</version>
				<configuration>
					<skip>true</skip>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.1.2</version>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>cobertura-maven-plugin</artifactId>
					<version>2.7</version>
				</plugin>
				<!--This plugin's configuration is used to store Eclipse m2e settings 
					only. It has no influence on the Maven build itself. -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.codehaus.mojo</groupId>
										<artifactId>properties-maven-plugin</artifactId>
										<versionRange>[1.0-alpha-2,)</versionRange>
										<goals>
											<goal>read-project-properties</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<execute />
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
				<plugin>
					<groupId>com.google.code.maven-license-plugin</groupId>
					<artifactId>maven-license-plugin</artifactId>
					<configuration>
						<header>./standardheader.txt</header>
						<excludes>
							<exclude>**/target/**</exclude>
							<exclude>**/.settings/**</exclude>
							<exclude>**/.project/**</exclude>
							<exclude>**/.jazzignore/**</exclude>
							<exclude>**/.classpath/**</exclude>
							<exclude>**/*.properties</exclude>
							<exclude>**/*.class</exclude>
							<exclude>**/*.wsdl</exclude>
							<exclude>**/*.xsd</exclude>
							<exclude>**/*.xml</exclude>
							<exclude>**/*.sql</exclude>
							<exclude>**/*.MF</exclude>
							<exclude>**/*.sql</exclude>
							<exclude>**/*.jks</exclude>
							<exclude>**/*.NSP</exclude>
							<exclude>**/*.sh</exclude>
							<exclude>**/*.txt</exclude>
							<exclude>**/*.jmx</exclude>
							<exclude>**/*.jpg</exclude>
							<exclude>**/*.pdf</exclude>
							<exclude>**/*.htm</exclude>
						</excludes>
						<properties>
						</properties>
						<encoding>UTF-8</encoding>
					</configuration>
					<executions>
						<execution>
							<goals>
								<goal>format</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<profiles>
		<profile>
			<id>cobertura-instrument</id>
			<activation>
				<property>
					<name>cobertura-build</name>
				</property>
			</activation>
			<modules>
				<module>cobertura</module>
			</modules>
			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>cobertura-maven-plugin</artifactId>
						<configuration>
						</configuration>
						<executions>
							<execution>
								<id>instrument-code</id>
								<phase>process-classes</phase>
								<goals>
									<goal>instrument</goal>
								</goals>
								<configuration>
									<instrumentation>
										<excludes>
											<exclude>dk/nsi/fmki20110601/**</exclude>
											<exclude>dk/medcom/**</exclude>
											<exclude>dk/oio/**</exclude>
											<exclude>dk/nsi/hsuid/_2012/**</exclude>
											<exclude>oasis/**</exclude>
											<exclude>org/**</exclude>
										</excludes>
									</instrumentation>
									<attach>true</attach>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<artifactId>maven-source-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
						<inherited>true</inherited>
					</plugin>
				</plugins>
			</build>
			<dependencies>
				<dependency>
					<groupId>net.sourceforge.cobertura</groupId>
					<artifactId>cobertura-runtime</artifactId>
					<version>2.1.1</version>
					<scope>provided</scope>
					<type>pom</type>
				</dependency>
			</dependencies>
		</profile>
	</profiles>
</project>
