<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright (C) 2006-2017 Talend Inc. - www.talend.com
   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

      http://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>

  <groupId>org.talend.tools</groupId>
  <artifactId>talend-tools-maven-plugin</artifactId>
  <version>1.0.2</version>
  <packaging>maven-plugin</packaging>
  <name>Talend Tools Maven Plugin</name>
  <url>https://talend.github.io/tools/talend-tools-maven-plugin</url>
  <description>
    A set of utility MOJO including a hub-detect (from Blackduck) wrapper.
  </description>

  <properties>
    <maven.version>3.5.0</maven.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
      <version>3.5</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>${maven.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <version>${maven.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>maven-artifact-transfer</artifactId>
      <version>0.9.1</version>
    </dependency>
    <dependency>
      <groupId>com.blackducksoftware.integration</groupId>
      <artifactId>hub-common</artifactId>
      <version>23.0.1</version>
    </dependency>
  </dependencies>

  <developers>
    <developer>
      <name>Romain Manni-Bucau</name>
      <id>rmannibucau</id>
      <email>rmannibucau@talend.com</email>
      <roles>
        <role>Contributor</role>
      </roles>
      <organization>Talend</organization>
      <organizationUrl>https://www.talend.com/</organizationUrl>
      <timezone>+1</timezone>
    </developer>
  </developers>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>3.5</version>
        <executions>
          <execution>
            <id>mojo-descriptor</id>
            <goals>
              <goal>descriptor</goal>
              <goal>helpmojo</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <goalPrefix>talend-tools</goalPrefix>
          <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.7.0</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>net.revelc.code.formatter</groupId>
        <artifactId>formatter-maven-plugin</artifactId>
        <version>2.7.0</version>
        <executions>
          <execution>
            <goals>
              <goal>format</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <encoding>UTF-8</encoding>
          <configFile>talend_java_eclipse_formatter.xml</configFile>
          <lineEnding>LF</lineEnding>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.talend.tools</groupId>
            <artifactId>java-formatter</artifactId>
            <version>0.1.0</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.6</version>
        <configuration>
          <relativizeDecorationLinks>false</relativizeDecorationLinks>
          <asciidoc>
            <attributes>
              <icons>font</icons>
              <source-highlighter>coderay</source-highlighter>
              <coderay-css>style</coderay-css>
              <toclevels>2</toclevels>
            </attributes>
          </asciidoc>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.asciidoctor</groupId>
            <artifactId>asciidoctor-maven-plugin</artifactId>
            <version>1.5.6</version>
          </dependency>
          <dependency>
            <groupId>org.jruby</groupId>
            <artifactId>jruby-complete</artifactId>
            <version>1.7.26</version>
          </dependency>
          <dependency>
            <groupId>org.asciidoctor</groupId>
            <artifactId>asciidoctorj</artifactId>
            <version>1.5.6</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.3</version>
        <configuration>
          <localCheckout>true</localCheckout>
          <pushChanges>false</pushChanges>
          <releaseProfiles>release,ossrh</releaseProfiles>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.8</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.0.0-M1</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.0.1</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <repositories>
    <repository>
      <id>blackduck</id>
      <url>https://test-repo.blackducksoftware.com/artifactory/bds-integrations-release</url>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <id>TalendOpenSourceRelease</id>
      <url>https://artifacts-zl.talend.com/nexus/content/repositories/TalendOpenSourceRelease/</url>
    </pluginRepository>
  </pluginRepositories>

  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://github.com/Talend/tools/blob/master/LICENSE</url>
      <distribution>may be downloaded from the Maven repository</distribution>
    </license>
  </licenses>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.9</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>3.5</version>
      </plugin>
    </plugins>
  </reporting>

  <scm>
    <connection>scm:git:https://github.com/Talend/tools.git</connection>
    <developerConnection>scm:git:https://github.com/Talend/tools.git</developerConnection>
    <url>https://github.com/Talend/tools</url>
    <tag>talend-tools-maven-plugin-1.0.2</tag>
  </scm>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>
</project>
