<!-- Copyright (c) 2015-2016 Apcera Inc. All rights reserved. This program 
    and the accompanying materials are made available under the terms of the 
    MIT License (MIT) which accompanies this distribution, and is available at 
    http://opensource.org/licenses/MIT -->
<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>

    <parent>
        <groupId>io.nats</groupId>
        <artifactId>nats-parent</artifactId>
        <version>1.0-SNAPSHOT</version>
    </parent>

    <groupId>io.nats</groupId>
    <artifactId>jnats</artifactId>
    <version>0.5.0</version>
    <packaging>bundle</packaging>

    <name>jnats</name>
    <description>Java client library for NATS Messaging System</description>
    <url>https://github.com/nats-io/jnats</url>
    <inceptionYear>2015</inceptionYear>
    <organization>
        <url>http://nats.io</url>
        <name>Apcera, Inc.</name>
    </organization>

    <developers />
    <contributors />

    <mailingLists />

    <prerequisites />

    <modules />

    <scm>
        <url>https://github.com/nats-io/jnats</url>
        <connection>scm:git:git://github.com/nats-io/jnats.git</connection>
        <developerConnection>scm:git:git@github.com:nats-io/jnats.git</developerConnection>
        <tag>jnats-0.5.0</tag>
    </scm>
    <issueManagement>
        <url>https://github.com/nats-io/jnats/issues/</url>
        <system>GitHub Issues</system>
    </issueManagement>
    <ciManagement>
        <system>travis-ci</system>
        <url>https://travis-ci.org/nats-io/jnats/</url>
    </ciManagement>

    <dependencyManagement />
    <dependencies>

    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>1.7.5</version>
        <scope>test</scope>
    </dependency>
    </dependencies>

    <repositories />
    <pluginRepositories />

    <build>
        <plugins>
            <plugin>
                <!-- This plugin takes care of packaging the artifact as an OSGi Bundle -->
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <version>2.4.0</version>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>ossrh</id>
            <properties>
                <gpg.executable>gpg2</gpg.executable>
                <gpg.keyname>${env.GPG_KEYNAME}</gpg.keyname>
                <gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
                <gpg.defaultKeyring>false</gpg.defaultKeyring>
                <gpg.publicKeyring>${env.GPG_DIR}/pubring.gpg</gpg.publicKeyring>
                <gpg.secretKeyring>${env.GPG_DIR}/secring.gpg</gpg.secretKeyring>
            </properties>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>unitTests</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <groups>io.nats.client.UnitTest</groups>
                            <argLine>${argLine}</argLine>
                        </configuration>
                        <executions>
                            <execution>
                                <!-- <id>run-unit-tests</id> -->
                                <id>default-test</id>
                                <goals>
                                    <goal>test</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>benchTests</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <groups>io.nats.client.BenchmarkTest</groups>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
