<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.galigator.openllet</groupId>
  <artifactId>openllet-parent</artifactId>
  <version>2.5.1</version>
  <packaging>pom</packaging>
  <name>Openllet :: Parent POM</name>
  <description>Openllet is open-source future of Pellet OWL Reasoner</description>
  <url>https://github.com/Galigator/openllet</url>
  <licenses>
    <license>
      <name>GNU Affero General Public License 3.0</name>
      <url>http://www.fsf.org/licensing/licenses/agpl-3.0.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <modules>
    <module>aterm</module>
    <module>core</module>
    <module>jena</module>
    <module>query</module>
    <module>owlapi</module>
    <module>explanation</module>
    <module>modularity</module>
    <module>pellint</module>
    <module>cli</module>
    <module>examples</module>
    <module>test</module>
    <module>profiler</module>
    <module>protege</module>
    <module>distribution</module>
  </modules>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/Galigator/openllet/issues</url>
  </issueManagement>
  
  <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:Galigator/openllet.git</connection>
    <developerConnection>scm:git:git@github.com:Galigator/openllet.git</developerConnection>
    <url>https://github.com/Galigator/openllet</url>
  </scm>
  
  
  <developers>
    <developer>
       <id>galigator</id>
       <name>Kévin Séjourné</name>
       <email>openllet@gmail.com</email>
    </developer>
  </developers>
  
  <properties>
    <junit.version>4.11</junit.version>
    <slf4j.version>1.7.10</slf4j.version>
    <owlapi.version>5.0.2</owlapi.version>
    <jena.version>3.0.1</jena.version>
    <commons-io.version>2.4</commons-io.version>
    <org.jfree.jfreechart>1.0.19</org.jfree.jfreechart>
    <org.apache.commons.commons-math3>3.6.1</org.apache.commons.commons-math3>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <org.antlr.antlr-runtime>3.5.2</org.antlr.antlr-runtime>
    <xerces.xercesImpl>2.11.0</xerces.xercesImpl>
    <org.jgrapht.jgrapht-ext>0.9.2</org.jgrapht.jgrapht-ext>
    <gnu.getopt.java-getopt>1.0.13</gnu.getopt.java-getopt>
  </properties>

  <prerequisites>
      <maven>3.1.1</maven> <!-- Default debian 8 -->
  </prerequisites>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.apache.jena</groupId>
        <artifactId>jena-core</artifactId>
        <version>${jena.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.jena</groupId>
        <artifactId>jena-arq</artifactId>
        <version>${jena.version}</version>
      </dependency>
      <dependency>
        <groupId>net.sourceforge.owlapi</groupId>
        <artifactId>owlapi-distribution</artifactId>
        <version>${owlapi.version}</version>
      </dependency>
      <dependency>
        <groupId>org.jgrapht</groupId>
        <artifactId>jgrapht-ext</artifactId>
        <version>${org.jgrapht.jgrapht-ext}</version>
      </dependency>
      <dependency>
        <groupId>xerces</groupId>
        <artifactId>xercesImpl</artifactId>
        <version>${xerces.xercesImpl}</version>
      </dependency>
      <dependency>
        <groupId>org.antlr</groupId>
        <artifactId>antlr-runtime</artifactId>
        <version>${org.antlr.antlr-runtime}</version>
      </dependency>
      <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-log4j12</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>jcl-over-slf4j</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.17</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>${commons-io.version}</version>
      </dependency>
      <dependency>
        <groupId>org.jfree</groupId>
        <artifactId>jfreechart</artifactId>
        <version>${org.jfree.jfreechart}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-math3</artifactId>
        <version>${org.apache.commons.commons-math3}</version>
      </dependency>
      <dependency>
        <groupId>gnu.getopt</groupId>
        <artifactId>java-getopt</artifactId>
        <version>${gnu.getopt.java-getopt}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.1</version>
          <configuration>
            <source>1.8</source>
            <target>1.8</target>
            <encoding>UTF-8</encoding>
          </configuration>
        </plugin>

        <plugin> <!-- Deployement on the maven central (sonatype) use on mvn deploy -->
          <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-jar-plugin</artifactId>
          <version>2.4</version>
          <configuration>
            <archive>
              <manifest>
                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
              </manifest>
              <manifestEntries>
                <Bundle-Description>${project.description}</Bundle-Description>
                <Implementation-Version>${project.version}</Implementation-Version>
              </manifestEntries>
            </archive>
          </configuration>
          <executions>
            <execution>
              <goals>
                <goal>test-jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        
        <plugin> <!-- Deployement on the maven central (sonatype : source) -->
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.2.1</version>
          <executions>
            <execution>
              <id>attach-source</id>
              <goals>
                <goal>jar-no-fork</goal>
              </goals>
            </execution>
            <execution>
              <id>attach-test-sources</id>
              <goals>
                <goal>test-jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <plugin> <!-- Deployement on the maven central (sonatype : javadoc) -->
          <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>
            </execution>
          </executions>
        </plugin>
        
        <plugin> <!-- Deployement on the maven central (sonatype : signature) -->
          <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>        

        <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-dependency-plugin</artifactId>
          <version>2.8</version>
        </plugin>
        
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.16</version>
          <dependencies>
            <dependency>
              <groupId>org.apache.maven.surefire</groupId>
              <artifactId>surefire-junit4</artifactId>
              <version>2.16</version>
            </dependency>
          </dependencies>
          <configuration>
            <forkCount>1</forkCount>
            <reuseForks>true</reuseForks>
            <argLine></argLine>
          </configuration>
        </plugin>
        
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>2.16</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>2.4</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>2.5</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.5.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>2.6</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.4.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.3</version>
        </plugin>
        
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>findbugs-maven-plugin</artifactId>
          <version>2.5.3</version>
          <executions>
            <execution>
              <id>findbugs-check</id>
              <phase>verify</phase>
              <goals>
                <goal>check</goal>
              </goals>
              <configuration>
                <failOnError>false</failOnError>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
      
    <profile>
      <id>ossrh</id>
      <activation>
        <activeByDefault>false</activeByDefault>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>

          <!-- We need the GPG Plugin to self-sign the jar files. A valid signature 
            for the jar files is a requirement for deploying to Sonatype. -->
          <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>

          <!-- We need to configure the Source Plugin for deploying the sources to Sonatype. -->
          <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</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <!-- We need to configure the Javadoc Plugin for deploying the Javadocs to Sonatype -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.8.1</version>
            <configuration>
              <show>public</show>
            </configuration>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <skip>${no-javadoc}</skip>
                  <additionalparam>-Xdoclint:none</additionalparam> <!-- I know its not good, but I wont fix all the javadoc in one shoot. All the new writing have good doc, give me time to correct more than ten year of bad practice. -->
                </configuration>
              </execution>
            </executions>
          </plugin>

        </plugins>
      </build>
    </profile>
    
    <profile> <!-- Someone use this ? -->
      <id>findbugs</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>findbugs-maven-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
    
  </profiles>

</project>
