<?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">
	<modelVersion>4.0.0</modelVersion>

	<groupId>uk.co.bithatch</groupId>

	<name>Linux I/O For Java</name>
	<description>A JNA based library providing access to some low-level Linux subsystems, including :-

* UInput. Create virtual devices such as keyboards, mice and touchpads and emit events from them as if they
  were real.

* Evdev. Read events from various devices such as keyboards, mice, touchpads, and all other devices exposed by Linux.

* Frame Buffer. Write directly to the Linux framebuffer. Allows graphical user interfaces without X being present.

As from version 2.0, this library is now in uk.co.bithatch namespace. Version 2.1 and above support Java 8, and module Java 9 and above.</description>
	<artifactId>linuxio4j</artifactId>
	<version>2.1</version>

	<url>https://github.com/bithatch/linuxio4j</url>

	<!-- Output to jar format -->
	<packaging>jar</packaging>

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

	<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>
	<scm>
		<url>https://github.com/bithatch/linuxio4j</url>
		<connection>scm:git:https://github.com/bithatch/linuxio4j.git</connection>
		<developerConnection>scm:git:https://github.com/bithatch/linuxio4j.git</developerConnection>
	</scm>
	<developers>
		<developer>
			<id>brett</id>
			<name>Brett Smith</name>
			<email>tanktarta@gmail.com</email>
		</developer>
	</developers>
	<inceptionYear>2012</inceptionYear>
	<organization>
		<name>Bithatch</name>
		<url>http://bithatch.co.uk</url>
	</organization>

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

	<build>
		<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
		<resources>
			<resource>
				<directory>${project.basedir}/src/main/resources</directory>
			</resource>
		</resources>
		<!-- <testSourceDirectory>testing</testSourceDirectory> -->
		<plugins>

			<!-- Source Code Plugin -->
			<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</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- JavaDoc Plugin -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.2.0</version>
				<executions>
					<execution>
						<id>release</id>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<!-- <skip>true</skip> -->
					<encoding>UTF-8</encoding>
					<excludePackageNames>**.impl.*</excludePackageNames>
					<!-- https://stackoverflow.com/questions/49472783/maven-is-unable-to-find-javadoc-command -->
					<javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>

					<!-- https://bugs.openjdk.java.net/browse/JDK-8212233 -->
					<source>8</source>
				</configuration>
			</plugin>

			<!-- Maven Compiler Plugin -->

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.8.1</version>
				<executions>
					<execution>
						<id>compile8</id>
						<goals>
							<goal>compile</goal>
						</goals>
						<configuration>
							<source>1.8</source>
							<target>1.8</target>
						</configuration>
					</execution>
					<execution>
						<id>compile9</id>
						<phase>compile</phase>
						<goals>
							<goal>compile</goal>
						</goals>
						<configuration>
							<release>9</release>
							<compileSourceRoots>
								<compileSourceRoot>${project.basedir}/src/main/java</compileSourceRoot>
								<compileSourceRoot>${project.basedir}/src/main/java9</compileSourceRoot>
							</compileSourceRoots>
							<multiReleaseOutput>true</multiReleaseOutput>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<!-- Make this jar executable -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.2.0</version>
				<configuration>
					<archive>
						<manifest>
							<addClasspath>true</addClasspath>
							<mainClass>uk.co.bithatch.linuxio.tools.LinuxIO</mainClass>
						</manifest>
						<manifestEntries>
							<Multi-Release>true</Multi-Release>
						</manifestEntries>
					</archive>
				</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>
						<configuration>
							<gpgArguments>
								<arg>--pinentry-mode</arg>
								<arg>loopback</arg>
							</gpgArguments>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.8</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>ossrh-bithatch</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>true</autoReleaseAfterClose>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<version>3.0.0</version>
				<configuration>
					<mainClass>uk.co.bithatch.linuxio.tools.LinuxIO</mainClass>
				</configuration>
			</plugin>

			<plugin>
				<groupId>com.mycila</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<version>3.0</version>
				<configuration>
					<header>src/main/templates/GPL-3.txt</header>
					<properties>
						<owner>Bithatch</owner>
						<email>tanktarta@gmail.com</email>
					</properties>
					<excludes>
						<exclude>**/README</exclude>
						<exclude>src/main/templates/**</exclude>
						<exclude>pom.xml</exclude>
						<exclude>src/test/resources/**</exclude>
						<exclude>src/main/resources/**</exclude>
					</excludes>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>format</goal>
						</goals>
						<id>licenses</id>
						<phase>process-sources</phase>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
	<dependencies>
		<dependency>
			<groupId>net.java.dev.jna</groupId>
			<artifactId>jna</artifactId>
			<version>5.3.1</version>
		</dependency>
		<dependency>
			<groupId>net.java.dev.jna</groupId>
			<artifactId>jna-platform</artifactId>
			<version>5.3.1</version>
		</dependency>
	</dependencies>
</project>

