<?xml version="1.0" encoding="utf-8"?>
<!--
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at
 
       http://www.apache.org/licenses/LICENSE-2.0
 
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
 
   See the NOTICE file distributed with this work for additional
   information regarding copyright ownership.
-->

<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>org.topbraid</groupId>
  <artifactId>shacl</artifactId>
  <version>1.2.0-INTERNAL</version>
  <packaging>jar</packaging>

  <name>TopBraid SHACL API</name>
  <description>TopBraid SHACL API</description>
  <url>http://topbraid.org/shacl/api</url>

  <organization>
    <name>TopQuadrant, Inc.</name>
    <url>http://topquadrant.com</url>
  </organization>

  <licenses>
    <license>
      <name>Apache License v2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <issueManagement>
    <url>https://github.com/TopQuadrant/shacl/issues</url>
  </issueManagement>

  <developers>
    <developer>
      <name>Holger Knublauch</name>
    </developer>
  </developers>
  
  <contributors>
    <contributor>
      <!-- Github contributors page -->
      <url>https://github.com/TopQuadrant/shacl/graphs/contributors</url>
    </contributor>
  </contributors>

  <scm>
    <url>https://github.com/TopQuadrant/shacl</url>
    <connection>scm:git:https://github.com/TopQuadrant/shacl</connection>
    <developerConnection>scm:git:git@github.com:TopQuadrant/shacl.git</developerConnection>
    <tag>HEAD</tag>
  </scm>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <ver.jena>3.8.0</ver.jena>
    <ver.junit>4.12</ver.junit>
    <ver.slf4j>1.7.25</ver.slf4j>
    <ver.log4j1>1.2.17</ver.log4j1>
  </properties>

  <prerequisites>
    <maven>3.0.4</maven>
  </prerequisites>
 
  <dependencies>

    <dependency>
      <groupId>org.apache.jena</groupId>
      <artifactId>jena-arq</artifactId>
      <version>${ver.jena}</version>
    </dependency>

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

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

    <!-- Logging : <optional> so the application chooses the provider for slf4j -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <version>${ver.slf4j}</version>
      <optional>true</optional>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>${ver.log4j1}</version>
      <optional>true</optional>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <build>
    <plugins>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.7.0</version>
         <configuration>
            <encoding>UTF-8</encoding>
            <debug>true</debug>
            <debuglevel>source,lines,vars</debuglevel>
            <optimize>true</optimize>
            <source>1.8</source>
            <target>1.8</target>
         </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.0.2</version>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.0.1</version>
        <executions> 
          <execution>
            <id>attach-sources</id>
            <!-- <phase>package</phase> package is the default -->
            <goals>
              <goal>jar-no-fork</goal> 
            </goals>
          </execution>
          <execution>
            <id>attach-sources-test</id>
            <goals>
              <goal>test-jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>3.1.0</version>
        <configuration>
          <descriptors>
            <descriptor>src/assembly/bin.xml</descriptor>
          </descriptors>
        </configuration>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.3</version>
        <configuration>
          <goals>deploy</goals>
          <autoVersionSubmodules>true</autoVersionSubmodules>
        </configuration> 
      </plugin>
      
    </plugins>
  </build>
  
  <profiles>
    <profile>
      <id>release</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.8</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>ossrh.releases</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.10.3</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.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <distributionManagement>
    <repository>
      <id>mulesoft.deployer</id>
      <name>mule-releases</name>
      <url>https://repository-master.mulesoft.org/nexus/content/repositories/releases</url>
    </repository>
    <snapshotRepository>
      <id>mule-ee-snapshots</id>
      <name>Mule Snapshot Repository</name>
      <url>https://repository-master.mulesoft.org/nexus/content/repositories/snapshots</url>
      <uniqueVersion>false</uniqueVersion>
    </snapshotRepository>
  </distributionManagement>

</project>
