<?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>com.github.labri-progress</groupId>
  <artifactId>naturalness-java</artifactId>
  <version>1.1</version>

  <name>naturalness-java</name>

  <url>https://github.com/labri-progress/naturalness-java</url>

  <description>
    Naturalness-java implements naturalness for Java.
  </description>

  <developers>
    <developer>
      <id>xbl</id>
      <name>Xavier Blanc</name>
      <email>blancxav@gmail.com</email>
      </developer>
    <developer>
    <id>flop</id>
    <name>Floréal Morandat</name>
    <email>florealm@gmail.com</email>
    </developer>
  </developers>

  <licenses>
    <license>
    <name>Apache Software Foundation (ASF) License v2.0</name>
    <url>http://www.apache.org/licenses/LICENSE-2.0</url>
    </license>
  </licenses>

  <properties>
    <java.version>8</java.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <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>

  <scm>
    <connection>scm:git:git://github.com/labri-progress/naturalness-java.git</connection>
    <developerConnection>scm:git:git@github.com:labri-progress/naturalness-java.git</developerConnection>
    <url>https://github.com/labri-progress/naturalness-java</url>
    <tag>naturalness-java-1.1</tag>
  </scm>

  
  <profiles>
    <!-- GPG Signature on release -->
    <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.6</version>
    <executions>
    <execution>
    <id>sign-artifacts</id>
    <phase>verify</phase>
    <goals>
    <goal>sign</goal>
    </goals>
    </execution>
    </executions>
    </plugin>
    </plugins>
    </build>
    </profile>
  </profiles>

  <build>
    <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
      <plugins>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.8.0</version>
          <configuration>
            <source>${java.version}</source>
            <target>${java.version}</target>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</version>
          <executions>
            <execution>
              <id>default-deploy</id>
              <phase>deploy</phase>
              <goals>
                <goal>deploy</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.3</version>
          <configuration>
            <localCheckout>true</localCheckout>
            <pushChanges>false</pushChanges>
            <mavenExecutorId>forked-path</mavenExecutorId>
            <arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>
            </configuration>
          <dependencies>
            <dependency>
              <groupId>org.apache.maven.scm</groupId>
              <artifactId>maven-scm-provider-gitexe</artifactId>
              <version>1.9.5</version>
            </dependency>
          </dependencies>
        </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>
        <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>
      </plugins>
    </pluginManagement>
  </build>
</project>
