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

    <groupId>com.github.monkeysintown</groupId>
    <artifactId>jdbc-ssh</artifactId>
    <version>1.0.8</version>

    <packaging>jar</packaging>
    <name>JDBC SSH</name>
    <description>JDBC over SSH</description>
    <url>https://monkeysintown.github.io/jdbc-ssh</url>

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

    <organization>
        <name>Monkeys in Town Lda.</name>
        <url>https://github.com/monkeysintown</url>
    </organization>

    <scm>
        <connection>scm:git:https://github.com/monkeysintown/jdbc-ssh.git</connection>
        <developerConnection>scm:git:https://github.com/monkeysintown/jdbc-ssh.git</developerConnection>
        <url>scm:git:https://github.com/monkeysintown/jdbc-ssh.git</url>
    </scm>

    <developers>
        <developer>
            <id>vidakovic</id>
            <name>Aleksandar Vidakovic</name>
            <email />
            <url>https://github.com/vidakovic</url>
            <organization>Monkeys in Town Lda.</organization>
            <organizationUrl>https://github.com/monkeysintown</organizationUrl>
            <roles>
                <role>developer</role>
            </roles>
            <timezone>0</timezone>
        </developer>
    </developers>

    <prerequisites>
        <maven>3.2.3</maven>
    </prerequisites>

    <properties>
        <slf4j.version>1.7.10</slf4j.version>
        <logback.version>1.1.2</logback.version>
        <jsch.version>0.1.51</jsch.version>
        <jzlib.version>1.1.2</jzlib.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.7</java.version>
        <github.global.server>github</github.global.server>
    </properties>

    <distributionManagement>
        <repository>
            <id>bintray</id>
            <url>https://api.bintray.com/maven/cheetah/monkeysintown/jdbc-ssh</url>
        </repository>
    </distributionManagement>

    <repositories>
        <repository>
            <id>rubygems-release</id>
            <url>http://rubygems-proxy.torquebox.org/releases</url>
        </repository>
    </repositories>

    <dependencies>

        <!-- ssh -->
        <dependency>
            <groupId>com.jcraft</groupId>
            <artifactId>jsch</artifactId>
            <version>${jsch.version}</version>
        </dependency>
        <dependency>
            <groupId>com.jcraft</groupId>
            <artifactId>jzlib</artifactId>
            <version>${jzlib.version}</version>
        </dependency>

        <!-- logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-core</artifactId>
            <version>${logback.version}</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>${logback.version}</version>
            <optional>true</optional>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.34</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <version>1.4.183</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.derby</groupId>
            <artifactId>derby</artifactId>
            <version>10.11.1.1</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.derby</groupId>
            <artifactId>derbynet</artifactId>
            <version>10.11.1.1</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.derby</groupId>
            <artifactId>derbyclient</artifactId>
            <version>10.11.1.1</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.sshd</groupId>
            <artifactId>sshd-core</artifactId>
            <version>0.13.0</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcpg-jdk15on</artifactId>
            <version>1.51</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcpkix-jdk15on</artifactId>
            <version>1.51</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>

        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>2.2.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-compiler-plugin</artifactId>
                    <version>3.2</version>
                    <configuration>
                        <source>${java.version}</source>
                        <target>${java.version}</target>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>2.7</version>
                </plugin>

                <plugin>
                    <groupId>org.asciidoctor</groupId>
                    <artifactId>asciidoctor-maven-plugin</artifactId>
                    <version>1.5.2</version>
                    <configuration>
                        <baseDir>${project.build.directory}/generated-docs/asciidoc</baseDir>
                        <sourceDirectory>${project.build.directory}/generated-docs/asciidoc</sourceDirectory>
                        <sourceDocumentName>index.ad</sourceDocumentName>
                        <gemPath>${project.build.directory}/gems-provided</gemPath>
                        <!-- Attributes common to all output formats -->
                        <attributes>
                            <numbered>true</numbered>
                            <experimental>true</experimental>
                            <encoding>UTF-8</encoding>
                            <imagesdir>images</imagesdir>
                            <!-- TODO: replace toc2 / toc-position with toc=left after upgrade to 1.5.0 -->
                            <pagenums />
                            <toc2>true</toc2>
                            <toc-position>left</toc-position>
                            <icons>font</icons>
                            <sectanchors>true</sectanchors>
                            <idprefix />
                            <idseparator>-</idseparator>
                            <docinfo1>true</docinfo1>
                            <publish-url>${project.url}</publish-url>
                            <sourcedir>${project.build.sourceDirectory}</sourcedir>
                            <!-- WARNING callout bullets don't yet work with CodeRay -->
                            <source-highlighter>coderay</source-highlighter>
                        </attributes>
                    </configuration>
                    <executions>
                        <execution>
                            <id>asciidoc-to-docbook</id>
                            <phase>generate-resources</phase>
                            <goals>
                                <goal>process-asciidoc</goal>
                            </goals>
                            <configuration>
                                <outputDirectory>${project.build.directory}/generated-docs/docbook/en-US</outputDirectory>
                                <backend>docbook5</backend>
                                <doctype>book</doctype>
                                <templateEngine>slim</templateEngine>
                                <headerFooter>true</headerFooter>
                                <compact>false</compact>
                            </configuration>
                        </execution>
                        <execution>
                            <id>asciidoc-to-html5</id>
                            <phase>generate-resources</phase>
                            <goals>
                                <goal>process-asciidoc</goal>
                            </goals>
                            <configuration>
                                <outputDirectory>${project.build.directory}/generated-docs/html5</outputDirectory>
                                <backend>html5</backend>
                            </configuration>
                        </execution>
                        <execution>
                            <id>asciidoc-to-pdf</id>
                            <phase>generate-resources</phase>
                            <goals>
                                <goal>process-asciidoc</goal>
                            </goals>
                            <configuration>
                                <gemPath>${project.build.directory}/gems</gemPath>
                                <requires>
                                    <require>asciidoctor-pdf</require>
                                </requires>
                                <backend>pdf</backend>
                            </configuration>
                        </execution>
                    </executions>
                    <dependencies>
                        <dependency>
                            <groupId>org.asciidoctor</groupId>
                            <artifactId>asciidoctorj</artifactId>
                            <version>1.5.2</version>
                        </dependency>
                        <dependency>
                            <groupId>org.jruby</groupId>
                            <artifactId>jruby-complete</artifactId>
                            <version>1.7.18</version>
                        </dependency>
                    </dependencies>
                </plugin>

                <plugin>
                    <groupId>com.github.github</groupId>
                    <artifactId>site-maven-plugin</artifactId>
                    <version>0.10</version>
                    <configuration>
                        <message>Creating site for ${project.version}</message>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>site</goal>
                            </goals>
                            <phase>site</phase>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.4</version>
                    <dependencies>
                        <dependency>
                            <groupId>lt.velykis.maven.skins</groupId>
                            <artifactId>reflow-velocity-tools</artifactId>
                            <version>1.1.1</version>
                        </dependency>
                        <!-- Reflow skin requires Velocity >= 1.7  -->
                        <dependency>
                            <groupId>org.apache.velocity</groupId>
                            <artifactId>velocity</artifactId>
                            <version>1.7</version>
                        </dependency>
                        <dependency>
                            <groupId>org.asciidoctor</groupId>
                            <artifactId>asciidoctor-maven-plugin</artifactId>
                            <version>1.5.2</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>external.atlassian.jgitflow</groupId>
                    <artifactId>jgitflow-maven-plugin</artifactId>
                    <version>1.0-m4.3</version>
                    <configuration>
                        <allowSnapshots>true</allowSnapshots>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <pushReleases>true</pushReleases>
                        <noDeploy>false</noDeploy>
                        <noReleaseBuild>false</noReleaseBuild>
                        <noFeatureBuild>false</noFeatureBuild>
                        <noHotfixBuild>false</noHotfixBuild>
                        <useReleaseProfile>true</useReleaseProfile>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.10.1</version>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>test-jar</goal>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <source>${java.version}</source>
                        <doclet>org.asciidoctor.Asciidoclet</doclet>
                        <docletArtifact>
                            <groupId>org.asciidoctor</groupId>
                            <artifactId>asciidoclet</artifactId>
                            <version>1.5.1</version>
                        </docletArtifact>
                        <overview>src/main/java/overview.ad</overview>
                        <additionalparam>
                            --base-dir ${project.basedir}
                            --attribute "name=${project.name}"
                            --attribute "version=${project.version}"
                            --attribute "title-link=${project.url}[${project.name} ${project.version}]"
                        </additionalparam>
                        <linksource>true</linksource>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.owasp</groupId>
                    <artifactId>dependency-check-maven</artifactId>
                    <version>1.2.8</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

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

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>external.atlassian.jgitflow</groupId>
                <artifactId>jgitflow-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.owasp</groupId>
                <artifactId>dependency-check-maven</artifactId>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>aggregate</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>

    <profiles>
        <profile>
            <id>release-profile</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                    </plugin>

                    <plugin>
                        <groupId>com.github.github</groupId>
                        <artifactId>site-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
