<?xml version="1.0" encoding="utf-8"?>
<!--
 ~ The MIT License
 ~
 ~ Copyright (c) 2011-2015, CloudBees, Inc., Stephen Connolly.
 ~
 ~ Permission is hereby granted, free of charge, to any person obtaining a copy
 ~ of this software and associated documentation files (the "Software"), to deal
 ~ in the Software without restriction, including without limitation the rights
 ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 ~ copies of the Software, and to permit persons to whom the Software is
 ~ furnished to do so, subject to the following conditions:
 ~
 ~ The above copyright notice and this permission notice shall be included in
 ~ all copies or substantial portions of the Software.
 ~
 ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 ~ THE SOFTWARE.
 -->

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

  <artifactId>credentials</artifactId>
  <version>2.1.19</version>
  <packaging>hpi</packaging>

  <name>Credentials Plugin</name>
  <description>
    This plugin allows you to store credentials in Jenkins.
  </description>
  <url>https://wiki.jenkins.io/display/JENKINS/Credentials+Plugin</url>
  <licenses>
    <license>
      <name>The MIT license</name>
      <url>https://opensource.org/licenses/MIT</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>stephenconnolly</id>
      <name>Stephen Connolly</name>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git://github.com/jenkinsci/credentials-plugin.git</connection>
    <developerConnection>scm:git:git@github.com:jenkinsci/credentials-plugin.git</developerConnection>
    <url>https://github.com/jenkinsci/credentials-plugin</url>
    <tag>credentials-2.1.19</tag>
  </scm>

  <properties>
    <jenkins.version>1.625.3</jenkins.version>
    <java.level>7</java.level>
    <antlr4.version>4.5</antlr4.version>
  </properties>

  <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>

  <dependencies>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>structs</artifactId>
      <version>1.7</version>
    </dependency>
    <!-- test dependencies -->
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>1.9.5</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>org.hamcrest</groupId>
          <artifactId>hamcrest-core</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.antlr</groupId>
      <artifactId>antlr4-runtime</artifactId>
      <version>${antlr4.version}</version>
    </dependency>
    <dependency>
      <groupId>org.kohsuke.metainf-services</groupId>
      <artifactId>metainf-services</artifactId>
      <version>1.4</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.xmlunit</groupId>
      <artifactId>xmlunit-matchers</artifactId>
      <version>2.2.0</version>
      <scope>test</scope>
    </dependency>
      <dependency>
          <groupId>org.jenkins-ci.plugins</groupId>
          <artifactId>cloudbees-folder</artifactId>
          <version>6.7</version>
          <scope>test</scope>
      </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.jenkins-ci.tools</groupId>
        <artifactId>maven-hpi-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>generate-taglib-interface</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <configuration>
          <excludeFilterFile>src/findbugs/excludesFilter.xml</excludeFilterFile>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.antlr</groupId>
        <artifactId>antlr4-maven-plugin</artifactId>
        <version>${antlr4.version}</version>
        <configuration>
          <listener>true</listener>
          <visitor>true</visitor>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>antlr4</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>pdfs</id>
      <properties>
        <asciidoctor.maven.plugin.version>1.5.5</asciidoctor.maven.plugin.version>
        <asciidoctorj.pdf.version>1.5.0-alpha.15</asciidoctorj.pdf.version>
        <asciidoctorj.version>1.5.5</asciidoctorj.version>
        <jruby.version>1.7.26</jruby.version>
      </properties>
      <build>
        <plugins>
          <plugin>
              <groupId>org.asciidoctor</groupId>
              <artifactId>asciidoctor-maven-plugin</artifactId>
              <version>${asciidoctor.maven.plugin.version}</version>
              <dependencies>
                  <dependency>
                      <groupId>org.asciidoctor</groupId>
                      <artifactId>asciidoctorj-pdf</artifactId>
                      <version>${asciidoctorj.pdf.version}</version>
                  </dependency>
                  <!-- Comment this section to use the default jruby artifact provided by the plugin -->
                  <dependency>
                      <groupId>org.jruby</groupId>
                      <artifactId>jruby-complete</artifactId>
                      <version>${jruby.version}</version>
                  </dependency>
                  <!-- Comment this section to use the default AsciidoctorJ artifact provided by the plugin -->
                  <dependency>
                      <groupId>org.asciidoctor</groupId>
                      <artifactId>asciidoctorj</artifactId>
                      <version>${asciidoctorj.version}</version>
                  </dependency>
              </dependencies>
              <configuration>
                  <sourceDirectory>docs</sourceDirectory>
                  <!-- Attributes common to all output formats -->
                  <attributes>
                      <sourcedir>${project.build.sourceDirectory}</sourcedir>
                      <imagesdir>.</imagesdir>
                  </attributes>
              </configuration>
              <executions>
                  <execution>
                      <id>generate-pdf-doc</id>
                      <phase>generate-resources</phase>
                      <goals>
                          <goal>process-asciidoc</goal>
                      </goals>
                      <configuration>
                          <backend>pdf</backend>
                          <!-- Since 1.5.0-alpha.9 PDF back-end can use 'rouge' as well as 'coderay'
                          for source highlighting -->
                          <!-- Due to a known issue on windows, it is recommended to use 'coderay' until an new version of 'rouge' is released.
                                  see discussions: https://github.com/asciidoctor/asciidoctor-maven-examples/pull/58
                                                   https://github.com/asciidoctor/asciidoctorj-pdf/issues/3
                                                   https://github.com/jneen/rouge/issues/661
                          -->
                          <sourceHighlighter>coderay</sourceHighlighter>
                          <attributes>
                              <icons>font</icons>
                              <pagenums />
                              <toc />
                              <idprefix />
                              <idseparator>-</idseparator>
                          </attributes>
                      </configuration>
                  </execution>
              </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
