<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>3.23</version>
    <relativePath />
  </parent>

  <groupId>org.jvnet.hudson.plugins</groupId>
  <artifactId>warnings</artifactId>
  <packaging>hpi</packaging>
  <name>Warnings Plug-in</name>
  <version>5.0.0-beta4</version>
  <url>https://wiki.jenkins.io/x/G4CGAQ</url>
  <description>Jenkins plug-in to scan the console log or a compiler log file for warnings.
  </description>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <!-- Override properties defined in parent POM -->
    <jenkins.version>2.89.1</jenkins.version>
    <java.level>8</java.level>
    <jenkins-test-harness.version>2.42</jenkins-test-harness.version>

    <!-- Project Dependencies Configuration -->
    <warnings-ng.version>1.0.0-beta1</warnings-ng.version>

    <commons.lang.version>3.8.1</commons.lang.version>
    <commons.io.version>2.6</commons.io.version>
    <commons.digester.version>3.2</commons.digester.version>
    <commons.text.version>1.6</commons.text.version>
    <eclipse-collections.version>9.2.0</eclipse-collections.version>
    <j2html.version>1.3.0</j2html.version>

    <bridge-method-annotation.version>1.18</bridge-method-annotation.version>
    <json.version>20180813</json.version>

    <!-- Test Library Dependencies Versions -->
    <junit.version>5.3.0</junit.version>
    <junit-platform-launcher.version>1.3.0</junit-platform-launcher.version>
    <mockito.version>2.21.0</mockito.version>
    <assertj.version>3.11.1</assertj.version>
    <archunit.version>0.8.3</archunit.version>
    <json-unit-fluent.version>2.0.0.RC1</json-unit-fluent.version>

    <!-- Jenkins Plug-in Dependencies Versions -->
    <analysis-core.version>1.95</analysis-core.version>
    <dashboard-view.version>2.9.11</dashboard-view.version>
    <token-macro.version>2.5</token-macro.version>
    <jenkins-maven-plugin.version>3.1.2</jenkins-maven-plugin.version>
    <matrix-project.version>1.13</matrix-project.version>
    <junit-plugin.version>1.24</junit-plugin.version>
    <git-plugin.version>3.9.1</git-plugin.version>
    <workflow-step.version>2.13</workflow-step.version>
    <workflow-job.version>2.16</workflow-job.version>

    <!-- Maven plug-in versions -->
    <maven-pmd-plugin.version>3.10.0</maven-pmd-plugin.version>
    <maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
    <pmd.version>6.9.0</pmd.version>
    <maven-checkstyle-plugin.version>3.0.0</maven-checkstyle-plugin.version>
    <checkstyle.version>8.12</checkstyle.version>
    <findbugs-maven-plugin.version>3.0.5</findbugs-maven-plugin.version>
    <spotbugs-maven-plugin.version>3.1.6</spotbugs-maven-plugin.version>
    <jacoco-maven-plugin.version>0.8.2</jacoco-maven-plugin.version>
    <maven-surefire.plugin>2.22.0</maven-surefire.plugin>
    <jar.maven.plugin>3.0.2</jar.maven.plugin>
    <maven-error-prone-plugin.version>2.8.5</maven-error-prone-plugin.version>
    <error-prone.version>2.3.1</error-prone.version>
    <versions-maven-plugin.version>2.6</versions-maven-plugin.version>
    <depgraph-maven-plugin.version>3.2.1</depgraph-maven-plugin.version>
    <animal-sniffer-maven-plugin.version>1.17</animal-sniffer-maven-plugin.version>
    <maven-hpi-plugin.version>2.5</maven-hpi-plugin.version>
    <maven-javadoc-plugin.version>3.0.1</maven-javadoc-plugin.version>
    <maven-jar-plugin.version>3.1.0</maven-jar-plugin.version>
    <pitest-maven.plugin>1.4.2</pitest-maven.plugin>
    <pitest-maven.junit5.plugin>0.7</pitest-maven.junit5.plugin>

    <!-- Enabled while there are fatal Findbugs issues -->
    <findbugs.failOnError>false</findbugs.failOnError>

    <!-- Maven Surefire ArgLine -->
    <argLine>-Djava.awt.headless=true -Xmx1024m</argLine>
  </properties>

  <licenses>
    <license>
      <name>MIT license</name>
      <comments>All source code is under the MIT license.</comments>
    </license>
  </licenses>

  <dependencies>
    <!-- Project Dependencies -->
    <dependency>
      <!-- TODO: remove before 5.0.0 version -->
      <groupId>io.jenkins.plugins</groupId>
      <artifactId>warnings-ng</artifactId>
      <version>${warnings-ng.version}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.collections</groupId>
      <artifactId>eclipse-collections-api</artifactId>
      <version>${eclipse-collections.version}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.collections</groupId>
      <artifactId>eclipse-collections</artifactId>
      <version>${eclipse-collections.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
      <version>${commons.lang.version}</version>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>${commons.io.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-digester3</artifactId>
      <version>${commons.digester.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-text</artifactId>
      <version>${commons.text.version}</version>
    </dependency>
    <dependency>
      <groupId>joda-time</groupId>
      <artifactId>joda-time</artifactId>
      <version>1.6</version>
    </dependency>
    <dependency>
      <groupId>de.java2html</groupId>
      <artifactId>java2html</artifactId>
      <version>5.0</version>
    </dependency>
    <dependency>
      <groupId>org.json</groupId>
      <artifactId>json</artifactId>
      <version>${json.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.j2html</groupId>
      <artifactId>j2html</artifactId>
      <version>${j2html.version}</version>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.main</groupId>
      <artifactId>jenkins-test-harness-tools</artifactId>
      <version>2.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jvnet.hudson.plugins</groupId>
      <artifactId>analysis-core</artifactId>
      <version>${analysis-core.version}</version>
    </dependency>

    <!-- PMD Messages -->
    <dependency>
      <groupId>net.sourceforge.pmd</groupId>
      <artifactId>pmd-core</artifactId>
      <version>${pmd.version}</version>
      <exclusions>
        <exclusion>
          <groupId>com.ibm.icu</groupId>
          <artifactId>icu4j</artifactId>
        </exclusion>
        <exclusion>
          <groupId>net.sourceforge.saxon</groupId>
          <artifactId>saxon</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>net.sourceforge.pmd</groupId>
      <artifactId>pmd-java</artifactId>
      <version>${pmd.version}</version>
      <exclusions>
        <exclusion>
          <groupId>net.sourceforge.saxon</groupId>
          <artifactId>saxon</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <!-- Required Jenkins Plug-in Dependencies -->
    <dependency>
      <groupId>org.jenkins-ci.plugins.workflow</groupId>
      <artifactId>workflow-step-api</artifactId>
      <version>${workflow-step.version}</version>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins.workflow</groupId>
      <artifactId>workflow-job</artifactId>
      <version>${workflow-job.version}</version>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>structs</artifactId>
      <version>1.10</version>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>antisamy-markup-formatter</artifactId>
      <version>1.5</version>
    </dependency>

    <!-- Optional Jenkins Plug-in Dependencies -->
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>matrix-project</artifactId>
      <version>${matrix-project.version}</version>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.main</groupId>
      <artifactId>maven-plugin</artifactId>
      <version>${jenkins-maven-plugin.version}</version>
      <!-- TODO: not yet optional due to deprecated code -->
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>dashboard-view</artifactId>
      <version>${dashboard-view.version}</version>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>token-macro</artifactId>
      <version>${token-macro.version}</version>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>git</artifactId>
      <version>${git-plugin.version}</version>
      <optional>true</optional>
    </dependency>

    <!-- Test Dependencies -->
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.vintage</groupId>
      <artifactId>junit-vintage-engine</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.platform</groupId>
      <artifactId>junit-platform-launcher</artifactId>
      <version>${junit-platform-launcher.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-params</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>${mockito.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>${assertj.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.tngtech.archunit</groupId>
      <artifactId>archunit</artifactId>
      <version>${archunit.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.tngtech.archunit</groupId>
      <artifactId>archunit-junit</artifactId>
      <version>${archunit.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>net.javacrumbs.json-unit</groupId>
      <artifactId>json-unit-fluent</artifactId>
      <version>${json-unit-fluent.version}</version>
      <scope>test</scope>
    </dependency>

    <!-- Integration Test Dependencies -->
    <!-- Configuration as Code -->
    <dependency>
      <groupId>io.jenkins</groupId>
      <artifactId>configuration-as-code</artifactId>
      <version>1.0</version>
      <scope>test</scope>
    </dependency>
    <!-- Groovy -->
    <dependency>
      <groupId>org.jenkins-ci.plugins.workflow</groupId>
      <artifactId>workflow-cps</artifactId>
      <version>2.42</version>
      <scope>test</scope>
    </dependency>
    <!-- stage -->
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>pipeline-stage-step</artifactId>
      <version>2.3</version>
      <scope>test</scope>
    </dependency>
    <!-- node -->
    <dependency>
      <groupId>org.jenkins-ci.plugins.workflow</groupId>
      <artifactId>workflow-durable-task-step</artifactId>
      <version>2.16</version>
      <scope>test</scope>
    </dependency>
    <!-- recorder -> step -->
    <dependency>
      <groupId>org.jenkins-ci.plugins.workflow</groupId>
      <artifactId>workflow-basic-steps</artifactId>
      <version>2.7</version>
      <scope>test</scope>
    </dependency>

    <!-- XML Unit -->
    <dependency>
      <groupId>xmlunit</groupId>
      <artifactId>xmlunit</artifactId>
      <version>1.5</version>
      <scope>test</scope>
    </dependency>

  </dependencies>
  
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
        <version>2.8.2</version>
      </dependency>
      <dependency>
        <groupId>joda-time</groupId>
        <artifactId>joda-time</artifactId>
        <version>2.9.5</version>
      </dependency>
      <dependency>
        <groupId>org.jenkins-ci</groupId>
        <artifactId>annotation-indexer</artifactId>
        <version>1.12</version>
      </dependency>
      <dependency>
        <groupId>org.jenkins-ci.plugins</groupId>
        <artifactId>mailer</artifactId>
        <version>1.18</version>
      </dependency>
      <dependency>
        <groupId>org.jenkins-ci.plugins</groupId>
        <artifactId>scm-api</artifactId>
        <version>2.2.0</version>
      </dependency>
      <dependency>
        <groupId>org.jenkins-ci.plugins</groupId>
        <artifactId>script-security</artifactId>
        <version>1.36</version>
      </dependency>
      <dependency>
        <groupId>commons-net</groupId>
        <artifactId>commons-net</artifactId>
        <version>3.6</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven-compiler-plugin.version}</version>
        <configuration>
          <source>${java.level}</source>
          <target>${java.level}</target>
          <testSource>${java.level}</testSource>
          <testTarget>${java.level}</testTarget>
          <compilerArgs>
            <arg>-Xlint:all</arg>
          </compilerArgs>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>findbugs</id>
            <phase>none</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${maven-javadoc-plugin.version}</version>
        <configuration>
          <additionalOptions>-Xdoclint:all</additionalOptions>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>javadoc</goal>
            </goals>
            <!-- As soon as possible but after required generate-sources phase -->
            <phase>process-sources</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.pitest</groupId>
        <artifactId>pitest-maven</artifactId>
        <version>${pitest-maven.plugin}</version>
        <dependencies>
          <dependency>
            <groupId>org.pitest</groupId>
            <artifactId>pitest-junit5-plugin</artifactId>
            <version>${pitest-maven.junit5.plugin}</version>
          </dependency>
        </dependencies>
        <configuration>
          <outputFormats>XML,HTML</outputFormats>
          <verbose>true</verbose>
          <targetClasses>
            <param>io.jenkins.plugins.analysis.*</param>
          </targetClasses>
          <targetTests>
            <param>io.jenkins.plugins.analysis.*</param>
          </targetTests>
          <excludedTestClasses>
            <param>*ITest</param>
          </excludedTestClasses>
        </configuration>
      </plugin>
   </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${maven-jar-plugin.version}</version>
          <configuration>
            <archive>
              <manifestEntries>
                <Built-By>Ullrich Hafner</Built-By>
                <Url>${project.scm.url}</Url>
                <Jenkins-ClassFilter-Whitelisted>true</Jenkins-ClassFilter-Whitelisted>
              </manifestEntries>
            </archive>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>animal-sniffer-maven-plugin</artifactId>
          <version>${animal-sniffer-maven-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>versions-maven-plugin</artifactId>
          <version>${versions-maven-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${maven-surefire.plugin}</version>
        </plugin>
        <plugin>
          <artifactId>maven-enforcer-plugin</artifactId>
          <executions>
            <execution>
              <id>display-info</id>
              <configuration>
                <rules>
                  <enforceBytecodeVersion>
                    <ignoreClasses>
                      <!-- asm dependency from PMD contains a java9 module-info.class -->
                      <ignoreClass>module-info</ignoreClass>
                      <!-- Junit >= 5.3 contains some java9 classes -->
                      <ignoreClass>**/ModuleUtils*</ignoreClass>
                    </ignoreClasses>
                  </enforceBytecodeVersion>
                </rules>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>com.github.ferstl</groupId>
          <artifactId>depgraph-maven-plugin</artifactId>
          <version>${depgraph-maven-plugin.version}</version>
          <configuration>
            <graphFormat>puml</graphFormat>
            <scope>runtime</scope>
            <excludes>
            </excludes>
            <showVersions>true</showVersions>
            <transitiveExcludes>
              <exclude>*</exclude>
            </transitiveExcludes>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>${jacoco-maven-plugin.version}</version>
          <configuration>
            <includes>
              <include>io/jenkins/plugins/analysis/**/*</include>
            </includes>
          </configuration>
          <executions>
            <execution>
              <goals>
                <goal>prepare-agent</goal>
              </goals>
            </execution>
            <execution>
              <id>report</id>
              <phase>prepare-package</phase>
              <goals>
                <goal>report</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>${maven-checkstyle-plugin.version}</version>
          <dependencies>
            <dependency>
              <groupId>com.puppycrawl.tools</groupId>
              <artifactId>checkstyle</artifactId>
              <version>${checkstyle.version}</version>
            </dependency>
          </dependencies>
          <configuration>
            <configLocation>etc/checkstyle-configuration.xml</configLocation>
            <includeTestSourceDirectory>true</includeTestSourceDirectory>
            <excludes>hudson/**/*</excludes>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-pmd-plugin</artifactId>
          <version>${maven-pmd-plugin.version}</version>
          <dependencies>
            <dependency>
              <groupId>net.sourceforge.pmd</groupId>
              <artifactId>pmd-core</artifactId>
              <version>${pmd.version}</version>
            </dependency>
            <dependency>
              <groupId>net.sourceforge.pmd</groupId>
              <artifactId>pmd-java</artifactId>
              <version>${pmd.version}</version>
            </dependency>
          </dependencies>
          <configuration>
            <rulesets>
              <ruleset>etc/pmd-configuration.xml</ruleset>
            </rulesets>
            <excludeRoots>
              <excludeRoot>target/generated-sources/localizer</excludeRoot>
              <excludeRoot>target/generated-test-sources/assertj-assertions</excludeRoot>
            </excludeRoots>
            <includeTests>true</includeTests>
            <excludes>hudson/**/*</excludes>
            <minimumTokens>50</minimumTokens>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>findbugs-maven-plugin</artifactId>
          <version>${findbugs-maven-plugin.version}</version>
          <configuration>
            <xmlOutput>true</xmlOutput>
            <findbugsXmlOutput>true</findbugsXmlOutput>
            <threshold>Low</threshold>
            <effort>Max</effort>
            <relaxed>false</relaxed>
            <fork>false</fork>
            <excludeFilterFile>etc/findbugs-exclusion-filter.xml</excludeFilterFile>
            <includeTests>true</includeTests>
          </configuration>
        </plugin>
        <plugin>
          <groupId>com.github.spotbugs</groupId>
          <artifactId>spotbugs-maven-plugin</artifactId>
          <version>${spotbugs-maven-plugin.version}</version>
          <configuration>
            <xmlOutput>true</xmlOutput>
            <threshold>Low</threshold>
            <effort>Max</effort>
            <relaxed>false</relaxed>
            <fork>true</fork>
            <excludeFilterFile>etc/findbugs-exclusion-filter.xml</excludeFilterFile>
            <includeTests>true</includeTests>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <id>skip-javadoc-with-tests</id>
      <activation>
        <property>
          <name>skipTests</name>
          <value>true</value>
        </property>
      </activation>
      <properties>
        <maven.javadoc.skip>true</maven.javadoc.skip>
      </properties>
    </profile>
  </profiles>

  <scm>
    <connection>scm:git:git://github.com/jenkinsci/${project.artifactId}-plugin.git</connection>
    <developerConnection>scm:git:git@github.com:jenkinsci/${project.artifactId}-plugin.git</developerConnection>
    <url>https://github.com/jenkinsci/${project.artifactId}-plugin</url>
    <tag>warnings-5.0.0-beta4</tag>
  </scm>

  <repositories>
    <repository>
      <id>repo.jenkins-ci.org</id>
      <url>http://repo.jenkins-ci.org/public/</url>
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <id>repo.jenkins-ci.org</id>
      <url>http://repo.jenkins-ci.org/public/</url>
    </pluginRepository>
  </pluginRepositories>

</project>

