<?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>swrltab-plugin</artifactId>
  <version>1.0.0-beta-1</version>
  <name>SWRLTab Protege 5.0+ Plugin</name>
  <description>SWRLTab Plugin for Desktop Protege 5.0+</description>
  <url>https://github.com/protegeproject/swrltab-plugin/wiki</url>
  <packaging>bundle</packaging>
  
  <properties>

    <protege.version>5.0.0-beta-21</protege.version> 
    <swrlapi.version>1.0.0-beta-1</swrlapi.version>
    <swrlapi.drools.version>1.0.0-beta-1</swrlapi.drools.version>
    <owlapi.version>4.1.3</owlapi.version> 

    <slf4j.version>1.7.13</slf4j.version>

    <maven.compiler.plugin.version>2.3.2</maven.compiler.plugin.version>
    <maven.bundle.plugin.version>2.5.4</maven.bundle.plugin.version>
    <maven.release.plugin.version>2.5</maven.release.plugin.version>
    <maven.source.plugin.version>2.2.1</maven.source.plugin.version>
    <maven.javadoc.plugin.version>2.9.1</maven.javadoc.plugin.version>
    <maven.gpg.plugin.version>1.5</maven.gpg.plugin.version>
    <maven.scm.gitexe.version>1.9</maven.scm.gitexe.version>
    
    <java.version>1.8</java.version> 

    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

  </properties>

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

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

  <!-- The SWRLTab Plugin is hosted on Sonatype OSSRH (OSS Repository Hosting Service). -->
  <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:protegeproject/swrltab-plugin.git</connection>
    <developerConnection>scm:git:git@github.com:protegeproject/swrltab-plugin.git</developerConnection>
    <url>https://github.com/protegeproject/swrltab-plugin</url>
    <tag>swrltab-plugin-1.0.0-beta-1</tag>
  </scm>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/protegeproject/swrltab-plugin/issues</url>
  </issueManagement>

  <dependencies>

    <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>net.sourceforge.owlapi</groupId>
      <artifactId>owlapi-osgidistribution</artifactId>
      <version>${owlapi.version}</version>
    </dependency>

    <dependency>
      <groupId>edu.stanford.swrl</groupId>
      <artifactId>swrlapi</artifactId>
      <version>${swrlapi.version}</version>
    </dependency>

    <dependency>
      <groupId>edu.stanford.swrl</groupId>
      <artifactId>swrlapi-drools-engine</artifactId>
      <version>${swrlapi.drools.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>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <build>
    <plugins>
      <plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-compiler-plugin</artifactId>
	<version>${maven.compiler.plugin.version}</version>
	<configuration>
	  <source>${java.version}</source>
	  <target>${java.version}</target>
	</configuration>
      </plugin>
      
      <plugin>
	<groupId>org.apache.felix</groupId>
	<artifactId>maven-bundle-plugin</artifactId>
	<version>${maven.bundle.plugin.version}</version>
	<extensions>true</extensions>
	<configuration>

	  <instructions>
	    <Bundle-Activator>org.protege.editor.owl.ProtegeOWL</Bundle-Activator>
	    <Bundle-SymbolicName>${project.artifactId};singleton:=true</Bundle-SymbolicName>
	    <Include-Resource>plugin.xml, {maven-resources}</Include-Resource>
            <Bundle-ClassPath>.</Bundle-ClassPath>
            <Embed-Transitive>true</Embed-Transitive>
            <Embed-Dependency>
              swrlapi, swrlapi-drools-engine, 
              axis,
              drools-core, drools-compiler, knowledge-api, drools-reteoo, antlr-runtime, kie-api, kie-internal, mvel2, ecj, 
              checker, checker-qual, 
              commons-codec, commons-discovery
            </Embed-Dependency>
            <Import-Package>
              org.protege.editor.core.*;version="5.0.0",
              org.protege.editor.owl.*;version="5.0.0",
              org.semanticweb.owlapi.*;version="[4.1.3,5.0.0)",
              org.swrlapi.*;version="1.0.0",
              org.swrlapi.drools.*;version="1.0.0",
              com.ibm.*;resolution:=optional,
              com.sun.*;resolution:=optional,
              sun.*;resolution:=optional,
              javax.*;resolution:=optional,
              org.apache.tools.ant.*;resolution:=optional,
              org.apache.bsf.*;resolution:=optional,
              org.apache.commons.httpclient.*;resolution:=optional,
              org.apache.commons.logging.*;resolution:=optional,
              org.apache.commons.net.*;resolution:=optional,
              com.thoughtworks.xstream.*;resolution:=optional,
              com.google.protobuf.*;resolution:=optional,
              org.antlr.stringtemplate.*;resolution:=optional,
              org.codehaus.janino.*;resolution:=optional,
              org.eclipse.jdt.*;resolution:=optional,
              org.exolab.castor.xml.*;resolution:=optional,
              org.junit.*;resolution:=optional,
              *
            </Import-Package>
   	  </instructions>

	  <executions>
	    <execution>
	      <id>bundle-manifest</id>
	      <phase>install</phase>
	      <goals>    
		<goal>manifest</goal>
	      </goals>   
	    </execution>
	  </executions>

	</configuration>
      </plugin>

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

    </plugins>

  </build>

  <profiles>
    <profile>
      <id>prepare-release</id>
      <activation>
	<activeByDefault>false</activeByDefault>
      </activation>
      <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>
	</plugins>
      </build>
    </profile>
  </profiles>

</project>
