<?xml version="1.0" encoding="UTF-8"?>
<!--
 Copyright 2017 Google LLC

 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
 compliance with the License. You may obtain a copy of the License at

        https://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software distributed under the License
 is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
 implied. See the License for the specific language governing permissions and limitations under the
 License.
-->
<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.jenkins-ci.plugins</groupId>
    <artifactId>plugin</artifactId>
    <version>3.39</version>
    <relativePath/>
  </parent>

  <artifactId>google-compute-engine</artifactId>
  <version>4.0.0</version>
  <packaging>hpi</packaging>

  <name>Google Compute Engine Plugin</name>
  <description>This plugin allows Jenkins to provision dynamic worker nodes on Google Compute Engine.</description>
  <url>https://wiki.jenkins-ci.org/display/JENKINS/Google+Compute+Engine+Plugin</url>
  <organization>
    <name>Google</name>
    <url>https://www.google.com</url>
  </organization>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>evanbrown</id>
      <name>Evan Brown</name>
      <email>evanbrown@google.com</email>
    </developer>
    <developer>
      <id>stephenshank</id>
      <name>Stephen Shank</name>
      <email>stephenshank@google.com</email>
    </developer>
    <developer>
      <id>craigbarber</id>
      <name>Craig Barber</name>
      <email>craigbarber@google.com</email>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:ssh://github.com/jenkinsci/google-compute-engine-plugin.git</connection>
    <developerConnection>scm:git:ssh://git@github.com/jenkinsci/google-compute-engine-plugin.git</developerConnection>
    <url>https://github.com/jenkinsci/google-compute-engine-plugin</url>
    <tag>google-compute-engine-4.0.0</tag>
  </scm>

  <properties>
    <jenkins.version>2.138.4</jenkins.version>
    <jenkinsRuleTimeout>0</jenkinsRuleTimeout>
    <java.level>8</java.level>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <skip.surefire.tests>${skipTests}</skip.surefire.tests>
    <configuration-as-code.version>1.14</configuration-as-code.version>
    <concurrency>10</concurrency>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.apache.jclouds</groupId>
      <artifactId>jclouds-compute</artifactId>
      <version>2.0.3</version>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>google-oauth-plugin</artifactId>
      <version>0.9</version>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>ssh-credentials</artifactId>
      <version>1.17</version>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>credentials</artifactId>
      <version>2.2.0</version>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>14.0.1</version>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-text</artifactId>
      <version>1.3</version>
    </dependency>
    <dependency>
      <groupId>com.google.cloud.graphite</groupId>
      <artifactId>gcp-client</artifactId>
      <version>0.1.2</version>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci</groupId>
      <artifactId>trilead-ssh2</artifactId>
      <version>build-217-jenkins-11</version>
    </dependency>
    <dependency><!-- OnceRetentionStrategy -->
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>durable-task</artifactId>
      <version>1.28</version>
    </dependency>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <version>1.18.6</version>
      <scope>provided</scope>
    </dependency>
    <!-- Test Dependencies -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>2.10.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.awaitility</groupId>
      <artifactId>awaitility</artifactId>
      <version>3.1.6</version>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>plain-credentials</artifactId>
      <version>1.5</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.jenkins</groupId>
      <artifactId>configuration-as-code</artifactId>
      <version>${configuration-as-code.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.jenkins</groupId>
      <artifactId>configuration-as-code</artifactId>
      <version>${configuration-as-code.version}</version>
      <classifier>tests</classifier>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.jenkins.configuration-as-code</groupId>
      <artifactId>configuration-as-code-support</artifactId>
      <version>${configuration-as-code.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <repositories>
    <repository>
      <id>repo.jenkins-ci.org</id>
      <url>https://repo.jenkins-ci.org/public/</url>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <id>repo.jenkins-ci.org</id>
      <url>https://repo.jenkins-ci.org/public/</url>
    </pluginRepository>
  </pluginRepositories>

  <build>
    <testResources>
      <testResource>
        <directory>src/test/resources</directory>
        <filtering>true</filtering>
      </testResource>
    </testResources>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.20.1</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>au.com.acegi</groupId>
        <artifactId>xml-format-maven-plugin</artifactId>
        <version>3.0.7</version>
        <executions>
          <execution>
            <id>validate</id>
            <phase>validate</phase>
            <goals>
              <goal>xml-format</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <includes>pom.xml</includes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>tidy-maven-plugin</artifactId>
        <version>1.1.0</version>
        <executions>
          <execution>
            <id>validate</id>
            <phase>validate</phase>
            <goals>
              <goal>pom</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <completionGoals>xml-format:xml-format tidy:pom</completionGoals>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>2.20.1</version>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <disableXmlReport>true</disableXmlReport>
          <useFile>false</useFile>
          <systemPropertyVariables>
            <hudson.model.LoadStatistics.clock>500</hudson.model.LoadStatistics.clock>
            <hudson.model.LoadStatistics.decay>0.5</hudson.model.LoadStatistics.decay>
            <hudson.agents.NodeProvisioner.MARGIN>100</hudson.agents.NodeProvisioner.MARGIN>
            <hudson.agents.NodeProvisioner.MARGIN0>1.0</hudson.agents.NodeProvisioner.MARGIN0>
          </systemPropertyVariables>
          <excludes>
            <exclude>**/ComputeEngineCloudWindowsIT.java</exclude>
            <exclude>**/ConfigAsCodeWindowsIT.java</exclude>
            <exclude>**/ITUtil.java</exclude>
          </excludes>
          <argLine>-Djenkins.test.timeout=${jenkinsRuleTimeout}</argLine>
          <runOrder>balanced</runOrder>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.20.1</version>
        <configuration>
          <skipTests>${skip.surefire.tests}</skipTests>
          <runOrder>balanced</runOrder>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <version>2.7</version>
        <configuration>
          <instrumentation>
            <excludes>
              <exclude>com/google/jenkins/plugins/**/Messages.class</exclude>
            </excludes>
          </instrumentation>
          <formats>
            <format>html</format>
            <format>xml</format>
          </formats>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.coveo</groupId>
        <artifactId>fmt-maven-plugin</artifactId>
        <version>2.8</version>
        <configuration>
          <sourceDirectory>src/main/java</sourceDirectory>
          <testSourceDirectory>src/test/java</testSourceDirectory>
          <verbose>true</verbose>
          <filesNamePattern>.*\.java</filesNamePattern>
          <skip>false</skip>
          <skipSortingImports>false</skipSortingImports>
          <style>google</style>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>format</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>windows</id>
      <activation>
        <os>
          <family>Windows</family>
        </os>
      </activation>
      <properties>
        <concurrency>4</concurrency>
      </properties>
    </profile>
  </profiles>
</project>
