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

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <groupId>com.julienvey.trello</groupId>
    <artifactId>trello-java-wrapper</artifactId>
    <version>0.3.2</version>
    <packaging>jar</packaging>

    <name>Trello Java Wrapper</name>
    <description>Java Wrapper for Trello API</description>
    <url>https://github.com/bywan/trello-java-wrapper</url>

    <licenses>
        <license>
            <name>The MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git@github.com:bywan/trello-java-wrapper.git</connection>
        <developerConnection>scm:git:git@github.com:bywan/trello-java-wrapper.git</developerConnection>
        <url>git@github.com/bywan/trello-java-wrapper.git</url>
        <tag>HEAD</tag>
    </scm>

    <developers>
        <developer>
            <id>julienvey</id>
            <name>Julien Vey</name>
            <url>https://github.com/julienvey</url>
        </developer>
        <developer>
            <id>haklop</id>
            <name>Eric Bellemon</name>
            <url>https://github.com/haklop</url>
        </developer>
        <developer>
            <id>edralzar</id>
            <name>Simon Baslé</name>
            <url>https://github.com/edralzar</url>
        </developer>
    </developers>

    <properties>
        <!-- Configuration -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>1.7</java.version>

        <!-- Dependencies versions -->
        <jackson.version>2.2.0</jackson.version>
        <logback.version>1.0.11</logback.version>
        <slf4j.version>1.7.5</slf4j.version>

        <!-- Test versions -->
        <junit.version>4.8.2</junit.version>
        <fest-assert.version>1.4</fest-assert.version>
        <mockito.version>1.9.5</mockito.version>

        <!-- Optional dependencies versions -->
        <spring.version>3.2.2.RELEASE</spring.version>
        <httpclient.version>4.2.5</httpclient.version>
        <async-http-client.version>1.7.19</async-http-client.version>

        <!-- Plugins versions -->
        <maven-jgitflow-plugin.version>1.0-alpha14</maven-jgitflow-plugin.version>
        <maven-source-plugin.version>2.2.1</maven-source-plugin.version>
        <maven-compiler-plugin.version>2.5.1</maven-compiler-plugin.version>
        <maven-gpg-plugin.version>1.4</maven-gpg-plugin.version>
        <maven-failsafe-plugin.version>2.16</maven-failsafe-plugin.version>
    </properties>

    <dependencies>

        <!-- Jackson -->
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>${jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>${jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
            <version>${jackson.version}</version>
        </dependency>

        <!-- Others -->
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-core</artifactId>
            <version>${logback.version}</version>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>${logback.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>

        <!-- Tests -->
        <dependency>
            <groupId>org.easytesting</groupId>
            <artifactId>fest-assert</artifactId>
            <version>${fest-assert.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>

        <!-- optionnal dependencies -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>${spring.version}</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>${httpclient.version}</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.ning</groupId>
            <artifactId>async-http-client</artifactId>
            <version>${async-http-client.version}</version>
            <optional>true</optional>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven-source-plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-jgitflow-plugin</artifactId>
                <version>${maven-jgitflow-plugin.version}</version>
                <configuration>
                    <flowInitContext>
                        <developBranchName>dev</developBranchName>
                        <versionTagPrefix>v</versionTagPrefix>
                    </flowInitContext>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release-sign-artifacts</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>${maven-gpg-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>integ</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <version>${maven-failsafe-plugin.version}</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>integration-test</goal>
                                    <goal>verify</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
