<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>
	<groupId>com.github.devnied.emvnfccard</groupId>
	<artifactId>parent</artifactId>
	<packaging>pom</packaging>
	<version>2.1.1</version>
	<name>EMV Paycard Enrollment</name>

	<parent>
		<groupId>org.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>7</version>
	</parent>

	<inceptionYear>2013</inceptionYear>
	<description>
	 	A Java library used to read and extract data from EMV paycard.
	</description>
	<issueManagement>
		<url>https://github.com/devnied/EMV-NFC-Paycard-Enrollment/issues</url>
	</issueManagement>

	<url>https://github.com/devnied/EMV-NFC-Paycard-Enrollment</url>
	<developers>
		<developer>
			<name>MILLAU Julien</name>
			<id>devnied</id>
			<email>mxjulien@gmail.com</email>
			<roles>
				<role>Java Developer</role>
			</roles>
		</developer>
	</developers>

	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<scm>
		<connection>scm:git:git@github.com:devnied/EMV-NFC-Paycard-Enrollment.git</connection>
		<developerConnection>scm:git:git@github.com:devnied/EMV-NFC-Paycard-Enrollment.git</developerConnection>
		<url>scm:git:git@github.com:devnied/EMV-NFC-Paycard-Enrollment.git</url>
		<tag>parent-2.1.1</tag>
	</scm>

	<modules>
		<module>library</module>
		<module>sample</module>
		<module>sample-pcsc</module>
	</modules>

	<properties>
		<android.version>4.1.1.4</android.version>
		<powermock.version>1.5.4</powermock.version>
	</properties>

	<dependencyManagement>
		<dependencies>

			<!-- bit-lib4j -->
			<dependency>
				<groupId>com.github.devnied</groupId>
				<artifactId>bit-lib4j</artifactId>
				<version>1.4.10</version>
			</dependency>

			<!-- Apache commons -->
			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-lang3</artifactId>
				<version>3.1</version>
			</dependency>

			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-collections4</artifactId>
				<version>4.0</version>
			</dependency>

			<dependency>
				<groupId>commons-io</groupId>
				<artifactId>commons-io</artifactId>
				<version>2.4</version>
			</dependency>

			<!-- Android -->
			<dependency>
				<groupId>com.google.android</groupId>
				<artifactId>android</artifactId>
				<version>${android.version}</version>
				<scope>provided</scope>
			</dependency>

			<!-- Tests -->
			<dependency>
				<groupId>org.powermock</groupId>
				<artifactId>powermock-module-junit4</artifactId>
				<version>${powermock.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.powermock</groupId>
				<artifactId>powermock-api-easymock</artifactId>
				<version>${powermock.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>cglib</groupId>
				<artifactId>cglib</artifactId>
				<version>3.1</version>
				<scope>test</scope>
			</dependency>

		</dependencies>
	</dependencyManagement>

	<distributionManagement>
		<snapshotRepository>
			<id>sonatype-nexus-snapshots</id>
			<name>Sonatype Nexus Snapshots</name>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>sonatype-nexus-staging</id>
			<name>Nexus Release Repository</name>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
		</repository>
	</distributionManagement>

	<build>
		<sourceDirectory>src/main/java</sourceDirectory>
		<testSourceDirectory>src/test/java</testSourceDirectory>
		<defaultGoal>install</defaultGoal>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jarsigner-plugin</artifactId>
					<version>1.3.2</version>
					<executions>
						<execution>
							<id>signing</id>
							<goals>
								<goal>sign</goal>
								<goal>verify</goal>
							</goals>
							<phase>package</phase>
							<inherited>true</inherited>
							<configuration>
								<skip>${sign.skip}</skip>
								<removeExistingSignatures>true</removeExistingSignatures>
								<archiveDirectory />
								<excludes>
									<exclude>${project.build.directory}/*.apk</exclude>
									<exclude>${project.build.directory}/*.jar</exclude>
								</excludes>
								<includes>
									<include>${project.build.directory}/sample-signed-aligned.apk</include>
								</includes>
								<keystore>${sign.keystore}</keystore>
								<alias>${sign.alias}</alias>
								<storepass>${sign.storepass}</storepass>
								<keypass>${sign.keypass}</keypass>
								<argument>-sigalg</argument><argument>MD5withRSA</argument>
								<argument>-digestalg</argument><argument>SHA1</argument>
								<verbose>true</verbose>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>com.jayway.maven.plugins.android.generation2</groupId>
					<artifactId>android-maven-plugin</artifactId>
					<version>4.0.0-rc.2</version>
					<configuration>
						<release>true</release>
						<sdk>
							<platform>19</platform>
						</sdk>
						<androidManifestFile>AndroidManifest.xml</androidManifestFile>
						<resourceDirectory>res</resourceDirectory>
						<assetsDirectory>assets</assetsDirectory>
						<proguard>
							<skip>false</skip>
						</proguard>
						<sign>
							<debug>false</debug>
						</sign>
						<zipalign>
							<verbose>false</verbose>
							<inputApk>${project.build.directory}/${project.artifactId}.apk</inputApk>
							<outputApk>${project.build.directory}/${project.artifactId}-signed-aligned.apk</outputApk>
							<skip>false</skip>
						</zipalign>
					</configuration>
					<executions>
						<execution>
							<id>alignApk</id>
							<phase>package</phase>
							<goals>
								<goal>zipalign</goal>
							</goals>
						</execution>
					</executions>
					<extensions>true</extensions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.1</version>
					<configuration>
						<source>1.6</source>
						<target>1.6</target>
						<encoding>UTF-8</encoding>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-resources-plugin</artifactId>
					<version>2.6</version>
					<configuration>
						<encoding>UTF-8</encoding>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>2.5</version>
					<configuration>
						<mavenExecutorId>forked-path</mavenExecutorId>
						<localCheckout>true</localCheckout>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-source-plugin</artifactId>
					<version>2.2.1</version>
					<executions>
						<execution>
							<id>attach-sources</id>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.eluder.coveralls</groupId>
					<artifactId>coveralls-maven-plugin</artifactId>
					<version>2.2.0</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>cobertura-maven-plugin</artifactId>
					<version>2.5.2</version>
					<configuration>
						<formats>
							<format>html</format>
							<format>xml</format>
						</formats>
						<maxmem>256m</maxmem>
						<!-- aggregated reports for multi-module projects -->
						<aggregate>true</aggregate>
						<instrumentation>
							<excludes>
								<exclude>com/github/devnied/emvpcsccard/**/*.class</exclude>
							</excludes>
						</instrumentation>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>
	<profiles>
		<profile>
			<id>ci</id>
			<properties>
				<sign.skip>true</sign.skip>
			</properties>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
		</profile>
		<profile>
			<id>release-apk</id>
			<properties>
				<sign.skip>false</sign.skip>
			</properties>
		</profile>
		<profile>
			<id>release-sign-artifacts</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<properties>
				<sign.skip>true</sign.skip>
			</properties>
			<build>
				<plugins>
					<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>
	</profiles>

</project>
