<?xml version="1.0" encoding="UTF-8"?>
<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">

	<properties>
		<maven.checkstyle.plugin>2.17</maven.checkstyle.plugin>
		<maven.doxia.module.markdown.version>1.7</maven.doxia.module.markdown.version>
		<maven.javadoc.plugin>2.10.4</maven.javadoc.plugin>
		<maven.jxr.plugin>2.5</maven.jxr.plugin>
		<maven.pmd.plugin>3.7</maven.pmd.plugin>
		<maven.project.info.reports.plugin>2.9</maven.project.info.reports.plugin>
		<maven.site.plugin>3.3</maven.site.plugin>
		<maven.sonar.plugin>3.2-RC3</maven.sonar.plugin>
		<maven.surefire.plugin>2.12</maven.surefire.plugin>
		<maven.taglist.plugin>2.4</maven.taglist.plugin>
		<maven.versions.plugin>2.3</maven.versions.plugin>
		<maven.findbugs.plugin>3.0.4</maven.findbugs.plugin>

		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

		<mysqlGroupId>mysql</mysqlGroupId>
		<mysqlArtifactId>mysql-connector-java</mysqlArtifactId>
		<mysqlVersion>8.0.15</mysqlVersion>
		
		<jackson.version>2.10.5</jackson.version>
	</properties>

	<modelVersion>4.0.0</modelVersion>
	<groupId>com.nervepoint</groupId>
	<artifactId>identity4j</artifactId>
	<version>1.2.2</version>
	<name>Identity4J</name>
	<description>A suite of Java Identity and Authentication Connectors.</description>
	<url>http://www.nervepoint.com</url>
	<packaging>pom</packaging>
	<inceptionYear>2013</inceptionYear>

	<licenses>
		<license>
			<name>GNU Lesser General Public License</name>
			<url>http://www.gnu.org/licenses/lgpl.html</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<organization>
		<name>LogonBox</name>
		<url>http://logonbox.com</url>
	</organization>

	<scm>
		<url>https://github.com/nervepoint/identity4j.git</url>
		<connection>scm:git:https://github.com/nervepoint/identity4j.git</connection>
	</scm>

	<distributionManagement>
		<snapshotRepository>
			<id>ossrh-snapshots</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
	</distributionManagement>

	<developers>
		<developer>
			<id>lee</id>
			<name>Lee David Painter</name>
			<email>lee@hypersocket.com</email>
			<organization>Hypersock</organization>
			<url>http://www.hypersocket.com</url>
		</developer>
		<developer>
			<id>brett</id>
			<name>Brett Smith</name>
			<email>brett@hypersocket.com</email>
			<organization>Hypersock</organization>
			<url>http://www.hypersocket.com</url>
		</developer>
	</developers>
	<modules>
		<module>identity4j-utils</module>
		<module>identity4j-vfs</module>
		<module>identity4j-connector</module>
		<module>identity4j-http</module>
		<module>identity4j-flatfile</module>
		<module>identity4j-unix</module>
		<module>identity4j-htpasswd</module>
		<module>identity4j-jdbc</module>
		<module>identity4j-mysql</module>
		<module>identity4j-as400</module>
		<module>identity4j-remote</module>
		<module>identity4j-google</module>
		<module>identity4j-office365</module>
		<module>identity4j-salesforce</module>
		<module>identity4j-script</module>
		<module>identity4j-script-ssh</module>
		<module>identity4j-script-http</module>
		<module>identity4j-script-hypersocket</module>
		<module>identity4j-zendesk</module>
		<module>identity4j-mysql-users-connector</module>
		<module>identity4j-ldap-directory-jndi</module>
		<module>identity4j-active-directory-jndi</module>
		<!-- <module>identity4j-sap</module> -->
		<module>identity4j-sap-users</module>
		<!-- <module>identity4j-webauth-test</module> -->
		<module>identity4j-aws</module>
	</modules>

	<dependencies>
		<!-- Tests -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.7</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.16</version>
			<scope>test</scope>
		</dependency>
	</dependencies>
	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-report-plugin</artifactId>
				<version>${maven.surefire.plugin}</version>
				<configuration>
					<outputDirectory>${project.reporting.outputDirectory}/testresults</outputDirectory>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>${maven.javadoc.plugin}</version>
				<configuration>
					<aggregate>true</aggregate>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<version>${maven.checkstyle.plugin}</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-project-info-reports-plugin</artifactId>
				<version>${maven.project.info.reports.plugin}</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jxr-plugin</artifactId>
				<version>${maven.jxr.plugin}</version>
				<configuration>
					<aggregate>true</aggregate>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>findbugs-maven-plugin</artifactId>
				<version>${maven.findbugs.plugin}</version>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>versions-maven-plugin</artifactId>
				<version>${maven.versions.plugin}</version>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>taglist-maven-plugin</artifactId>
				<version>${maven.taglist.plugin}</version>
				<configuration>
					<aggregate>true</aggregate>
				</configuration>
			</plugin>
		</plugins>
	</reporting>
	<profiles>
		<profile>
			<id>release-sign-artifacts</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.1</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>ossrh</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>true</autoReleaseAfterClose>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>doclint-java8-disable</id>
			<activation>
				<jdk>[1.8,)</jdk>
			</activation>

			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<configuration>
							<additionalparam>-Xdoclint:none</additionalparam>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>

        <profile>
            <activation>
                <jdk>[9,)</jdk>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-javadoc-plugin</artifactId>
                            <configuration>
                                <!-- TODO: Why is this STILL broken! -->
                                <javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
		
	</profiles>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>2.10.3</version>
					<executions>
						<execution>
							<id>release</id>
							<phase>package</phase>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<encoding>UTF-8</encoding>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-site-plugin</artifactId>
					<version>${maven.site.plugin}</version>
					<executions>
						<!-- used for multiproject builds -->
						<execution>
							<id>attach-descriptor</id>
							<goals>
								<goal>attach-descriptor</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<siteDirectory>${basedir}/site</siteDirectory>
						<locales>en</locales>
					</configuration>
					<dependencies>
						<!-- To use the Markdown format -->
						<dependency>
							<groupId>org.apache.maven.doxia</groupId>
							<artifactId>doxia-module-markdown</artifactId>
							<version>${maven.doxia.module.markdown.version}</version>
						</dependency>
					</dependencies>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>2.2.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-compiler-plugin</artifactId>
					<configuration>
						<source>1.8</source>
						<target>1.8</target>
						<encoding>UTF-8</encoding>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>2.19</version>
					<configuration>
						<excludes>
							<exclude>**/*ConnectorTest.java</exclude>
							<exclude>**/*IntegrationTest.java</exclude>
						</excludes>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>license-maven-plugin</artifactId>
					<version>1.6</version>

					<configuration>
						<licenseName>lgpl_v3</licenseName>
						<!-- <licenseResolver>${project.baseUri}/../vmcentre-nam-group/src/license</licenseResolver> -->
					</configuration>

					<executions>
						<execution>
							<id>first</id>
							<goals>
								<goal>update-file-header</goal>
							</goals>
							<phase>process-sources</phase>
							<configuration>
								<canUpdateCopyright>true</canUpdateCopyright>
								<canUpdateDescription>true</canUpdateDescription>
							</configuration>
						</execution>
					</executions>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>
</project>
