<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (c) 2014 Takari, Inc.
    All rights reserved. This program and the accompanying materials
    are made available under the terms of the Eclipse Public License v1.0
    which accompanies this distribution, and is available at
    http://www.eclipse.org/legal/epl-v10.html

-->

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

  <parent>
    <groupId>io.takari</groupId>
    <artifactId>takari</artifactId>
    <version>14</version>
  </parent>

  <groupId>io.takari.maven.plugins</groupId>
  <artifactId>takari-lifecycle</artifactId>
  <version>1.9.2</version>
  <packaging>pom</packaging>

  <prerequisites>
    <maven>[3.2.1,)</maven>
  </prerequisites>

  <properties>
    <mavenVersion>3.2.1</mavenVersion>
    <aetherVersion>0.9.0.M2</aetherVersion>
    <incrementalbuild.version>0.9.3</incrementalbuild.version>
    <guava.version>14.0.1</guava.version>
    <plugintesting.version>3.2.0</plugintesting.version>
    <mavenPluginPluginVersion>3.3</mavenPluginPluginVersion>
    <m2eWorkspaceVersion>0.2.0</m2eWorkspaceVersion>
  </properties>

  <scm>
    <connection>scm:git:git@github.com/takari/takari-lifecycle-plugin.git</connection>
    <developerConnection>scm:git:ssh://git@github.com/takari/takari-lifecycle-plugin.git</developerConnection>
    <url>http://github.com/takari/takari-lifecycle-plugin</url>
    <tag>takari-lifecycle-1.9.2</tag>
  </scm>

  <!-- 
  <repositories>
    <repository>
      <id>takari-snapshots</id>
      <url>https://otto.takari.io/content/repositories/snapshots/</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>
   -->

  <modules>
    <module>takari-lifecycle-plugin</module>
    <module>takari-lifecycle-plugin-its</module>
    <module>takari-plugin-testing</module>
    <module>takari-plugin-testing-plugin</module>
    <module>takari-resource-filtering</module>
  </modules>

  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
      <resource>
        <directory>src/main/resources-filtered</directory>
        <filtering>true</filtering>
      </resource>
    </resources>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>animal-sniffer-maven-plugin</artifactId>
          <version>1.10</version>
          <configuration>
            <signature>
              <groupId>org.codehaus.mojo.signature</groupId>
              <artifactId>java17</artifactId>
              <version>1.0</version>
            </signature>
          </configuration>
          <executions>
            <execution>
              <id>check-java-api-usage</id>
              <phase>test</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5</version>
          <configuration>
            <autoVersionSubmodules>true</autoVersionSubmodules>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>sisu-maven-plugin</artifactId>
          <version>1.4</version>
          <executions>
            <execution>
              <id>generate-index</id>
              <goals>
                <goal>main-index</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <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-plugin-plugin</artifactId>
          <version>${mavenPluginPluginVersion}</version>
          <configuration>
            <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
            <extractors>
              <extractor>java-annotations</extractor>
            </extractors>
          </configuration>
          <executions>
            <execution>
              <id>default-descriptor</id>
              <phase>process-classes</phase>
              <goals>
                <goal>descriptor</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>com.mycila</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <configuration>
            <excludes combine.children="append">
              <!-- don't override copyright of code copied from other projects -->
              <!--
                | Please note that license-plugin is quite dumb and processes the same sources multiple times
                | once per each level of parent/module hierarchy. This means the same excludes has to be configured
                | on each hierarchy level too. (or hope we remember to run "mvn -N license:format", which I am sure
                | we'll forget) 
               -->
              <exclude>takari-lifecycle-plugin/src/main/java/io/takari/maven/plugins/compile/jdt/ReferenceCollection.java</exclude>
            </excludes>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
</project>
