<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright (C) 2006-2018 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.sdk.component</groupId>
  <artifactId>component-api</artifactId>
  <version>0.0.6</version>
  <name>Component API</name>
  <packaging>bundle</packaging>
  <description>Talend Component Kit API</description>
  <url>https://talend.github.io/component-runtime/</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <talend-icon.version>0.183.0</talend-icon.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <version>1.16.20</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-annotation_1.3_spec</artifactId>
      <version>1.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-json_1.1_spec</artifactId>
      <version>1.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-jsonb_1.0_spec</artifactId>
      <version>1.0</version>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

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

  <build>
    <plugins>
      <plugin>
        <groupId>org.talend.tools</groupId>
        <artifactId>talend-tools-maven-plugin</artifactId>
        <version>1.0.4</version>
        <executions>
          <execution>
            <id>hub-detect</id>
            <phase>verify</phase>
            <goals>
              <goal>hub-detect</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <blackduckUrl>https://blackduck.talend.com</blackduckUrl>
          <blackduckName>Talend Component (TCOMP)</blackduckName>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.6.1</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>3.3.0</version>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Import-Package>!org.talend.component.api.*</Import-Package>
          </instructions>
        </configuration>
      </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>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <version>0.12</version>
        <executions>
          <execution>
            <phase>verify</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <reportFile>${project.build.directory}/${project.build.finalName}.rat</reportFile>
          <excludes>
            <exclude>**/target/**/*</exclude>
            <exclude>cobertura.ser</exclude>
            <exclude>.classpath</exclude>
            <exclude>.settings/**/*</exclude>
            <exclude>.project</exclude>
            <exclude>.idea/**/*</exclude>
            <exclude>**/*.iml</exclude>
            <exclude>**/*.ipr</exclude>
            <exclude>**/*.iws</exclude>
            <exclude>**/.*</exclude>
            <exclude>**/.*/*</exclude>
            <exclude>**/*.adoc</exclude>
            <exclude>**/*.md</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.gmavenplus</groupId>
        <artifactId>gmavenplus-plugin</artifactId>
        <version>1.6</version>
        <executions>
          <execution>
            <id>find-icons</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>execute</goal>
            </goals>
            <configuration>
              <scripts>
                <script>${project.basedir}/src/build/CreateIcons.groovy</script>
              </scripts>
            </configuration>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <version>3.0.0-alpha-1</version>
            <scope>runtime</scope>
          </dependency>
          <dependency>
            <groupId>org.talend.ui</groupId>
            <artifactId>talend-icon</artifactId>
            <version>${talend-icon.version}</version>
          </dependency>
        </dependencies>
      </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-javadoc-plugin</artifactId>
        <version>3.0.0</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <splitindex>true</splitindex>
          <linksource>true</linksource>
          <windowtitle>${project.name}</windowtitle>
          <header>${project.name} - ${project.version}</header>
          <doctitle>${project.name} - ${project.version}</doctitle>
          <bottom>${project.version} - Copyright &amp;copy; 2018 &lt;a href="https://talend.github.io/component-runtime/" target="_top"&gt;Talend Component Kit Documentation&lt;a&gt;</bottom>
          <use>true</use>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.0.2</version>
        <configuration>
          <archive combine.children="append">
            <manifestEntries>
              <Automatic-Module-Name>org.talend.sdk.component.api</Automatic-Module-Name>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>clirr-maven-plugin</artifactId>
        <version>2.8</version>
        <executions>
          <execution>
            <id>check compatibility</id>
            <goals>
              <goal>check</goal>
            </goals>
            <configuration>
              <skip>true</skip> <!-- just for 0.0.6 release, it has been checked before -->
            </configuration>
          </execution>
        </executions>
      </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-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>

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

  <repositories>
    <repository>
      <id>TalendOpenSourceRelease</id>
      <url>https://artifacts-zl.talend.com/nexus/content/repositories/TalendOpenSourceRelease/</url>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <id>TalendOpenSourceRelease</id>
      <url>https://artifacts-zl.talend.com/nexus/content/repositories/TalendOpenSourceRelease/</url>
    </pluginRepository>
  </pluginRepositories>

  <scm>
    <connection>scm:git:https://github.com/Talend/component-api.git</connection>
    <developerConnection>scm:git:https://github.com/Talend/component-api.git</developerConnection>
    <url>https://github.com/Talend/component-api</url>
    <tag>component-api-0.0.6</tag>
  </scm>

  <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>
    <developer>
      <name>Dmytro Chmyga</name>
      <id>rmannibucau</id>
      <email>dchmyga@talend.com</email>
      <roles>
        <role>Contributor</role>
      </roles>
      <organization>Talend</organization>
      <organizationUrl>https://www.talend.com/</organizationUrl>
      <timezone>+2</timezone>
    </developer>
  </developers>
</project>
