<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>

  <!-- ============================================== -->
  <!-- Configuration -->
  <!-- ============================================== -->

  <groupId>org.whiley</groupId>
  <artifactId>wycli</artifactId>
  <version>0.8.2</version>
  <packaging>jar</packaging>

  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>      
    </license>
  </licenses>

  <!-- ============================================== -->
  <!-- Description -->
  <!-- ============================================== -->

  <name>Whiley Command-Line Interface</name>
  <description>
    A command-line interface for interacting with the Whiley ecosystem.
  </description>

  <url>http://whiley.org/</url>

  <scm>
    <url>https://github.com/Whiley/WhileyComandLineTool</url>
  </scm>

  <developers>
    <developer>
      <id>redjamjar</id>
      <name>David J. Pearce</name>
      <email>david.pearce@ecs.vuw.ac.nz</email>
      <url>http://www.ecs.vuw.ac.nz/~djp</url>
    </developer>
  </developers>

  <!-- ============================================== -->
  <!-- Dependencies -->
  <!-- ============================================== -->

  <dependencies>
    <dependency>
      <groupId>org.whiley</groupId>
      <artifactId>wycc</artifactId>
      <version>[0.8.2,0.9.0)</version>
    </dependency>    
    <dependency>
    	<groupId>org.apache.httpcomponents</groupId>
    	<artifactId>httpclient</artifactId>
    	<version>4.5.10</version>
    </dependency>    
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <!-- ============================================== -->
  <!-- Deployment -->
  <!-- ============================================== -->

  <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>

  <!-- ============================================== -->
  <!-- Build Config -->
  <!-- ============================================== -->

  <build>
    <plugins>
      <plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-compiler-plugin</artifactId>
	<version>3.8.1</version>
	<configuration>
          <source>1.8</source>
          <target>1.8</target>
	</configuration>
      </plugin>

      <!-- ============================================== -->
      <!-- Testing -->
      <!-- ============================================== -->

      <!-- ============================================== -->
      <!-- Sources Attachment -->
      <!-- ============================================== -->

      <plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-source-plugin</artifactId>
	<version>3.1.0</version>
	<executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
	</executions>
      </plugin>

      <!-- ============================================== -->
      <!-- JavaDoc Attachment -->
      <!-- ============================================== -->

      <plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-javadoc-plugin</artifactId>
	<version>2.9.1</version>
	<executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
	    <configuration>
              <additionalparam>-Xdoclint:none</additionalparam>
            </configuration>
          </execution>
	</executions>
      </plugin>

      <!-- ============================================== -->
      <!-- GPG Signing -->
      <!-- ============================================== -->

      <plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-gpg-plugin</artifactId>
	<version>1.6</version>
	<configuration>	
          <!-- Prevent gpg from using pinentry programs -->
          <gpgArguments>
            <arg>--pinentry-mode</arg>
            <arg>loopback</arg>
          </gpgArguments>
	</configuration>	
	<executions>
          <execution>
            <id>sign-artifacts</id>
            <phase>verify</phase>
            <goals>
              <goal>sign</goal>
            </goals>
          </execution>
	</executions>
      </plugin>

      <!-- ============================================== -->
      <!-- Deployment -->
      <!-- ============================================== -->

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.3</version>
        <configuration>
          <useReleaseProfile>false</useReleaseProfile>
          <releaseProfiles>release</releaseProfiles>
          <goals>deploy</goals>
        </configuration>
      </plugin>

      <plugin>
	<groupId>org.sonatype.plugins</groupId>
	<artifactId>nexus-staging-maven-plugin</artifactId>
	<version>1.6.8</version>
	<extensions>true</extensions>
	<configuration>
	  <serverId>ossrh</serverId>
	  <nexusUrl>https://oss.sonatype.org/</nexusUrl>
	  <autoReleaseAfterClose>true</autoReleaseAfterClose>
	</configuration>
      </plugin>

    </plugins>
  </build>

</project>

