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

  <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
  </parent>

  <groupId>edu.stanford.swrl</groupId>
  <artifactId>swrlapi-parent</artifactId>
  <version>2.1.2</version>
  <packaging>pom</packaging>

  <name>SWRLAPI Parent POM</name>
  <description>Parent POM for SWRLAPI Project</description>

  <properties>

    <swrlapi.version>${project.version}</swrlapi.version>
    <swrlapi.drools.version>${project.version}</swrlapi.drools.version>

    <jep.version>2.4.2</jep.version>
    <big.math.version>2.3.0</big.math.version>

    <owlapi.version>4.5.25</owlapi.version>
    <protege.version>5.6.2</protege.version>
    <axis.osgi.version>1.4_2</axis.osgi.version>
    <google.guava.version>18.0</google.guava.version>
    <eclipse.equinox.registry.version>3.5.101</eclipse.equinox.registry.version>

    <!-- Drools dependencies -->
    <drools.version>7.73.0.Final</drools.version>
    <mvel2.version>2.4.14.Final</mvel2.version>
    <antlr.runtime.version>3.5.3</antlr.runtime.version>
    <commons.discovery.osgi.version>0.4_1</commons.discovery.osgi.version>
    <commons.codec.version>1.15</commons.codec.version>
      
    <checker.framework.version>1.9.13</checker.framework.version>
    <annotatedJdk>${org.checkerframework:jdk8:jar}</annotatedJdk>

    <junit.version>4.13.2</junit.version>
    <slf4j.version>1.7.31</slf4j.version>
    <org.hamcrest.core.version>1.3</org.hamcrest.core.version>
    <google.code.findbugs.version>3.0.1</google.code.findbugs.version>

    <!-- Maven and Maven plugins -->
    <maven.version>3.8.2</maven.version>
    <maven.enforcer.plugin.version>3.2.1</maven.enforcer.plugin.version>
    <maven.site.plugin.version>3.9.1</maven.site.plugin.version>
    <maven.compiler.plugin.version>3.8.1</maven.compiler.plugin.version>
    <maven.jar.plugin.version>3.2.0</maven.jar.plugin.version>
    <maven.dependency.plugin.version>3.2.0</maven.dependency.plugin.version>
    <maven.bundle.plugin.version>5.1.8</maven.bundle.plugin.version>
    <maven.install.plugin.version>3.1.0</maven.install.plugin.version>
    <maven.source.plugin.version>3.2.1</maven.source.plugin.version>
    <maven.javadoc.plugin.version>3.4.1</maven.javadoc.plugin.version>
    <maven.failsafe.plugin.version>3.0.0-M8</maven.failsafe.plugin.version>
    <maven.deploy.plugin.version>3.1.1</maven.deploy.plugin.version>
    <maven.versions.plugin.version>2.8.1</maven.versions.plugin.version>
    <maven.resources.plugin.version>3.3.0</maven.resources.plugin.version>
    <maven.clean.plugin.version>3.2.0</maven.clean.plugin.version>
    <maven.exec.plugin.version>3.1.0</maven.exec.plugin.version>
    <maven.scm-api.plugin.version>2.0.0-M3</maven.scm-api.plugin.version>
    <maven.scm-provider-gitexe.plugin.version>2.0.0-M3</maven.scm-provider-gitexe.plugin.version>
    <maven.release.plugin.version>3.0.0-M7</maven.release.plugin.version>
    <maven.nexus-staging.plugin.version>1.6.13</maven.nexus-staging.plugin.version>
    <maven.gpg.plugin.version>3.0.1</maven.gpg.plugin.version>

    <java.version>11</java.version>

    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    
  </properties>

  <developers>
    <developer>
      <name>Martin O'Connor</name>
      <email>martin.oconnor@stanford.edu</email>
      <organization>Stanford Center for Biomedical Informatics Research</organization>
      <organizationUrl>https://bmir.stanford.edu</organizationUrl>
    </developer>
  </developers>

  <licenses>
    <license>
      <name>BSD 2-Clause License</name>
      <url>https://opensource.org/licenses/BSD-2-Clause</url>
    </license>
  </licenses>  

  <!-- SWRLAPI libraries are hosted on Sonatype OSSRH (OSS Repository Hosting Service). -->
  <distributionManagement>
    <snapshotRepository>
      <id>central-nexus-snapshots</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>central-nexus-staging</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

  <scm>
    <connection>scm:git:git@github.com:protegeproject/swrlapi-parent.git</connection>
    <developerConnection>scm:git:git@github.com:protegeproject/swrlapi-parent.git</developerConnection>
    <url>https://github.com/protegeproject/swrlapi-parent</url>
    <tag>release-2.1.2</tag>
  </scm>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/protegeproject/swrlapi/issues</url>
  </issueManagement>

  <dependencyManagement>
    <dependencies>

      <dependency>
        <groupId>org.apache.geronimo.bundles</groupId>
        <artifactId>axis</artifactId>
        <version>${axis.osgi.version}</version>
      </dependency>

      <dependency>
        <groupId>org.scijava</groupId>
        <artifactId>jep</artifactId>
        <version>${jep.version}</version>
      </dependency>

      <dependency>
        <groupId>ch.obermuhlner</groupId>
        <artifactId>big-math</artifactId>
        <version>${big.math.version}</version>
      </dependency>

      <!-- Protege and OWLAPI dependencies -->

      <dependency>
        <groupId>net.sourceforge.owlapi</groupId>
        <artifactId>owlapi-osgidistribution</artifactId>
        <version>${owlapi.version}</version>
      </dependency>

      <dependency>
        <groupId>edu.stanford.protege</groupId>
        <artifactId>protege-common</artifactId>
        <version>${protege.version}</version>
      </dependency>

      <dependency>
        <groupId>edu.stanford.protege</groupId>
        <artifactId>protege-editor-core</artifactId>
        <version>${protege.version}</version>
      </dependency>

      <dependency>
        <groupId>edu.stanford.protege</groupId>
        <artifactId>protege-editor-owl</artifactId>
        <version>${protege.version}</version>
      </dependency>

      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>${google.guava.version}</version>
      </dependency>

      <dependency>
        <groupId>org.eclipse.equinox</groupId>
        <artifactId>org.eclipse.equinox.registry</artifactId>
        <version>${eclipse.equinox.registry.version}</version>
      </dependency>

      <!-- Drools dependencies -->

      <dependency>
        <groupId>org.antlr</groupId>
        <artifactId>antlr-runtime</artifactId>
        <version>${antlr.runtime.version}</version>
      </dependency>
      
      <dependency>
        <groupId>org.mvel</groupId>
        <artifactId>mvel2</artifactId>
        <version>${mvel2.version}</version>
      </dependency>

      <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>${commons.codec.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.geronimo.bundles</groupId>
        <artifactId>commons-discovery</artifactId>
        <version>${commons.discovery.osgi.version}</version>
      </dependency>

      <!-- Checker dependencies -->
      
      <dependency>
        <groupId>org.checkerframework</groupId>
        <artifactId>checker</artifactId>
        <version>${checker.framework.version}</version>
      </dependency>

      <dependency>
        <groupId>org.checkerframework</groupId>
        <artifactId>checker-qual</artifactId>
        <version>${checker.framework.version}</version>
      </dependency>

      <dependency>
        <groupId>org.checkerframework</groupId>
        <artifactId>jdk8</artifactId>
        <version>${checker.framework.version}</version>
      </dependency>

      <!-- Test dependencies -->

      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
      </dependency>

      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.version}</version>
      </dependency>

      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>${slf4j.version}</version>
      </dependency>

      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>${slf4j.version}</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-core</artifactId>
        <version>${org.hamcrest.core.version}</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>com.google.code.findbugs</groupId>
        <artifactId>jsr305</artifactId>
        <version>${google.code.findbugs.version}</version>
      </dependency>

    </dependencies>
  </dependencyManagement>

  <build>

    <plugins>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>${maven.site.plugin.version}</version>
        <executions>
          <execution>
            <id>attach-descriptor</id>
            <goals>
              <goal>attach-descriptor</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      
    </plugins>

    <pluginManagement>
      <plugins>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>${maven.enforcer.plugin.version}</version>
          <executions>
            <execution>
              <id>enforce-maven</id>
              <goals>
                <goal>enforce</goal>
              </goals>
              <configuration>
                <rules>
                  <requireMavenVersion>
                    <version>${maven.version}</version>
                  </requireMavenVersion>
                </rules>
              </configuration>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${maven.compiler.plugin.version}</version>
          <configuration>
            <source>${java.version}</source>
            <target>${java.version}</target>
            <!-- Temporarily disabling Checker Framework. A small number Checker-identified issues remain.
                 <fork>true</fork>
                 <annotationProcessors>
                 <annotationProcessor>org.checkerframework.checker.nullness.NullnessChecker</annotationProcessor>
                 </annotationProcessors>
                 <compilerArgs>
                 <arg>-Xbootclasspath/p:${annotatedJdk}</arg>
                 </compilerArgs>
            -->
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>${maven.dependency.plugin.version}</version>
          <executions>
            <execution>
              <goals>
                <goal>properties</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>${maven.release.plugin.version}</version>
          <dependencies>
            <dependency>
              <groupId>org.apache.maven.scm</groupId>
              <artifactId>maven-scm-api</artifactId>
	      <version>${maven.scm-api.plugin.version}</version>
            </dependency>
            <dependency>
              <groupId>org.apache.maven.scm</groupId>
              <artifactId>maven-scm-provider-gitexe</artifactId>
	      <version>${maven.scm-provider-gitexe.plugin.version}</version>
            </dependency>
          </dependencies>
        </plugin>

        <plugin>   
          <groupId>org.apache.felix</groupId>
          <artifactId>maven-bundle-plugin</artifactId>
          <version>${maven.bundle.plugin.version}</version>
        </plugin>   

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${maven.jar.plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>${maven.resources.plugin.version}</version>
        </plugin>

        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <groupId>org.apache.maven.plugins</groupId>
          <version>${maven.clean.plugin.version}</version>
        </plugin>
        
        <plugin>
	  <groupId>org.apache.maven.plugins</groupId>
	  <artifactId>maven-deploy-plugin</artifactId>
	  <version>${maven.deploy.plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>${maven.failsafe.plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>${maven.install.plugin.version}</version>
        </plugin>

        <plugin>
  	  <groupId>org.codehaus.mojo</groupId>
	  <artifactId>exec-maven-plugin</artifactId>
          <version>${maven.exec.plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>versions-maven-plugin</artifactId>
          <version>${maven.versions.plugin.version}</version>
        </plugin>


      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <id>maven-central-release</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>

      <distributionManagement>

        <snapshotRepository>
          <id>central-nexus-snapshots</id>
          <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
          <id>central-nexus-releases</id>
          <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>

      </distributionManagement>

      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>${maven.source.plugin.version}</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>${maven.javadoc.plugin.version}</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <failOnError>false</failOnError>
                  <quiet>true</quiet>
                </configuration>
              </execution>
            </executions>
          </plugin>
          
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${maven.gpg.plugin.version}</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>${maven.nexus-staging.plugin.version}</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>central-nexus-releases</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <description>${project.version}</description>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>

        </plugins>

      </build>
    </profile>
  </profiles>

</project>
