<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>

	<groupId>com.att.research.xacml</groupId>
	<artifactId>att-xacml</artifactId>
	<version>2.0.1</version>
	<packaging>pom</packaging>
	<name>ATT XACML</name>
	<description>ATT XACML Parent Project</description>
	<url>https://github.com/att/XACML</url>

	<prerequisites>
		<maven>3.0</maven>
	</prerequisites>

	<licenses>
		<license>
			<name>MIT License</name>
			<url>https://github.com/att/XACML/blob/master/LICENSE</url>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Pamela Dragosh</name>
			<email>pdragosh@research.att.com</email>
			<organization>ATT</organization>
			<organizationUrl>http://www.research.att.com</organizationUrl>
		</developer>
		<developer>
			<name>Chenfei Gao</name>
			<email>cgao@research.att.com</email>
			<organization>ATT</organization>
			<organizationUrl>http://www.research.att.com</organizationUrl>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:git://github.com/att/XACML.git</connection>
		<developerConnection>scm:git:ssh://github.com/att/XACML.git</developerConnection>
		<url>http://github.com/att/XACML/tree/master</url>
	</scm>

	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>

	<properties>
		<project.source.version>1.8</project.source.version>
		<project.target.version>1.8</project.target.version>
		<project.encoding>UTF-8</project.encoding>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
	    <jacoco.version>0.7.7.201606060606</jacoco.version>
	    <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
	    <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
	    <!-- Default Sonar configuration -->
		<sonar.jacoco.reportPaths>${project.basedir}/../target/code-coverage/jacoco-ut.exec</sonar.jacoco.reportPaths>
		<sonar.jacoco.itReportPaths>${project.basedir}/../target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPaths>
		<sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
	    <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->
	    <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
	    
		<version.java>1.8</version.java>
		<version.guava>27.0.1-jre</version.guava>
		<jetty.version>9.4.12.v20180830</jetty.version>
		<version.jackson>2.9.8</version.jackson>
		<version.httpclient>4.5.5</version.httpclient>
		<version.servletapi>3.1.0</version.servletapi>
		<version.slf4j>1.8.0-beta4</version.slf4j>
		<version.logback>1.2.3</version.logback>
		<version.commons.io>2.4</version.commons.io>
		<version.commons.lang3>3.4</version.commons.lang3>
		<version.commons.codec>1.10</version.commons.codec>
		<version.commons.cli>1.3.1</version.commons.cli>
		<version.junit>4.12</version.junit>
		<version.mockito>1.10.19</version.mockito>
		<version.log4j>2.11.0</version.log4j>
		<version.xmlapi>1.4.01</version.xmlapi>
	</properties>

	<modules>
		<module>XACML</module>
		<module>XACML-PIP</module>
		<module>XACML-PDP</module>
		<module>XACML-REST</module>
		<module>XACML-PDP-REST</module>
		<module>XACML-PAP-REST</module>
		<module>XACML-PAP-ADMIN</module>
	</modules>

	<!-- java 8 doclint checks are too strict for our current javadoc state... -->
	<profiles>
		<profile>
			<id>doclint-java8-disable</id>
			<activation>
				<jdk>[1.8,)</jdk>
			</activation>
			<properties>
				<javadoc.opts>-Xdoclint:none</javadoc.opts>
			</properties>
		</profile>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<configuration>
							<additionalparam>-Xdoclint:none</additionalparam>
						</configuration>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>cve</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.owasp</groupId>
						<artifactId>dependency-check-maven</artifactId>
						<version>3.1.1</version>
						<executions>
							<execution>
								<goals>
									<goal>check</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>com.google.guava</groupId>
				<artifactId>guava</artifactId>
				<version>${version.guava}</version>
			</dependency>
			<dependency>
				<groupId>javax.servlet</groupId>
				<artifactId>javax.servlet-api</artifactId>
				<version>${version.servletapi}</version>
			</dependency>
			<dependency>
				<groupId>commons-io</groupId>
				<artifactId>commons-io</artifactId>
				<version>${version.commons.io}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.httpcomponents</groupId>
				<artifactId>httpclient</artifactId>
				<version>${version.httpclient}</version>
			</dependency>
			<dependency>
				<groupId>xml-apis</groupId>
				<artifactId>xml-apis</artifactId>
				<version>${version.xmlapi}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-lang3</artifactId>
				<version>${version.commons.lang3}</version>
			</dependency>
			<dependency>
				<groupId>commons-codec</groupId>
				<artifactId>commons-codec</artifactId>
				<version>${version.commons.codec}</version>
			</dependency>
			<dependency>
				<groupId>commons-cli</groupId>
				<artifactId>commons-cli</artifactId>
				<version>${version.commons.cli}</version>
			</dependency>
			<dependency>
				<groupId>com.fasterxml.jackson.core</groupId>
				<artifactId>jackson-databind</artifactId>
				<version>${version.jackson}</version>
			</dependency>
			<dependency>
				<groupId>${project.groupId}</groupId>
				<artifactId>xacml</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>${project.groupId}</groupId>
				<artifactId>xacml-pdp</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>${project.groupId}</groupId>
				<artifactId>xacml-pip</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>${project.groupId}</groupId>
				<artifactId>xacml-test</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>${project.groupId}</groupId>
				<artifactId>xacml-rest</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>${project.groupId}</groupId>
				<artifactId>xacml-pdp-rest</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>${project.groupId}</groupId>
				<artifactId>xacml-pap-rest</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>${project.groupId}</groupId>
				<artifactId>xacml-pap-admin</artifactId>
				<version>${project.version}</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<dependencies>
		<dependency>
		    <groupId>org.slf4j</groupId>
		    <artifactId>slf4j-ext</artifactId>
		    <version>${version.slf4j}</version>
		</dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${version.slf4j}</version>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-core</artifactId>
            <version>${version.logback}</version>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>${version.logback}</version>
        </dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${version.junit}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<version>${version.mockito}</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.3</version>
					<configuration>
						<source>${version.java}</source>
						<target>${version.java}</target>
					</configuration>
				</plugin>
		        <plugin>
		          <groupId>org.jacoco</groupId>
		          <artifactId>jacoco-maven-plugin</artifactId>
		          <version>${jacoco.version}</version>
		          <configuration>
		            <!-- Note: This exclusion list should match <sonar.exclusions>
		         property above -->
		            <excludes>
		              <exclude>**/gen/**</exclude>
		              <exclude>**/generated-sources/**</exclude>
		              <exclude>**/yang-gen/**</exclude>
		              <exclude>**/pax/**</exclude>
		            </excludes>
		          </configuration>
		          <executions>
		            <!--
		        Prepares the property pointing to the JaCoCo runtime agent which
		        is passed as VM argument when Maven the Surefire plugin is executed.
		        -->
		            <execution>
		              <id>pre-unit-test</id>
		              <goals>
		                <goal>prepare-agent</goal>
		              </goals>
		              <configuration>
						<destFile>${sonar.jacoco.reportPaths}</destFile>
		                <propertyName>surefireArgLine</propertyName>
						<append>true</append>
		              </configuration>
		            </execution>
		            <!--
		        Ensures that the code coverage report for unit tests is created after
		        unit tests have been run.
		        -->
		            <execution>
		              <id>post-unit-test</id>
		              <phase>test</phase>
		              <goals>
		                <goal>report</goal>
		              </goals>
		              <configuration>
						<dataFile>${sonar.jacoco.reportPaths}</dataFile>
		                <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
		              </configuration>
		            </execution>
		            <execution>
		              <id>pre-integration-test</id>
		              <phase>pre-integration-test</phase>
		              <goals>
		                <goal>prepare-agent</goal>
		              </goals>
		              <configuration>
						<destFile>${sonar.jacoco.itReportPaths}</destFile>
		                <propertyName>failsafeArgLine</propertyName>
						<append>true</append>
		              </configuration>
		            </execution>
		            <!--
		        Ensures that the code coverage report for integration tests after
		        integration tests have been run.
		        -->
		            <execution>
		              <id>post-integration-test</id>
		              <phase>post-integration-test</phase>
		              <goals>
		                <goal>report</goal>
		              </goals>
		              <configuration>
		                <dataFile>${sonar.jacoco.itReportPaths}</dataFile>
		                <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
		              </configuration>
		            </execution>
		          </executions>
		        </plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>2.19.1</version>
					<configuration>
						<!-- Sets the VM argument line used when unit tests are run. -->
						<argLine>${surefireArgLine}</argLine>
						<!-- Excludes integration tests when unit tests are run. -->
						<excludes>
							<exclude>**/IT*.java</exclude>
						</excludes>
					</configuration>
				</plugin>
		        <plugin>
		          <groupId>org.apache.maven.plugins</groupId>
		          <artifactId>maven-failsafe-plugin</artifactId>
		          <version>2.19.1</version>
		          <executions>
		            <!--
		        Ensures that both integration-test and verify goals of the Failsafe Maven
		        plugin are executed.
		        -->
		            <execution>
		              <id>integration-tests</id>
		              <goals>
		                <goal>integration-test</goal>
		                <goal>verify</goal>
		              </goals>
		              <configuration>
		                <!-- Sets the VM argument line used when integration tests are run. -->
		                <argLine>${failsafeArgLine}</argLine>
		              </configuration>
		            </execution>
		          </executions>
		        </plugin>
		        <!-- https://mvnrepository.com/artifact/org.sonarsource.scanner.maven/sonar-maven-plugin -->
		        <plugin>
		          <groupId>org.sonarsource.scanner.maven</groupId>
		          <artifactId>sonar-maven-plugin</artifactId>
		          <version>3.2</version>
		        </plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>2.2.1</version>
					<executions>
						<execution>
							<id>attach-sources</id>
							<goals>
								<goal>jar-no-fork</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>2.9.1</version>
					<executions>
						<execution>
							<id>attach-javadocs</id>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>1.5</version>
					<executions>
						<execution>
							<id>sign-artifacts</id>
							<phase>verify</phase>
							<goals>
								<goal>sign</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.sonatype.plugins</groupId>
					<artifactId>nexus-staging-maven-plugin</artifactId>
					<version>1.6.7</version>
					<extensions>true</extensions>
					<configuration>
						<serverId>ossrh</serverId>
						<nexusUrl>https://oss.sonatype.org/</nexusUrl>
						<autoReleaseAfterClose>false</autoReleaseAfterClose>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
			</plugin>
			<!-- Jacoco / Sonar -->
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
			</plugin>
		</plugins>
	</build>

</project>
