<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  
  <!-- header -->
  <modelVersion>4.0.0</modelVersion>
  <groupId>xyz.cp74</groupId>
  <artifactId>evdev</artifactId>
  <name>Simple evdev for Java</name>
  <version>1.0</version>
  <description>Simple reader of Linux input device events (evdev) for Java</description>
  <url>https://github.com/cyberp/simple-evdev-java</url>
  <packaging>jar</packaging>
  
  <!-- license informations -->
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
  	</license>
  </licenses>
  
  <!-- developers -->
  <developers>
    <developer>
      <id>cp</id>
      <name>Christian Paul</name>
      <email>info@cp74.xyz</email>
    </developer>
  </developers>
 
  <!-- properties -->
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <java.version>1.8</java.version>
    <maven.compiler.source>8</maven.compiler.source>
    <maven.compiler.target>8</maven.compiler.target>
  </properties>
  
  <!-- github scm -->
  <scm>
    <connection>scm:git:https://github.com/cyberp/simple-evdev-java.git</connection>
    <developerConnection>scm:git:https://github.com/cyberp/simple-evdev-java.git</developerConnection>
    <url>https://github.com/cyberp/simple-evdev-java</url>
  </scm>
  
  <!-- snapshot repository -->
  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

  <!-- profiles -->  
  <profiles>
    <profile>
      <id>release</id>
	  <build>
	    <plugins>
	    
	      <!-- generate sources jar -->
	      <plugin>
	        <groupId>org.apache.maven.plugins</groupId>
	        <artifactId>maven-source-plugin</artifactId>
	        <version>3.2.1</version>
	        <executions>
	          <execution>
	            <id>attach-sources</id>
	            <goals>
	              <goal>jar-no-fork</goal>
	            </goals>
	          </execution>
	        </executions>
	      </plugin>
	      
	      <!-- generate javadoc jar -->
	      <plugin>
	        <groupId>org.apache.maven.plugins</groupId>
	        <artifactId>maven-javadoc-plugin</artifactId>
	        <version>3.2.0</version>
	        <configuration>
	          <doclint>all,-missing</doclint>
	        </configuration>
	        <executions>
	          <execution>
	            <id>attach-javadocs</id>
	            <goals>
	              <goal>jar</goal>
	            </goals>
	          </execution>
	        </executions>
	      </plugin>
	      
	      <!-- deploy to maven central -->      
	      <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://s01.oss.sonatype.org/</nexusUrl>
	          <autoReleaseAfterClose>false</autoReleaseAfterClose>
	        </configuration>
	      </plugin>
	      
	      <!-- sign with gpg -->
	      <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>

</project>