<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>com.dampcake</groupId>
    <artifactId>bencode</artifactId>
    <version>1.0</version>
    <packaging>jar</packaging>

    <name>bencode</name>
    <description>Input/Output Streams for working with bencoded data.</description>
    <url>http://github.com/dampcake/bencode</url>
    <inceptionYear>2015</inceptionYear>

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

    <scm>
        <connection>scm:git:git@github.com:dampcake/bencode.git</connection>
        <developerConnection>scm:git:git@github.com:dampcake/bencode.git</developerConnection>
        <url>git@github.com:dampcake/bencode.git</url>
      <tag>bencode-1.0</tag>
  </scm>

    <issueManagement>
        <system>GitHub Issues</system>
        <url>https://github.com/dampcake/bencode/issues</url>
    </issueManagement>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <name>Nexus Release Repository</name>
            <url>http://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <developers>
        <developer>
            <id>dampcake</id>
            <name>Adam Peck</name>
            <email>adam.peck@live.ca</email>
            <roles>
                <role>owner</role>
                <role>developer</role>
            </roles>
            <timezone>-7</timezone>
        </developer>
    </developers>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

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

    <profiles>
        <!-- Activate PGP signing only when performing a release -->
        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <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>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <defaultGoal>package</defaultGoal>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.2</version>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                    <compilerArgument>-Xlint:unchecked</compilerArgument>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.4</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>2.10.1</version>
                <configuration>
                    <show>public</show>
                    <nohelp>true</nohelp>
                    <header>bencode, ${project.version}</header>
                    <footer>bencode, ${project.version}</footer>
                    <doctitle>bencode, ${project.version}</doctitle>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <format>xml</format>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.eluder.coveralls</groupId>
                <artifactId>coveralls-maven-plugin</artifactId>
                <version>3.2.0</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.2</version>
            </plugin>

            <!-- Publish Javadoc using: 'mvn clean javadoc:javadoc scm-publish:publish-scm' -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-scm-publish-plugin</artifactId>
                <version>1.1</version>
                <configuration>
                    <checkoutDirectory>${project.build.directory}/scmpublish</checkoutDirectory>
                    <checkinComment>Publishing javadoc for ${project.artifactId}:${project.version}</checkinComment>
                    <content>${project.reporting.outputDirectory}/apidocs</content>
                    <skipDeletedFiles>true</skipDeletedFiles>
                    <pubScmUrl>scm:git:git@github.com:dampcake/bencode.git</pubScmUrl>
                    <!-- branch with static site on github-->
                    <scmBranch>gh-pages</scmBranch>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
