<!--
    Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
 -->
<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">
	<parent>
		<groupId>com.att.cadi</groupId>
		<artifactId>parent</artifactId>
		<version>1.2.10-oss</version>
		<relativePath>..</relativePath>
	</parent>

	<modelVersion>4.0.0</modelVersion>
	<name>CADI AAF (Application Authorization Framework) LUR</name>
	<packaging>jar</packaging>
	<artifactId>cadi-aaf</artifactId>

	<dependencies>
		<dependency>
			<groupId>com.att.authz</groupId>
			<artifactId>authz-client</artifactId>
		</dependency>

		<dependency>
			<groupId>com.att.cadi</groupId>
			<artifactId>cadi-client</artifactId>
		</dependency>
		
		<dependency>
			<groupId>com.att.aft</groupId>
			<artifactId>dme2</artifactId>
			<scope>compile</scope>
		</dependency>
		
		<dependency>
			<groupId>org.slf4j</groupId>
		    <artifactId>slf4j-log4j12</artifactId>
		    <version>1.7.5</version>
		    <scope>test</scope>
		</dependency>

		<!-- dependency>
    		<groupId>org.apache.cassandra</groupId>
    		<artifactId>cassandra-all</artifactId>
    		<version>2.1.2</version>
    		<scope>compile</scope>
    		<exclusions>
		      <exclusion> 
		        <groupId>org.slf4j</groupId>
		        <artifactId>slf4j-log4j12</artifactId>
		      </exclusion>
		      <exclusion> 
		        <groupId>log4j</groupId>
		        <artifactId>log4j</artifactId>
		      </exclusion>
		    </exclusions> 
		</dependency-->
		
	</dependencies>
	<build>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>jaxb2-maven-plugin</artifactId>
				<version>1.3</version>
				<executions>
					<execution>
						<phase>generate-sources</phase>
						<goals>
							<goal>xjc</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<schemaDirectory>src/main/xsd</schemaDirectory>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<archive>
						<manifestEntries>
							<Sealed>true</Sealed>
						</manifestEntries>
					</archive>

				</configuration>
				<executions>
					<execution>
						<id>test-jar</id>
						<phase>package</phase>
						<goals>
							<goal>test-jar</goal>
						</goals>
					</execution>
				</executions>
				
			</plugin>

			<!-- We want to create a Jar with Rosetta built in (since I don't want 
				a separate deployment at this time Use this one as the jar to put in SWM 
				packages -->
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<version>2.4</version>
				<configuration>
					<classifier>tests</classifier>
					<archive>
						<manifestEntries>
							<Sealed>true</Sealed>
						</manifestEntries>
					</archive>
				</configuration>
				<executions>
					<execution>
						<id>full</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<descriptors>
								<descriptor>src/assemble/cadi-aaf.xml</descriptor>
							</descriptors>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<!-- Must put this in to turn on Signing, but Configuration itself is 
					in Parent -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jarsigner-plugin</artifactId>
				<configuration>
					<skip>false</skip>
				</configuration>
				<executions>
					<execution>
						<id>sign-full</id>
						<goals>
							<goal>sign</goal>
						</goals>
						<configuration>
							<archive>target/${project.artifactId}-${project.version}-full.jar</archive>
						</configuration>
					</execution>
					<execution>
						<id>verify-full</id>
						<goals>
							<goal>verify</goal>
						</goals>
						<configuration>
							<archive>target/${project.artifactId}-${project.version}-full.jar</archive>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>jaxb2-maven-plugin</artifactId>
				<version>1.3</version>
				<executions>
					<execution>
						<phase>generate-sources</phase>
						<goals>
							<goal>xjc</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<schemaDirectory>src/main/xsd</schemaDirectory>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>2.6</version>
				<configuration>
					<skip>false</skip>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>3.0.0</version>
				<executions>
					<execution>
					  <id>attach-sources</id>
						<goals>
				<goal>jar</goal>
				</goals>
					</execution>
				</executions>
            </plugin>
            
            <plugin>
        	<groupId>org.apache.maven.plugins</groupId>
        	<artifactId>maven-javadoc-plugin</artifactId>
        	<configuration>
            		<failOnError>false</failOnError>
		</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>
	            <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>ossrhdme</serverId>
			<nexusUrl>https://oss.sonatype.org/</nexusUrl>
			<autoReleaseAfterClose>true</autoReleaseAfterClose>
			</configuration>
		</plugin>
			
		</plugins>

		<pluginManagement>
			<plugins>
				<!--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.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											org.codehaus.mojo
										</groupId>
										<artifactId>
											jaxb2-maven-plugin
										</artifactId>
										<versionRange>
											[1.3,)
										</versionRange>
										<goals>
											<goal>xjc</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>
	
	<!-- ============================================================== -->
	<!-- Maven Central Repository Information -->
	<!-- ============================================================== -->
	
	<scm>
		<connection>https://github.com/att/cadi-oss-1.2.10.git</connection>
		<developerConnection>${project.scm.connection}</developerConnection>
		<url>https://github.com/att/cadi-oss-1.2.10</url>
	</scm>
<distributionManagement>
    		<snapshotRepository>
      			<id>ossrhdme</id>
      			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
    		</snapshotRepository>
    		<repository>
      			<id>ossrhdme</id>
      			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    		</repository>
	</distributionManagement>
</project>
