<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.jenkins-ci.plugins</groupId>
    <artifactId>tfs-parent</artifactId>
    <version>5.3.1</version>
  </parent>

  <artifactId>tfs</artifactId>
  <packaging>hpi</packaging>
  <name>Team Foundation Server Plug-in</name>
  <version>5.3.1</version>
  <url>http://wiki.jenkins-ci.org/display/JENKINS/Team+Foundation+Server+Plugin</url>
  <licenses>
    <license><name>MIT license</name><comments>All source code is under the MIT license.</comments></license>
    <license>
      <name>Microsoft Visual Studio Team Foundation Server 2012 Software Development Kit for Java license terms</name>
      <url>http://download.microsoft.com/download/5/9/9/5993F89B-AEF0-4381-9CEE-D3D7BA9EA33B/license.html</url>
    </license>
    <license>
      <name>
        Apache Commons Codec, Apache Commons Logging, Apache HttpClient, Apache Commons Lang, Apache log4j,
        and Apache ServiceMix are licensed by the Apache Foundation under the Apache License, Version 2.0.
      </name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
    </license>
    <license>
      <name>
        The Apache Foundation's Xerces Java Parser project is licensed by the
        Apache Foundation under the Apache License, Version 1.1.
      </name>
      <url>http://www.apache.org/licenses/LICENSE-1.1</url>
    </license>
    <license>
      <name>
        The Woodstox XML Processor and the StAX API are licensed by their authors under the Apache License, Version 2.0.
      </name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url></license>
    <license>
      <name>This product includes software from the Hypersonic SQL DB http://hsqldb.org/.</name>
      <url>http://www.hsqldb.org/web/hsqlLicense.html</url>
    </license>
    <license>
      <name>This product includes software from the Cryptix project http://www.cryptix.org/.</name>
      <url>http://cryptix.org/LICENSE.TXT</url>
    </license>
  </licenses>

  <!-- see http://groups.google.com/group/hudson-dev/browse_thread/thread/83e34c639eec470a for the rationale behind this -->
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.4</version>
        <configuration>
          <archive>
            <manifest>
              <!-- https://stackoverflow.com/a/6773868/ -->
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.1</version>
        <configuration>
          <goals>deploy</goals>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.jenkins-ci.tools</groupId>
        <artifactId>maven-hpi-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <compatibleSinceVersion>3.2.0</compatibleSinceVersion>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${maven-javadoc-plugin.version}</version>
        <executions>
          <execution>
            <id>verify-javadoc</id>
            <phase>verify</phase>
            <goals>
              <goal>javadoc</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${maven-surefire-plugin.version}</version>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.surefire</groupId>
            <artifactId>surefire-junit47</artifactId>
            <version>${maven-surefire-plugin.version}</version>
          </dependency>
        </dependencies>
        <configuration>
          <excludedGroups>hudson.plugins.tfs.IntegrationTests</excludedGroups>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>animal-sniffer-maven-plugin</artifactId>
        <!-- version inherited from parent pom -->
        <configuration>
          <signature>
            <groupId>org.codehaus.mojo.signature</groupId>
            <artifactId>java16</artifactId>
            <version>1.1</version>
          </signature>
        </configuration>
        <executions>
          <execution>
            <id>java.1.6.check</id>
            <phase>verify</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>integration_test_with_TFS_server</id>
      <activation>
        <property>
          <name>tfs_server_name</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <!-- failsafe and surefire are the same project and release together
                 this ensures consistent, correctly working behavior
             -->
            <version>${maven-surefire-plugin.version}</version>
            <dependencies>
              <dependency>
                <groupId>org.apache.maven.surefire</groupId>
                <artifactId>surefire-junit47</artifactId>
                <version>${maven-surefire-plugin.version}</version>
              </dependency>
            </dependencies>
            <executions>
              <execution>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <includes>
                <include>**/Test*.java</include>
                <include>**/*Test.java</include>
                <include>**/*TestCase.java</include>
              </includes>
              <groups>hudson.plugins.tfs.IntegrationTests</groups>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <dependencies>
    <!-- 
      com.microsoft.tfs.sdk includes its dependencies inline, some of which conflict with those of jenkins-core.
      We have to repeat dependencies here to make sure they are considered before those inside the TFS SDK.
    -->
    <dependency>
      <groupId>org.jenkins-ci.main</groupId>
      <artifactId>jenkins-war</artifactId>
      <version>${jenkins.version}</version>
      <type>war</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.main</groupId>
      <artifactId>jenkins-core</artifactId>
      <version>${jenkins.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.main</groupId>
      <artifactId>jenkins-test-harness</artifactId>
      <version>${jenkins.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <!-- We need this plugin for the [current] TfsUserLookup implementation -->
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>mailer</artifactId>
      <version>1.16</version>
    </dependency>
    <dependency>
      <!-- Used for configuring collections globally -->
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>credentials</artifactId>
      <version>1.22</version>
    </dependency>
    <dependency>
      <!-- Used for augmenting Git-related activities, like commit status -->
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>git</artifactId>
      <version>2.5.2</version>
    </dependency>

    <dependency>
      <groupId>com.microsoft.tfs.sdk</groupId>
      <artifactId>com.microsoft.tfs.sdk</artifactId>
      <version>14.0.3</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>xmlunit</groupId>
        <artifactId>xmlunit</artifactId>
        <version>1.6</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>1.10.19</version>
        <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.littleshoot</groupId>
      <artifactId>littleproxy</artifactId>
      <version>1.1.0</version>
      <scope>test</scope>
    </dependency>
    
    <!-- RM dependencies -->
    <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>4.5</version>
        <type>jar</type>
    </dependency>
    <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
        <version>2.3.1</version>
    </dependency>
    <dependency>
        <groupId>org.json</groupId>
        <artifactId>json</artifactId>
        <version>20090211</version>
    </dependency>
  </dependencies>

</project>
