<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>org.yarnandtail</groupId>
	<artifactId>andhow-parent</artifactId>
	<version>0.4.0</version>
	<packaging>pom</packaging>
	<name>AndHow Parent Project</name>
	<description>
		Simple typed and validated configuration loading for web apps,
		command line or any environment application.
	</description>
	<url>https://github.com/eeverman/andhow</url>

	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0</url>
			<comments>
				Copyright 2016 Eric Everman

				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.
			</comments>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Eric Everman</name>
			<email>eeverman+github@yarnandtail.org</email>
			<id>eeverman</id>
			<timezone>-6</timezone>
			<url>https://github.com/eeverman</url>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:git@github.com:eeverman/andhow.git</connection>
		<developerConnection>scm:git:git@github.com:eeverman/andhow.git</developerConnection>
		<url>https://github.com/eeverman/andhow/tree/master</url>
		<tag>andhow-0.4.0</tag>
	</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.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>

	<modules>
		<module>andhow-core</module>
		<module>andhow-annotation-processor</module>
		<module>andhow</module>
		<module>andhow-testing/andhow-system-tests</module>
		<module>andhow-testing/andhow-annotation-processor-tests</module>
		<module>andhow-testing/andhow-simulated-app-tests</module>
		<module>andhow-testing/andhow-test-harness</module>
		<module>andhow-testing/andhow-annotation-processor-test-harness</module>
	</modules>

	<repositories>
		<repository>
			<id>repo1-maven</id>
			<name>Repo1 Maven</name>
			<url>http://repo1.maven.org/maven/</url>
		</repository>
	</repositories>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>4.12</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-test</artifactId>
				<version>4.3.5.RELEASE</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>commons-io</groupId>
				<artifactId>commons-io</artifactId>
				<version>2.5</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>com.google.testing.compile</groupId>
				<artifactId>compile-testing</artifactId>
				<version>0.12</version>
				
				<!-- comp-test has conflicting versions of guava -->
				<exclusions>
					<exclusion>
						<groupId>com.google.guava</groupId>
						<artifactId>guava</artifactId>
					</exclusion>
				</exclusions>
				<scope>test</scope>
			</dependency>
			<dependency>
				<!-- fixed for compile-testing -->
				<groupId>com.google.guava</groupId>
				<artifactId>guava</artifactId>
				<version>21.0</version>
				<scope>test</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>
	
	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.6.2</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>2.10.4</version>
					<configuration>
						<additionalparam>-Xdoclint:none</additionalparam>
						<quiet>true</quiet>
					</configuration>
				</plugin>
				<plugin>
					<inherited>true</inherited>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>2.8.2</version>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<version>3.0.0-M1</version>
				<executions>
					<execution>
						<id>enforce-maven</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<requireMavenVersion>
									<!-- 3.2.2 req'ed for this bug fix: https://issues.apache.org/jira/browse/MNG-4565 -->
									<version>3.2.2</version>
								</requireMavenVersion>
								<requireJavaVersion>
									<version>[1.8.0,1.9)</version>
								</requireJavaVersion>
							</rules>    
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
					<compilerVersion>1.8</compilerVersion> 
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-deploy-plugin</artifactId>
				<configuration>
					<updateReleaseInfo>false</updateReleaseInfo>
					<deployAtEnd>true</deployAtEnd>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.5.3</version>
				<configuration>
					<arguments>remoteDeploy=true</arguments>
					<autoVersionSubmodules>true</autoVersionSubmodules>
					<tagNameFormat>andhow-@{project.version}</tagNameFormat>
					<releaseProfiles>source-and-javadoc-jar,gpg-sign</releaseProfiles>
					<useReleaseProfile>true</useReleaseProfile>
					<preparationGoals>clean verify</preparationGoals>
					<goals>deploy</goals>
				</configuration>
			</plugin>
		</plugins>
	</build>
	
	<profiles>
		<profile>
			<id>source-and-javadoc-jar</id>
			<build>
				<plugins>
					<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-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<additionalparam>-Xdoclint:none</additionalparam>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>gpg-sign</id>
			<build>
				<plugins>
					<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>
								<configuration>
									<keyname>${yarnandtail.gpg.keyname}</keyname>
									<passphraseServerId>${yarnandtail.gpg.keyname}</passphraseServerId>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>windows-java.home</id>
			<activation>
				<os>
					<family>windows</family>
				</os>
				<file>
					<exists>${java.home}/../lib/tools.jar</exists>
					<missing>${JAVA_HOME}/lib/tools.jar</missing>
				</file>
			</activation>
			<dependencies>
				<dependency>
					<groupId>jdk.tools</groupId>
					<artifactId>jdk.tools</artifactId>
					<version>jdk1.8.0</version>
					<scope>system</scope>
					<systemPath>${java.home}/../lib/tools.jar</systemPath>
				</dependency>
			</dependencies>
		</profile>
		<profile>
			<id>windows-JAVA_HOME</id>
			<activation>
				<os>
					<family>windows</family>
				</os>
				<file>
					<exists>${JAVA_HOME}/lib/tools.jar</exists>
				</file>
			</activation>
			<dependencies>
				<dependency>
					<groupId>jdk.tools</groupId>
					<artifactId>jdk.tools</artifactId>
					<version>jdk1.8.0</version>
					<scope>system</scope>
					<systemPath>${JAVA_HOME}/lib/tools.jar</systemPath>
				</dependency>
			</dependencies>
		</profile>
	</profiles>

</project>
