<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>com.sshtools</groupId>
	<artifactId>maverick-synergy-group</artifactId>
	<version>3.1.1</version>
	<name>Maverick Synergy</name>
	<description>Open source Java SSH API</description>
	<url>http://www.jadaptive.com</url>
	<packaging>pom</packaging>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.compiler.target>11</maven.compiler.target>
		<maven.compiler.source>11</maven.compiler.source>
	</properties>

	<licenses>
		<license>
			<name>GNU Lesser General Public License</name>
			<url>http://www.gnu.org/licenses/gpl.html</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
	<scm>
		<url>https://github.com/sshtools/maverick-synergy/</url>
		<connection>scm:git:https://github.com/sshtools/maverick-synergy.git</connection>
	</scm>

	<developers>
		<developer>
			<id>lee</id>
			<name>Lee David Painter</name>
			<email>lee@sshtools.com</email>
			<organization>JADAPTIVE Limited</organization>
			<organizationUrl>https://www.jadaptive.com</organizationUrl>
		</developer>
	</developers>

	<distributionManagement>
		<snapshotRepository>
			<id>ossrh-sshtools</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh-sshtools</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>


	<profiles>
		<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>
								<excludePackageNames>**.impl.*</excludePackageNames>
								<!--
								https://bugs.openjdk.java.net/browse/JDK-8212233 -->
								<detectJavaApiLink>false</detectJavaApiLink>
								<source>8</source>
								<doclint>none</doclint>
							</configuration>
						</plugin>
					</plugins>
				</pluginManagement>
			</build>
		</profile>
		<profile>
			<id>sign</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.5</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
								<configuration>
									<gpgArguments>
										<arg>--pinentry-mode</arg>
										<arg>loopback</arg>
									</gpgArguments>
								</configuration>
							</execution>

						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.11.0</version>
				<configuration>
					<source>11</source>
					<target>11</target>
				</configuration>
			</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>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.2.0</version>
				<executions>
					<execution>
						<id>javadoc-jar</id>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
						<configuration>
							<!-- switch on dependency-driven aggregation -->
							<includeDependencySources>false</includeDependencySources>
							<dependencySourceIncludes>
								<!-- include ONLY dependencies I control -->
								<dependencySourceInclude>com.sshtools:*</dependencySourceInclude>
							</dependencySourceIncludes>
							<excludePackageNames>**.impl.*</excludePackageNames>
							<additionalparam>-Xdoclint:none</additionalparam>
							<detectJavaApiLink>false</detectJavaApiLink>
							<doclint>none</doclint>
							<source>8</source>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<version>2.2.0</version>
				<configuration>
					<licenseName>lgpl_v3</licenseName>
					<organizationName>JADAPTIVE Limited</organizationName>
					<inceptionYear>2002</inceptionYear>
					<includes>
						<include>**/*.java</include>
					</includes>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>update-file-header</goal>
						</goals>
						<phase>process-sources</phase>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.13</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>ossrh-sshtools</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>true</autoReleaseAfterClose>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<id>copy-dependencies</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>copy-dependencies</goal>
						</goals>
						<configuration>
							<outputDirectory>
								${project.build.directory}/third-party</outputDirectory>
							<overWriteReleases>true</overWriteReleases>
							<overWriteSnapshots>true</overWriteSnapshots>
							<overWriteIfNewer>true</overWriteIfNewer>
							<excludeGroupIds>com.sshtools,junit,org.hamcrest</excludeGroupIds>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>com.github.spotbugs</groupId>
				<artifactId>spotbugs-maven-plugin</artifactId>
				<version>3.1.12.2</version>
			</plugin>
		</plugins>
	</build>

	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.13.1</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<modules>
		<module>maverick-utils</module>
		<module>maverick-logging</module>
		<module>maverick-base</module>
		<module>maverick-base-tests</module>
		<module>maverick-synergy-common</module>
		<module>maverick-synergy-common-tests</module>
		<module>maverick-synergy-jdk16-common</module>
		<module>maverick-synergy-client</module>
		<module>maverick-synergy-jdk16-client</module>
		<module>maverick-synergy-client-tests</module>
		<module>maverick-synergy-server</module>
		<module>maverick-synergy-callback-client</module>
		<module>maverick-synergy-callback-server</module>
		<module>maverick-synergy-jdk16-server</module>
		<module>maverick-virtual-filesystem</module>
		<module>maverick-virtual-filesystem-tests</module>
		<module>maverick-synergy-s3</module>
		<module>maverick-virtual-session</module>
		<module>maverick-virtual-session-tests</module>
		<module>maverick-x509</module>
		<module>maverick-putty</module>
		<module>maverick-bc</module>
		<module>maverick-bc-tests</module>
		<module>maverick-bc-fips</module>
		<module>maverick-bc-fips-tests</module>
		<module>maverick-sshagent</module>
		<module>maverick-sshagent-jni-sockets</module>
		<module>maverick-sshagent-jdk16-sockets</module>
		<module>maverick-sshagent-named-pipes</module>		
		<module>maverick-synergy</module>
		<module>maverick-synergy-assembly</module>
	</modules>
</project>
