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

  <!-- We use SonaType for publishing artefacts. Parent POM makes things easier here. -->
  <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>5</version>
  </parent>

  <!-- Project info. -->
  <groupId>com.carrotsearch</groupId>
  <artifactId>nni</artifactId>
  <version>1.0.0</version>
  <packaging>jar</packaging>

  <name>NNI</name>
  <description>Native Java interfaces to to BLAS/LAPACK libraries.</description>
  <url>http://www.carrot2.org</url>


  <!-- Extended project info. -->
  <licenses>
    <license>
      <name>GNU Lesser General Public License, Version 3</name>
      <url>http://www.gnu.org/licenses/lgpl-3.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <organization>
    <name>Carrot Search s.c.</name>
    <url>http://www.carrotsearch.com</url>
  </organization>

  <issueManagement>
    <system>Jira</system>
    <url>http://issues.carrot2.org/browse/CARROT</url>
  </issueManagement>

  <mailingLists>
    <mailingList>
      <name>Announcements and bug reports mailing list</name>
      <post>carrot2-developers@lists.sourceforge.net</post>
    </mailingList>
  </mailingLists>

  <scm>
    <url>https://carrot2.svn.sourceforge.net/svnroot/carrot2/trunk</url>
    <connection>scm:svn:https://carrot2.svn.sourceforge.net/svnroot/carrot2/trunk</connection>
    <developerConnection>scm:svn:https://carrot2.svn.sourceforge.net/svnroot/carrot2/trunk</developerConnection>
  </scm>

  <developers>
    <developer>
      <id>dawid.weiss</id>
      <name>Dawid Weiss</name>
      <email>dawid.weiss@carrotsearch.com</email>
    </developer>

    <developer>
      <id>stanislaw.osinski</id>
      <name>Stanisław Osiński</name>
      <email>stanislaw.osinski@carrotsearch.com</email>
    </developer>
  </developers>

  <!-- Global properties. -->
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.5</maven.compiler.source>
    <maven.compiler.target>1.5</maven.compiler.target>
  </properties>


  <profiles>
    <!-- Release mode (javadocs, sources, zip/tgz bundles). -->
    <profile>
      <id>release</id>

      <build>
        <defaultGoal>install</defaultGoal>

        <plugins>
          <!-- Attach JavaDocs. -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.6.1</version>
            <configuration>
              <encoding>${project.build.sourceEncoding}</encoding>
              <use>false</use>
            </configuration>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <!-- Attach sources -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.1.2</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- Manual release mode. Prepare bundle ZIPs, sign everything once completed 
      and prepare sonatype's release bundle. -->
    <profile>
      <id>sonatype</id>
      <build>
        <defaultGoal>verify</defaultGoal>

        <plugins>
          <!-- GPG sign artefacts. -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.1</version>
            <executions>
              <execution>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <!-- Create a release bundle for SonaType. -->
          <plugin>
          <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-assembly-plugin</artifactId>
            <configuration>
              <descriptors>
                <descriptor>src/main/assembly/release.xml</descriptor>
              </descriptors>
              <tarLongFileMode>gnu</tarLongFileMode>
              <finalName>release-bundle</finalName>
              <attach>false</attach>
              <appendAssemblyId>false</appendAssemblyId>
            </configuration>
            <executions>
              <execution>
                <id>make-assembly</id>
                <phase>verify</phase>
                <goals>
                  <goal>single</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>


