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

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

  <groupId>org.whiley</groupId>
  <artifactId>wyc-all</artifactId>
  <version>0.9.8</version>
  <packaging>pom</packaging>
  
  <modules>
    <module>wycc</module>
    <module>wycli</module>      
    <module>wyc</module>
    <module>wyqc</module>
  </modules>
  
  <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 Compiler (WyC)</name>

  <description>
    The Whiley Compiler is a component of the Whiley Compiler
    Collection which is responsible for compiling Whiley source files
    into binary WyIL files.  The compiler supports compile-time
    verification of source files.
  </description>

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

  <scm>
    <url>https://github.com/Whiley/WhileyCompiler</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>
     <dependency>
      <groupId>org.whiley</groupId>
      <artifactId>jbuildfs</artifactId>
      <version>1.0.1</version>
     </dependency>
     <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13.1</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>9</source>
          <target>9</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>
