<!-- Copyright 2015, 2016 Francesco Benincasa. Licensed under the Apache 
	License, Version 2.0 (the "License"); you may not use this file except in 
	compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 
	Unless required by applicable law or agreed to in writing, software distributed 
	under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 
	OR CONDITIONS OF ANY KIND, either express or implied. See the License for 
	the specific language governing permissions and limitations under the License. -->
<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>

	<name>Kripton Annotation Processor Library</name>

	<groupId>com.abubusoft</groupId>
	<artifactId>kripton-processor</artifactId>
	<version>1.4.0</version>
	<packaging>jar</packaging>

	<url>https://github.com/xcesco/kripton</url>

	<properties>
		<!-- use UTF-8 for everything -->
		<sourceEncoding>UTF-8</sourceEncoding>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<jsr305.version>3.0.1</jsr305.version>
		<guava.version>19.0</guava.version>
		<jackson.version>2.8.2</jackson.version>
		<jackson-cbor.version>2.8.2</jackson-cbor.version>
		<javapoet.version>1.7.0</javapoet.version>
		<junit.version>4.12</junit.version>
		<unitilsVersion>3.4.2</unitilsVersion>
		<robolectric.version>3.1.4</robolectric.version>
		<roboletricAndroidAll.version>6.0.0_r1-robolectric-0</roboletricAndroidAll.version>
	</properties>

	<description>Annotation processor for Kripton Android Library.</description>

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

	<issueManagement>
		<system>GitHub Issues</system>
		<url>https://github.com/xcesco/kripton/issues</url>
	</issueManagement>

	<scm>
		<connection>scm:git:https://github.com/xcesco/kripton.git</connection>
		<developerConnection>scm:git:git@github.com:xcesco/kripton.git</developerConnection>
		<url>https://github.com/xcesco/kripton</url>
	</scm>

	<developers>
		<developer>
			<id>xcesco</id>
			<name>Francesco Benincasa</name>
			<email>abubusoft@gmail.com</email>
			<roles>
				<role>owner</role>
				<role>developer</role>
			</roles>
		</developer>
	</developers>

	<dependencies>
		<!-- https://mvnrepository.com/artifact/junit/junit -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.unitils</groupId>
			<artifactId>unitils-core</artifactId>
			<version>${unitilsVersion}</version>
			<exclusions>
				<exclusion>
					<artifactId>junit</artifactId>
					<groupId>junit</groupId>
				</exclusion>
			</exclusions>
			<scope>test</scope>
		</dependency>


		<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core --> 
<!-- 		<dependency> -->
<!-- 			<groupId>com.fasterxml.jackson.core</groupId> -->
<!-- 			<artifactId>jackson-core</artifactId> -->
<!-- 			<version>${jackson.version}</version> -->
<!-- 		</dependency> -->

		<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.dataformat/jackson-dataformat-xml -->
<!-- 		<dependency> -->
<!-- 			<groupId>com.fasterxml.jackson.dataformat</groupId> -->
<!-- 			<artifactId>jackson-dataformat-xml</artifactId> -->
<!-- 			<version>${jackson.version}</version> -->
<!-- 		</dependency> -->

		<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml -->
<!-- 		<dependency> -->
<!-- 			<groupId>com.fasterxml.jackson.dataformat</groupId> -->
<!-- 			<artifactId>jackson-dataformat-yaml</artifactId> -->
<!-- 			<version>${jackson.version}</version> -->
<!-- 		</dependency> -->

		<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.dataformat/jackson-dataformat-properties -->
<!-- 		<dependency> -->
<!-- 			<groupId>com.fasterxml.jackson.dataformat</groupId> -->
<!-- 			<artifactId>jackson-dataformat-properties</artifactId> -->
<!-- 			<version>${jackson.version}</version> -->
<!-- 		</dependency> -->

		<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.dataformat/jackson-dataformats-binary -->
<!-- 		<dependency> -->
<!-- 			<groupId>com.fasterxml.jackson.dataformat</groupId> -->
<!-- 			<artifactId>jackson-dataformat-cbor</artifactId> -->
<!-- 			<version>${jackson.version}</version> -->
<!-- 		</dependency> -->

		<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.dataformat/jackson-dataformats-binary -->
<!-- 		<dependency> -->
<!-- 			<groupId>com.fasterxml.jackson.dataformat</groupId> -->
<!-- 			<artifactId>jackson-dataformat-smile</artifactId> -->
<!-- 			<version>${jackson.version}</version> -->
<!-- 		</dependency> -->

		<dependency>
			<groupId>com.sun</groupId>
			<artifactId>tools</artifactId>
			<version>1.7</version>
			<scope>system</scope>
			<systemPath>${tools.jar}</systemPath>
		</dependency>

		<dependency>
			<groupId>com.squareup</groupId>
			<artifactId>javapoet</artifactId>
			<version>${javapoet.version}</version>
		</dependency>

		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>3.0</version>
		</dependency>

		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<version>${guava.version}</version>
		</dependency>

		<dependency>
			<groupId>com.abubusoft.testing.compile</groupId>
			<artifactId>compile-testing</artifactId>
			<version>1.0.1</version>
			<scope>test</scope>
		</dependency>

		<!-- https://mvnrepository.com/artifact/org.robolectric/android-all -->
		<dependency>
			<groupId>org.robolectric</groupId>
			<artifactId>android-all</artifactId>
			<version>${roboletricAndroidAll.version}</version>
			<scope>compile</scope>
		</dependency>

		<!-- https://mvnrepository.com/artifact/org.robolectric/robolectric -->
		<dependency>
			<groupId>org.robolectric</groupId>
			<artifactId>robolectric</artifactId>
			<version>${robolectric.version}</version>
		</dependency>

	</dependencies>

	<profiles>

		<profile>
			<id>default-tools.jar</id>
			<activation>
				<file>
					<exists>${java.home}/../lib/tools.jar</exists>
				</file>
			</activation>
			<properties>
				<tools.jar>${java.home}/../lib/tools.jar</tools.jar>
			</properties>
		</profile>
		<profile>
			<id>default-tools.jar-mac</id>
			<activation>
				<file>
					<exists>${java.home}/../Classes/classes.jar</exists>
				</file>
			</activation>
			<properties>
				<tools.jar>${java.home}/../Classes/classes.jar</tools.jar>
			</properties>
		</profile>

		<profile>
			<id>prepare-eclipse</id>

			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-antrun-plugin</artifactId>
						<version>1.8</version>
						<executions>
							<execution>
								<phase>generate-sources</phase>
								<goals>
									<goal>run</goal>
								</goals>
								<configuration>
									<tasks>
										<echo>Using env.test.properties</echo>
										<copy file="${tools.jar}" tofile="${basedir}/eclipseLib/tools.jar" />
									</tasks>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>deploy</id>

			<build>
				<plugins>
					<!-- deploy on sonatype -->
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.5</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>true</autoReleaseAfterClose>
						</configuration>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.6</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>

			<!-- distribution manager -->
			<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>

		</profile>

		<profile>
			<id>release</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>

			<build>
				<plugins>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>2.10.2</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
								<configuration>
									<!-- <additionalparam>-Xdoclint:none</additionalparam> -->
									<!-- <failOnError>false</failOnError> -->
								</configuration>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>2.4</version>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

				</plugins>

			</build>
		</profile>


	</profiles>

	<build>

		<plugins>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>cobertura-maven-plugin</artifactId>
				<version>2.7</version>
				<configuration>
					<formats>
						<format>html</format>
						<format>xml</format>
					</formats>
					<check />
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.5.1</version>
				<configuration>
					<source>1.7</source>
					<target>1.7</target>
					<compilerArgs>
						<arg>-proc:none</arg>
						<arg>-Xlint:unchecked</arg>
					</compilerArgs>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<version>1.10</version>
				<executions>

					<execution>
						<id>add-source</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>add-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>../KriptonAndroidLibrary/src/main/java</source>
							</sources>
						</configuration>
					</execution>

					<execution>
						<id>add-test-source</id>
						<phase>generate-test-sources</phase>
						<goals>
							<goal>add-test-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>../KriptonAndroidLibrary/src/test/java</source>
							</sources>
						</configuration>
					</execution>


				</executions>
			</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>
											build-helper-maven-plugin
										</artifactId>
										<versionRange>
											[1.10,)
										</versionRange>
										<goals>
											<goal>add-source</goal>
											<goal>add-test-source</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>
</project>
