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

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>
    
    <groupId>com.atlassian.maven.plugins</groupId>
    <artifactId>maven-jgitflow-plugin</artifactId>
    <version>1.0-alpha22</version>
    
    <packaging>maven-plugin</packaging>
    
    <name>Maven JGitFlow Plugin</name>
    <description>A plugin to support doing git-flow releases</description>
    <url>https://bitbucket.org/atlassian/maven-jgitflow-plugin</url>

    <licenses>
        <license>
            <name>Apache 2</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <organization>
        <name>Atlassian</name>
        <url>http://www.altassian.com/</url>
    </organization>

    <developers>
        <developer>
            <name>Jonathan Doklovic</name>
            <organization>Atlassian</organization>
            <email>doklovic@atlassian.com</email>
        </developer>
    </developers>

    <prerequisites>
        <maven>2.2.1</maven>
    </prerequisites>
    
    <scm>
        <connection>scm:git:ssh://git@bitbucket.org/atlassian/maven-jgitflow-plugin.git</connection>
        <developerConnection>scm:git:ssh://git@bitbucket.org/atlassian/maven-jgitflow-plugin.git</developerConnection>
        <url>https://bitbucket.org/atlassian/maven-jgitflow-plugin</url>
        <tag>HEAD</tag>
    </scm>
    
    <dependencies>
        <dependency>
            <groupId>com.atlassian.jgitflow</groupId>
            <artifactId>jgit-flow-core</artifactId>
            <version>${jgitFlowVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jgit</groupId>
            <artifactId>org.eclipse.jgit.console</artifactId>
            <version>${jgitVersion}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.jcraft</groupId>
                    <artifactId>jsch</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>jline</groupId>
            <artifactId>jline</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.2.2</version>
        </dependency>
        <dependency>
            <groupId>org.jdom</groupId>
            <artifactId>jdom2</artifactId>
            <version>2.0.4</version>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>14.0.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <version>${mavenVersion}</version>
        </dependency>
        <!--<dependency>-->
            <!--<groupId>org.apache.maven</groupId>-->
            <!--<artifactId>maven-compat</artifactId>-->
            <!--<version>${mavenVersion}</version>-->
        <!--</dependency>-->
        <!--<dependency>-->
            <!--<groupId>org.apache.maven</groupId>-->
            <!--<artifactId>maven-project</artifactId>-->
            <!--<version>${mavenVersion}</version>-->
        <!--</dependency>-->
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-model</artifactId>
            <version>${mavenVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>${mavenVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-settings</artifactId>
            <version>${mavenVersion}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.release</groupId>
            <artifactId>maven-release-manager</artifactId>
            <version>${mavenReleaseVersion}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.maven.scm</groupId>
                    <artifactId>maven-scm-providers-standard</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>${mavenPluginPluginVersion}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-utils</artifactId>
            <version>1.5.15</version>
        </dependency>
        
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>
        
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.4</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-artifact</artifactId>
            <version>2.2.1</version>
        </dependency>
        
        <!-- jsch agent stuff -->
        <dependency>
            <groupId>com.jcraft</groupId>
            <artifactId>jsch.agentproxy.jsch</artifactId>
            <version>${jschAgentVersion}</version>
        </dependency>
        <dependency>
            <groupId>com.jcraft</groupId>
            <artifactId>jsch.agentproxy.usocket-jna</artifactId>
            <version>${jschAgentVersion}</version>
        </dependency>
        <dependency>
            <groupId>com.jcraft</groupId>
            <artifactId>jsch.agentproxy.sshagent</artifactId>
            <version>${jschAgentVersion}</version>
        </dependency>
    </dependencies>
    
    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>VERSION</include>
                </includes>
                <filtering>true</filtering>
            </resource>

            <resource>
                <directory>src/main/resources</directory>
                <excludes>
                    <exclude>VERSION</exclude>
                </excludes>
            </resource>
        </resources>
        <plugins>
            <!--
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <goals>deploy</goals>
                    <pushChanges>false</pushChanges>
                    <localCheckout>true</localCheckout>
                    <tagNameFormat>mvn-@{project.version}</tagNameFormat>
                </configuration>
            </plugin>
            -->
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-jgitflow-plugin</artifactId>
                <version>${project.version}</version>
                <configuration>
                    <allowSnapshots>true</allowSnapshots>
                    <enableFeatureVersions>true</enableFeatureVersions>
                    <pushFeatures>true</pushFeatures>
                    <pushReleases>true</pushReleases>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>3.2</version>
                <configuration>
                    <!-- see http://jira.codehaus.org/browse/MNG-5346 -->
                    <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
                </configuration>
                <executions>
                <execution>
                    <id>mojo-descriptor</id>
                    <goals>
                        <goal>descriptor</goal>
                    </goals>
                </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>

        </plugins>
    </build>

    <profiles>
        <profile>
            <id>releaseBranchPrefix-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>1.4</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        
        <profile>
            <id>it-tests</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-invoker-plugin</artifactId>
                        <version>1.8</version>
                        <configuration>
                            <localRepositoryPath>${project.build.directory}/it/local-repository</localRepositoryPath>
                            <showErrors>true</showErrors>
                            <settingsFile>src/it/settings.xml</settingsFile>
                            <projectsDirectory>src/it/projects</projectsDirectory>
                            <pomIncludes>
                                <pomInclude>*/pom.xml</pomInclude>
                            </pomIncludes>
                            <cloneProjectsTo>${project.build.directory}/it/projects</cloneProjectsTo>
                            <cloneClean>true</cloneClean>
                            <reportsDirectory>${project.build.directory}/it/reports</reportsDirectory>
                            <addTestClassPath>true</addTestClassPath>
                            <debug>true</debug>
                            <streamLogs>true</streamLogs>
                        </configuration>
                        <executions>
                            <execution>
                                <id>run-integration-tests</id>
                                <phase>integration-test</phase>
                                <goals>
                                    <goal>install</goal>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    
    <properties>
        <mavenVersion>2.2.1</mavenVersion>
        <!--<mavenVersion>3.0.5</mavenVersion>-->
        <mavenPluginPluginVersion>3.1</mavenPluginPluginVersion>
        <jgitFlowVersion>0.19</jgitFlowVersion>
        <scmVersion>1.8</scmVersion>
        <mavenReleaseVersion>2.4</mavenReleaseVersion>
        <jschAgentVersion>0.0.5</jschAgentVersion>
        <jgitVersion>3.0.0.201306101825-r</jgitVersion>
    </properties>
</project>


