<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>plugin</artifactId>
    <version>2.19</version>
  </parent>

  <properties>
    <artifactSuffix />
    <jenkins.version>1.653</jenkins.version>
    <maven.compiler.source>1.7</maven.compiler.source>
    <maven.compiler.target>1.7</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <java.level>7</java.level>
    <failsafeArgLine />
    <skipITs>false</skipITs>
    <workflow.version>1.11</workflow.version>
    <!-- Project Libs-->
    <unirest.version>1.4.9</unirest.version>
    <jackson.version>2.7.0</jackson.version>
    <hamcrest.version>1.3</hamcrest.version>
    <powermock.version>1.6.2</powermock.version>
    <!-- testing config -->
    <rocket.port>4443</rocket.port>
    <mongo.port>27017</mongo.port>
    <!-- Maven Plugins -->
    <maven-release-plugin.version>2.5.1</maven-release-plugin.version>
    <maven-site-plugin.version>3.3</maven-site-plugin.version>
    <jgitflow-maven-plugin.version>1.0-m5.1</jgitflow-maven-plugin.version>
  </properties>

  <name>RocketChat Notifier</name>
  <artifactId>rocketchatnotifier${artifactSuffix}</artifactId>
  <version>0.5.3</version>
  <packaging>hpi</packaging>

  <licenses>
    <license>
      <name>Apache-2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0</url>
    </license>
  </licenses>

  <!-- get every artifact through repo.jenkins-ci.org, which proxies all the
        artifacts that we need -->
  <repositories>
    <repository>
      <id>repo.jenkins-ci.org</id>
      <url>https://repo.jenkins-ci.org/public/</url>
    </repository>
    <repository>
      <id>jitpack.io</id>
      <url>https://jitpack.io</url>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <id>repo.jenkins-ci.org</id>
      <url>https://repo.jenkins-ci.org/public/</url>
    </pluginRepository>
  </pluginRepositories>

  <build>

    <defaultGoal>clean test</defaultGoal>
    <finalName>${finalName}</finalName>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>${maven-release-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>sql-maven-plugin</artifactId>
          <version>${sql-maven-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>external.atlassian.jgitflow</groupId>
          <artifactId>jgitflow-maven-plugin</artifactId>
          <version>${jgitflow-maven-plugin.version}</version>
          <configuration>
            <flowInitContext>
              <masterBranchName>master</masterBranchName>
              <developBranchName>develop</developBranchName>
              <featureBranchPrefix>feature-</featureBranchPrefix>
              <releaseBranchPrefix>release-</releaseBranchPrefix>
              <hotfixBranchPrefix>hotfix-</hotfixBranchPrefix>
              <versionTagPrefix />
            </flowInitContext>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.2</version>
        <configuration>
          <tagNameFormat>rocketchatnotifier-@{project.version}</tagNameFormat>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.jenkins-ci.tools</groupId>
        <artifactId>maven-hpi-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <compatibleSinceVersion>2.0</compatibleSinceVersion>
        </configuration>
      </plugin>
      <plugin>
        <groupId>external.atlassian.jgitflow</groupId>
        <artifactId>jgitflow-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>${maven-site-plugin.version}</version>
        <dependencies>
          <dependency>
            <groupId>lt.velykis.maven.skins</groupId>
            <artifactId>reflow-velocity-tools</artifactId>
            <version>1.1.1</version>
          </dependency>
          <!-- Reflow skin requires Velocity >= 1.7  -->
          <dependency>
            <groupId>org.apache.velocity</groupId>
            <artifactId>velocity</artifactId>
            <version>1.7</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>docker</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <!-- Sets the VM argument line used when unit tests are run. -->
              <argLine>${failsafeArgLine}</argLine>
              <skipTests>${skipITs}</skipTests>
              <includes>
                <include>**/*IT.class</include>
              </includes>
              <systemPropertyVariables>
                <rocket.url>http://127.0.0.1:${rocket.port}</rocket.url>
              </systemPropertyVariables>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <dependencies>

    <dependency>
      <groupId>com.mashape.unirest</groupId>
      <artifactId>unirest-java</artifactId>
      <version>${unirest.version}</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>${jackson.version}</version>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>junit</artifactId>
      <version>1.3</version>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-all</artifactId>
      <version>1.3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.10</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>commons-codec</groupId>
      <artifactId>commons-codec</artifactId>
      <version>1.10</version>
      <scope>test</scope>
    </dependency>
    <!-- only here to prevent from being included inside hpi for hudson parent, not needed by project at all -->
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.9</version>
      <scope>provided</scope>
    </dependency>
    <!-- only here to prevent from being included inside hpi for hudson parent, not needed by project at all -->
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <version>1.0.4</version>
      <scope>provided</scope>
    </dependency>
    <!--
        Adding JNA to fix failing unit tests on Ubuntu 14.04
        https://bugs.launchpad.net/ubuntu/+source/libjna-java/+bug/1065253
    -->
    <dependency>
      <groupId>net.java.dev.jna</groupId>
      <artifactId>jna</artifactId>
      <version>3.2.2</version>
    </dependency>
    <!-- for workflow support -->
    <dependency>
      <groupId>org.jenkins-ci.plugins.workflow</groupId>
      <artifactId>workflow-step-api</artifactId>
      <version>${workflow.version}</version>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins.workflow</groupId>
      <artifactId>workflow-cps</artifactId>
      <version>${workflow.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins.workflow</groupId>
      <artifactId>workflow-job</artifactId>
      <version>${workflow.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency> <!-- StepConfigTester -->
      <groupId>org.jenkins-ci.plugins.workflow</groupId>
      <artifactId>workflow-step-api</artifactId>
      <classifier>tests</classifier>
      <version>${workflow.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-core</artifactId>
      <version>${hamcrest.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-library</artifactId>
      <version>${hamcrest.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-all</artifactId>
      <version>1.10.19</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-core</artifactId>
      <version>${powermock.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-module-junit4</artifactId>
      <version>${powermock.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-api-mockito</artifactId>
      <version>${powermock.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-reflect</artifactId>
      <version>${powermock.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <issueManagement>
    <system>JIRA</system>
    <url>
      https://issues.jenkins-ci.org/browse/JENKINS-43275?jql=project%20%3D%20JENKINS%20AND%20status%20in%20(Open%2C%20%22In%20Progress%22)%20AND%20component%20%3D%20rocket-chat-notifier-plugin
    </url>
  </issueManagement>

  <ciManagement>
    <system>Jenkins</system>
    <url>https://jenkins.ci.cloudbees.com/job/plugins/job/rocketchatnotifier-plugin/</url>
  </ciManagement>

  <url>https://wiki.jenkins-ci.org/display/JENKINS/RocketChat+Plugin</url>

  <developers>
    <developer>
      <id>hypery2k</id>
      <name>Martin Reinhardt</name>
      <email>contact@martinreinhardt-online.de</email>
    </developer>
  </developers>

  <distributionManagement>
    <repository>
      <id>maven.jenkins-ci.org</id>
      <name>jenkinsci-releases</name>
      <url>https://repo.jenkins-ci.org/releases</url>
    </repository>
    <snapshotRepository>
      <id>maven.jenkins-ci.org</id>
      <name>jenkinsci-snapshots</name>
      <url>https://repo.jenkins-ci.org/snapshots</url>
    </snapshotRepository>
  </distributionManagement>
</project>
