<?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>io.brooklyn.couchdb-cluster</groupId>
    <artifactId>brooklyn-couchdb-cluster</artifactId>
    <version>1.0.4</version><!--BROOKLYN_COUCHDB_CLUSTER_VERSION-->
    <packaging>bundle</packaging>

    <name>Brooklyn CouchDB Cluster Entities</name>
    <description>
        Brooklyn entities for a CouchDB cluster.
    </description>
    <url>https://github.com/brooklyncentral/brooklyn-couchdb-cluster</url>

    <properties>
        <build-helper-maven-plugin.version>3.0.0</build-helper-maven-plugin.version>
        <buildnumber-maven-plugin.version>1.4</buildnumber-maven-plugin.version>
        <maven-bundle-plugin.version>3.3.0</maven-bundle-plugin.version>
    </properties>

    <scm>
        <url>https://github.com/brooklyncentral/brooklyn-couchdb-cluster</url>
        <connection>scm:git:https://github.com/brooklyncentral/brooklyn-couchdb-cluster.git</connection>
        <developerConnection>scm:git:git@github.com:brooklyncentral/brooklyn-couchdb-cluster.git</developerConnection>
        <tag>HEAD</tag>
    </scm>

    <licenses>
        <license>
            <name>Apache 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <!-- For the full list of developers, see contributors to https://github.com/brooklyncentral/brooklyn-couchdb-cluster -->
    <developers>
        <developer>
            <name>Thomas Bouron</name>
            <organizationUrl>https://github.com/tbouron</organizationUrl>
        </developer>
    </developers>

    <build>
        <resources>
            <resource>
                <directory>catalog</directory>
                <filtering>false</filtering>
            </resource>
            <resource>
                <directory>feature</directory>
                <filtering>true</filtering>
            </resource>
            <resource>
                <directory>resources</directory>
                <filtering>false</filtering>
            </resource>
        </resources>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>buildnumber-maven-plugin</artifactId>
                    <version>${buildnumber-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>${build-helper-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>${maven-bundle-plugin.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>create</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <id>bundle-manifest</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>manifest</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <instructions>
                        <Build-Commit-Id>${buildNumber}</Build-Commit-Id>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-artifact</id>
                        <phase>package</phase>
                        <goals>
                            <goal>attach-artifact</goal>
                        </goals>
                        <configuration>
                            <artifacts>
                                <artifact>
                                    <file>${project.build.outputDirectory}/couchdb/couchdb-cluster.bom</file>
                                    <classifier>couchdb-cluster</classifier>
                                    <type>bom</type>
                                </artifact>
                                <artifact>
                                    <file>${project.build.outputDirectory}/couchdb/couchdb-cluster-template.bom</file>
                                    <classifier>couchdb-cluster-template</classifier>
                                    <type>bom</type>
                                </artifact>
                                <artifact>
                                    <file>${project.build.outputDirectory}/feature.xml</file>
                                    <classifier>features</classifier>
                                    <type>xml</type>
                                </artifact>
                            </artifacts>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>sonatype-nexus-repo</id>
            <activation>
                <property>
                    <name>deployTo</name>
                    <value>sonatype</value>
                </property>
            </activation>
            <distributionManagement>
                <repository>
                    <id>sonatype-nexus-staging</id>
                    <name>Nexus Release Repository</name>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
                <snapshotRepository>
                    <id>sonatype-nexus-snapshots</id>
                    <name>Sonatype Nexus Snapshots</name>
                    <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
                </snapshotRepository>
            </distributionManagement>
            <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>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
