<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>
  <groupId>com.nitorcreations</groupId>
  <artifactId>javaxdelta</artifactId>
  <version>1.5</version>
  <name>javaxdelta</name>
  <prerequisites>
    <maven>3.2.0</maven>
  </prerequisites>
  <!-- Project meta-data -->
  <description>javaxdelta - Patch generator and patch tool using the GDIFF algorithm</description>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
  <inceptionYear>2003</inceptionYear>
  <developers>
    <developer>
      <name>Elias Ross</name>
      <email>genman@noderunner.net</email>
    </developer>
    <developer>
      <name>Torgeir</name>
      <email>torgeir@pobox.com</email>
    </developer>
    <developer>
      <id>psiniemi</id>
      <name>Pasi Niemi</name>
      <email>pasi.niemi@iki.fi</email>
      <url>http://www.linkedin.com/in/psiniemi</url>
    </developer>
  </developers>
  <url>https://github.com/NitorCreations/javaxdelta</url>
  <scm>
    <developerConnection>scm:git:git@github.com:NitorCreations/javaxdelta.git</developerConnection>
    <connection>scm:git:git@github.com:NitorCreations/javaxdelta.git</connection>
    <url>https://github.com/NitorCreations/javaxdelta</url>
    <tag>HEAD</tag>
  </scm>
  <mailingLists>
    <mailingList>
      <post>javaxdelta-devel@lists.sourceforge.net</post>
    </mailingList>
  </mailingLists>
  <issueManagement>
    <system>Sourceforge</system>
    <url>http://sourceforge.net/tracker/?atid=474943&amp;group_id=54817</url>
  </issueManagement>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <descriptorRefs>
            <descriptorRef>jar-with-dependencies</descriptorRef>
          </descriptorRefs>
        </configuration>
        <executions>
          <execution>
            <phase>process-test-classes</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.2</version>
        <configuration>
          <source>1.7</source>
          <target>1.7</target>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.18.1</version>
      </plugin>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.6.5</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <!-- DEPENDENCIES -->

  <dependencies>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-compress</artifactId>
      <version>1.9</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <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>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.4</version>
            <executions>
              <execution>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.10.1</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <phase>package</phase>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <failOnError>false</failOnError>
                  <quiet>true</quiet>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>create-script</id>
      <activation>
        <os>
          <family>unix</family>
        </os>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>1.3.2</version>
            <executions>
              <execution>
                <phase>package</phase>
                <goals>
                  <goal>exec</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <executable>src/main/shell/create-script.sh</executable>
            </configuration>
          </plugin>
                    <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>rpm-maven-plugin</artifactId>
            <version>2.1.2</version>
            <executions>
              <execution>
                <id>generate-rpm</id>
                <goals>
                  <goal>attached-rpm</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <license>Apache v2.0</license>
              <distribution>Willow</distribution>
              <group>Application/System</group>
              <changelogFile>src/main/resources/changelog</changelogFile>
              <mappings>
                <mapping>
                  <directory>/usr/bin</directory>
                  <filemode>755</filemode>
                  <username>root</username>
                  <groupname>root</groupname>
                  <sources>
                    <source>
                      <location>target/javaxdelta.sh</location>
                    </source>
                  </sources>
                </mapping>
                <mapping>
                  <directory>/var/lib/javaxdelta</directory>
                  <filemode>644</filemode>
                  <username>root</username>
                  <groupname>root</groupname>
                  <sources>
                    <source>
                      <location>target</location>
                      <includes>
                        <include>javaxdelta-uber-*.jar</include>
                      </includes>
                    </source>
                  </sources>
                </mapping>
              </mappings>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <version>1.9.1</version>
            <executions>
              <execution>
                <id>attach-artifacts</id>
                <phase>package</phase>
                <goals>
                  <goal>attach-artifact</goal>
                </goals>
                <configuration>
                  <artifacts>
                    <artifact>
                      <file>${project.build.directory}/javaxdelta.sh</file>
                      <type>sh</type>
                    </artifact>
                  </artifacts>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
