<!-- ******************************************************************************
 *
 * Copyright (c) 2004-2011 Oracle Corporation.
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *
 * Kohsuke Kawaguchi, Andrew Bayer, Anton Kozak,Nikita Levyankov
 *
 ******************************************************************************* -->
 
<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.eclipse.hudson.plugins</groupId>
        <artifactId>hudson-plugin-parent</artifactId>
        <version>3.0.0-SNAPSHOT</version>
    </parent>

    <groupId>org.eclipse.hudson.plugins</groupId>
    <artifactId>git</artifactId>
    <version>3.0.0</version>
    <packaging>hpi</packaging>
    <name>Hudson GIT plugin</name>
    <description>Integrates Hudson with GIT SCM</description>
    <url>http://wiki.hudson-ci.org/display/HUDSON/Git+Plugin</url>

    <licenses>
        <license>
            <name>Eclipse Public License - v 1.0</name>
            <url>http://www.eclipse.org/org/documents/epl-v10.php</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <compileSource>1.6</compileSource>
        <maven-surefire-plugin.version>2.8.1</maven-surefire-plugin.version>
        <maven-pmd-plugin.version>2.5</maven-pmd-plugin.version>
        <maven-gpg-plugin.version>1.2</maven-gpg-plugin.version>
        <jgit.version>1.1.0.201109151100-r</jgit.version>
        <joda-time.version>1.5.1</joda-time.version>
        <parameterized-trigger.version>2.4</parameterized-trigger.version>
        <mockito.version>1.8.5</mockito.version>
    </properties>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>1.0-beta-1</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <goals>deploy</goals>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
                <configuration>
                    <workingDirectory>${project.build.directory}</workingDirectory>
                    <forkMode>always</forkMode>
                    <forkedProcessTimeoutInSeconds>500</forkedProcessTimeoutInSeconds>
                    <systemPropertyVariables>
                        <file.encoding>UTF-8</file.encoding>
                        <buildDirectory>${project.build.directory}</buildDirectory>
                        <java.io.tmpdir>${project.build.directory}</java.io.tmpdir>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>${maven-pmd-plugin.version}</version>
                <configuration>
                    <verbose>true</verbose>
                    <targetJdk>${compileSource}</targetJdk>
                    <outputDirectory>${project.reporting.outputDirectory}</outputDirectory>
                    <targetDirectory>${project.build.directory}</targetDirectory>
                    <excludeRoots>
                        <excludeRoot>${basedir}/target/generated-sources/</excludeRoot>
                    </excludeRoots>
                </configuration>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>check</goal>
                            <goal>cpd-check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>jgit-repository</id>
            <name>Eclipse JGit Repository</name>
            <url>http://download.eclipse.org/jgit/maven</url>
        </repository>
    </repositories>

    <dependencies>
        <!--Set test scope for test framework. Need to set scope in parent pom-->
        <dependency>
            <groupId>org.eclipse.hudson.main</groupId>
            <artifactId>hudson-test-framework</artifactId>
            <version>3.0.0-SNAPSHOT</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.jvnet.hudson.plugins</groupId>
                    <artifactId>subversion</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.jvnet.hudson.main</groupId>
                    <artifactId>rest-plugin</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jgit</groupId>
            <artifactId>org.eclipse.jgit</artifactId>
            <version>${jgit.version}</version>
        </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>${joda-time.version}</version>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency><!-- we contribute AbstractBuildParameters for Git if it's available -->
            <groupId>org.jvnet.hudson.plugins</groupId>
            <artifactId>parameterized-trigger</artifactId>
            <version>${parameterized-trigger.version}</version>
            <optional>true</optional>
            <exclusions>
                <!--Exclude subversion dependency-->
                <exclusion>
                    <groupId>org.jvnet.hudson.plugins</groupId>
                    <artifactId>subversion</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

    </dependencies>

    <profiles>
        <profile>
            <id>release</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>
    </profiles>

    <scm>
        <connection>scm:git:git://github.com/hudson-plugins/git-plugin.git</connection>
        <developerConnection>scm:git:git@github.com:hudson-plugins/git-plugin.git</developerConnection>
        <url>https://github.com/hudson-plugins/git-plugin</url>
    </scm>

    <developers>
        <developer>
            <name>Many</name>
            <id>kohsuke abayer wjprakash antkozak 8nevil8</id>
        </developer>
    </developers>

</project>
