<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.1</version>
	<packaging>pom</packaging>
	<name>AndHow Parent Project</name>
	<description>
		AndHow is an easy to use configuration framework with strong typing and
		detailed validation for web apps, command line or any application environment.
	</description>
	
	<mailingLists>
		<mailingList>
			<name>AndHowUser</name>
			<subscribe>https://groups.google.com/forum/#!forum/andhowuser</subscribe>
		</mailingList>
	</mailingLists>

	<!-- Main page list.  Source code at: https://github.com/eeverman/andhow -->
	<url>https://sites.google.com/view/andhow/home</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.1</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>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
		<doclint>none</doclint>
	</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.13.1</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-test</artifactId>
				<version>4.3.18.RELEASE</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>commons-io</groupId>
				<artifactId>commons-io</artifactId>
				<version>2.7</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>com.google.testing.compile</groupId>
				<artifactId>compile-testing</artifactId>
				<version>0.15</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-all</artifactId>
				<version>1.10.19</version>
				<scope>test</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>
	
	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.8.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>3.3.0</version>
					<inherited>true</inherited>
					<executions>
						<execution>
							<id>javadoc-jar</id>
							<phase>package</phase>
							<goals>
								<goal>jar</goal>
							</goals>
							<inherited>true</inherited>
							<configuration>
								<includeDependencySources>true</includeDependencySources>
								<doclint>none</doclint>
								<quiet>true</quiet>
							</configuration>
						</execution>
					</executions>
				</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-M2</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.5,4.0)</version>
								</requireMavenVersion>
								<requireJavaVersion>
									<!-- 1.8 thru 15.  JDK 16 seems to have issues -->
									<version>[1.8.0,16)</version>
								</requireJavaVersion>
							</rules>    
						</configuration>
					</execution>
				</executions>
			</plugin>
			<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 />
					<aggregate>true</aggregate>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>versions-maven-plugin</artifactId>
				<version>2.6</version>
				<configuration>
					<generateBackupPoms>false</generateBackupPoms>
				</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>
			<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>
	</build>
	
	<profiles>
		<profile>
			<id>source-and-javadoc-jar</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>3.0.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>
					</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>AllJDK8</id>
			<activation>
				<jdk>[1.8,1.9)</jdk>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-compiler-plugin</artifactId>
						<configuration>
							<source>1.8</source>
							<target>1.8</target>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>SomeJDK8s</id>
			<activation>
				<activeByDefault>false</activeByDefault>
				<file>
					<exists>${java.home}/../lib/tools.jar</exists>
				</file>
			</activation>
			<dependencies>
				<dependency>
					<groupId>com.sun</groupId>
					<artifactId>tools</artifactId>
					<version>1.8</version>
					<scope>system</scope>
					<systemPath>${java.home}/../lib/tools.jar</systemPath>
				</dependency>
			</dependencies>
		</profile>
		<profile>
			<id>java9AndBeyond</id>
			<!--
			Its not possible to build a JRE 1.8 compatable jar file using JDK9
			because of the need to use the '-add-modules' feature of JDK9.
			Currently the use of jdk9 is blocked by the enforcer plugin, above.
			For the 0.5.0 release, the JRE8 will be left behind and only this
			profile will be active.
			-->
			<activation>
				<jdk>[1.9,)</jdk>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-compiler-plugin</artifactId>
						<configuration>
							<compilerArgs>
								<arg>--add-modules=jdk.compiler</arg>
							</compilerArgs>
							<!-- without forking compilation happens in the
							same process, so no arguments are applied -->
							<fork>true</fork>
							<source>1.9</source>
							<target>1.9</target>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
