<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>edu.stanford.nlp</groupId>
  <artifactId>stanford-kbp</artifactId>
  <version>1.0.0</version>
  <packaging>jar</packaging>
  <name>Stanford KBP</name>

  <description>
    Stanford's KBP system, based around the MIML-RE relation extractor.
  </description>

  <url>http://nlp.stanford.edu/software/mimlre.shtml</url>

  <!-- Source control required; this is not in the public Git, so use
       the CoreNLP git instead -->
  <scm>
    <connection>scm:git:git@github.com:stanfordnlp/CoreNLP.git</connection>
    <developerConnection>scm:git:git@github.com:stanfordnlp/CoreNLP.git</developerConnection>
    <url>git@github.com:stanfordnlp/CoreNLP.git</url>
  </scm>

  <licenses>
    <license>
    <name>GNU General Public License Version 3</name>
    <url>http://www.gnu.org/licenses/gpl-3.0.txt</url>
    </license>
  </licenses>

  <developers>
    <developer>
    <id>christopher.manning</id>
    <name>Christopher Manning</name>
    <email>manning@stanford.edu</email>
    </developer>
    <developer>
    <id>gabor.angeli</id>
    <name>Gabor Angeli</name>
    <email>angeli@cs.stanford.edu</email>
    </developer>
  </developers>

  <properties>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <encoding>UTF-8</encoding>
  </properties>

  <!-- Configure dependencies -->
  <dependencies>
    <!-- CoreNLP -->
    <dependency>
      <groupId>edu.stanford.nlp</groupId>
      <artifactId>stanford-corenlp</artifactId>
      <version>3.5.0</version>
    </dependency>
    <dependency>
      <groupId>edu.stanford.nlp</groupId>
      <artifactId>stanford-corenlp</artifactId>
      <version>3.5.0</version>
      <classifier>models</classifier>
    </dependency>
    <!-- Postgresql (for caching) -->
    <dependency>
    	<groupId>org.postgresql</groupId>
    	<artifactId>postgresql</artifactId>
    	<version>9.3-1102-jdbc41</version>
    </dependency>
    <!-- Kryo (for serialization) -->
    <dependency>
    	<groupId>com.esotericsoftware.kryo</groupId>
    	<artifactId>kryo</artifactId>
    	<version>2.21</version>
    </dependency>
    <!-- Typesafe (for reading configuration) -->
    <dependency>
    	<groupId>com.typesafe</groupId>
    	<artifactId>config</artifactId>
    	<version>1.0.0</version>
    </dependency>
    <!-- Lucene (for IR) -->
    <dependency>
    	<groupId>org.apache.lucene</groupId>
    	<artifactId>lucene-core</artifactId>
    	<version>4.2.1</version>
    </dependency>
    <dependency>
    	<groupId>org.apache.lucene</groupId>
    	<artifactId>lucene-analyzers-common</artifactId>
    	<version>4.2.1</version>
    </dependency>
    <!-- Protobuf (for serialization) -->
    <dependency>
    	<groupId>com.google.protobuf</groupId>
    	<artifactId>protobuf-java</artifactId>
    	<version>2.4.1</version>
    </dependency>
    <!-- Mail (for sending notifications) -->
    <dependency>
    	<groupId>javax.mail</groupId>
    	<artifactId>javax.mail-api</artifactId>
    	<version>1.5.2</version>
    </dependency>
    <!-- ReVerb (for inference) -->
    <dependency>
    	<groupId>edu.washington.cs.knowitall</groupId>
    	<artifactId>reverb-core</artifactId>
    	<version>1.4.1</version>
    </dependency>
    <!-- OpenCSV (for reading SQL dumps) -->
    <dependency>
    	<groupId>net.sf.opencsv</groupId>
    	<artifactId>opencsv</artifactId>
    	<version>2.3</version>
    </dependency>
  </dependencies>

  <!-- Location of Sonatype repository to release to -->
  <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>

  <!-- Configure actual build -->
  <build>
    <sourceDirectory>src</sourceDirectory>
    <plugins>
      <!-- plugin to attach models to the build -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.7</version>
        <executions>
          <execution>
            <id>attach-models</id>
            <phase>package</phase>
            <goals>
              <goal>attach-artifact</goal>
            </goals>
            <configuration>
              <artifacts>
                <artifact>
                  <file>${project.basedir}/kbp-models.jar</file>
                  <type>jar</type>
                  <classifier>models</classifier>
                </artifact>
              </artifacts>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <!-- plugin to print the classpath to a file -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>2.8</version>
        <executions>
         <execution>
          <id>build-classpath</id>
          <phase>generate-sources</phase>
          <goals>
            <goal>build-classpath</goal>
          </goals>
           <configuration>
              <outputFile>classpath.txt</outputFile>
              <mdep.outputFile>classpath.maven.txt</mdep.outputFile>
           </configuration>
         </execution>
       </executions>
      </plugin>
      <!-- plugin to generate sources jar -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.2.1</version>
        <configuration>
          <sourcepath>${basedir}/src/main/java/:${basedir}/src/test/java/</sourcepath>
        </configuration>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <!-- plugin to generate JavaDoc -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.9.1</version>
        <configuration>
          <sourcepath>${basedir}/src/main/java/:${basedir}/src/test/java/</sourcepath>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <!-- plugin to gpg sign files -->
      <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>
      <!-- plugin to release to sonatype -->
      <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>
    </plugins>
  </build>
</project>
