<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.github.jtendermint</groupId>
    <artifactId>jabci</artifactId>
    <version>0.9.0-SNAPSHOT</version>

    <name>com.github.jtendermint:jabci</name>
    <description>Java implementation for ABCI consensus protocol from tendermint.com and related tools</description>
    <url>http://www.github.com/jtendermint</url>

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

    <licenses>
        <license>
            <name>The MIT License (MIT)</name>
            <url>https://opensource.org/licenses/MIT</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Stephan Mueller</name>
            <email>mueller@ponton.de</email>
            <organization>PONTON GmbH</organization>
            <organizationUrl>http://www.ponton.de</organizationUrl>
        </developer>
        <developer>
            <name>Wolf Posdorfer</name>
            <email>posdorfer@ponton.de</email>
            <organization>PONTON GmbH</organization>
            <organizationUrl>http://www.ponton.de</organizationUrl>
        </developer>
        <developer>
            <name>Michael Haeusler</name>
            <email>haeusler@ponton.de</email>
            <organization>PONTON GmbH</organization>
            <organizationUrl>http://www.ponton.de</organizationUrl>
        </developer>
        <developer>
            <name>Manuel Meske</name>
            <email>meske@ponton.de</email>
            <organization>PONTON GmbH</organization>
            <organizationUrl>http://www.ponton.de</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/jtendermint/jabci.git</connection>
        <developerConnection>scm:git:ssh://github.com:jtendermint/jabci.git</developerConnection>
        <url>http://github.com/jtendermint/jabci/tree/master</url>
    </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>oss.sonatype</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>oss.sonatype</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.5.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.github.os72</groupId>
                <artifactId>protoc-jar-maven-plugin</artifactId>
                <version>3.0.0.1</version>
                <executions>
                    <execution>
                        <!--<phase>generate-sources</phase> -->
                        <phase>none</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <protocVersion>3.0.0</protocVersion> <!-- 2.4.1, 2.5.0, 2.6.1, 3.0.0 -->
                            <includeDirectories>
                                <include>src/main/proto</include>
                            </includeDirectories>
                            <inputDirectories>
                                <include>src/main/proto</include>
                            </inputDirectories>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.4</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>com.google.protobuf</groupId>
            <artifactId>protobuf-java</artifactId>
            <version>3.1.0</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>1.7.21</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>rel</id>
            <properties>
                <bamboo.planRepository.branchName>${bamboo_planRepository_branchName}</bamboo.planRepository.branchName>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>ponton.product.maven.plugins</groupId>
                        <artifactId>createversion-maven-plugin</artifactId>
                        <version>1.2.0</version>
                        <configuration>
                            <currentBranch>${bamboo.planRepository.branchName}</currentBranch>
                            <branchMappings>
                                <branchMapping>
                                    <branchRegex>release/(.+)</branchRegex>
                                    <version>#{project.simpleVersion}</version>
                                    <tagFileName>release</tagFileName>
                                </branchMapping>
                            </branchMappings>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release</id>
            <activation>
                <file>
                    <exists>target/release</exists>
                </file>
            </activation>
            <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>