<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>uk.ac.open.kmi.test-collections</groupId>
    <artifactId>sws-test-collections</artifactId>
    <version>1.0.0</version>

    <packaging>jar</packaging>

    <name>SWS Test Collections</name>
    <description>
        SWS Test Collections is just a convenience module capturing some of the existing SWS resources used for tests.
        Some resources are provided by this module while others are automatically downloaded from the Web. The result is
        packaged in a jar which enables it being reused in Java projects for development and testing purposes.
    </description>

    <url>https://github.com/kmi/sws-test-collections</url>

    <developers>
        <developer>
            <id>cpedrinaci</id>
            <name>Carlos Pedrinaci</name>
            <email>c.pedrinaci-{AT}-open.ac.uk</email>
            <url>http://people.kmi.open.ac.uk/carlos/</url>
            <organization>Knowledge Media Institute - The Open University</organization>
            <organizationUrl>http://kmi.open.ac.uk</organizationUrl>
        </developer>
    </developers>

    <organization>
        <name>Knowledge Media Institute - The Open University</name>
        <url>http://kmi.open.ac.uk</url>
    </organization>

    <licenses>
        <license>
            <name>GNU General Public License v3</name>
            <url>http://www.gnu.org/licenses/</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <url>https://github.com/kmi/sws-test-collections</url>
        <connection>scm:git:git@github.com:kmi/sws-test-collections.git</connection>
        <developerConnection>scm:git:git@github.com:kmi/sws-test-collections.git</developerConnection>
        <tag>v1.0.0</tag>
    </scm>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/kmi/sws-test-collections/issues</url>
    </issueManagement>

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

    <profiles>
        <!-- Activate PGP signing only when performing a release -->
        <profile>
            <id>release</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>
        <plugins>
            <!--Perform Releases-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <tagNameFormat>v@{project.version}</tagNameFormat>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                    <goals>deploy</goals>
                </configuration>
            </plugin>

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

            <!-- Package shared resources -->
            <plugin>
                <artifactId>maven-remote-resources-plugin</artifactId>
                <version>1.4</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>bundle</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <includes>
                        <include>**/*</include>
                    </includes>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>