<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.ibm.wala</groupId>
  <artifactId>com.ibm.wala.util</artifactId>
  <version>1.5.0</version>
  <packaging>jar</packaging>
  <name>WALA utilities</name>
  <description>Utility library included with the T. J. Watson
  Libraries for Analysis (WALA).</description>
  <url>http://wala.sourceforge.net</url>
  <licenses>
    <license>
      <name>Eclipse Public License, Version 1.0</name>
      <url>https://www.eclipse.org/legal/epl-v10.html</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>Manu Sridharan</name>
      <email>m.sridharan@samsung.com</email>
      <organization>Samsung Research America</organization>
      <organizationUrl>http://www.sisa.samsung.com/</organizationUrl>
    </developer>
  </developers>
  <scm>
    <connection>scm:git:git@github.com:wala/WALA.git</connection>
    <developerConnection>scm:git:git@github.com:example/example-application.git</developerConnection>
    <url>git@github.com:example/example-application.git</url>
  </scm>

  <properties>
    <src.dir>src</src.dir>
  </properties>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <profiles>
    <profile>
      <id>jdk18</id>
      <activation>
        <jdk>1.8</jdk>
      </activation>
      <properties>
        <javadoc.options>-Xdoclint:none</javadoc.options>
      </properties>
    </profile>
  </profiles>
  
  <build>
    <sourceDirectory>${src.dir}</sourceDirectory>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.5</version>
        <configuration>
          <compilerId>javac-with-errorprone</compilerId>
          <forceJavacCompilerUse>true</forceJavacCompilerUse>
          <source>1.8</source>
          <target>1.8</target>
          <showWarnings>true</showWarnings>
          <!-- <annotationProcessorPaths> -->
          <!--   <path> -->
          <!--     <groupId>com.uber.nullaway</groupId> -->
          <!--     <artifactId>nullaway</artifactId> -->
          <!--     <version>0.1.3</version> -->
          <!--   </path> -->
          <!-- </annotationProcessorPaths> -->
          <compilerArgs>
            <!-- <arg>-Xep:NullAway:ERROR</arg> -->
            <!-- <arg>-XepOpt:NullAway:AnnotatedPackages=com.ibm.wala</arg> -->
            <arg>-Werror</arg>
            <arg>-Xep:IterableAndIterator:OFF</arg>
            <arg>-Xep:AmbiguousMethodReference:OFF</arg>
            <arg>-Xep:ReferenceEquality:OFF</arg>
            <arg>-Xep:ClassNewInstance:OFF</arg>
          </compilerArgs>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-compiler-javac-errorprone</artifactId>
            <version>2.8</version>
          </dependency>
          <!-- override plexus-compiler-javac-errorprone's dependency on
               Error Prone with the latest version -->
          <dependency>
            <groupId>com.google.errorprone</groupId>
            <artifactId>error_prone_core</artifactId>
            <version>2.1.1</version>
          </dependency>
        </dependencies>        
      </plugin>

      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.6.3</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>2.2.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <additionalparam>${javadoc.options}</additionalparam>
        </configuration>        
        <version>2.9.1</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

    <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>
        </execution>
      </executions>
    </plugin>
    
    </plugins>
  </build>
</project>
