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

    Copyright (c) 2014-2024 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
    https://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>70</version>
  </parent>

  <groupId>io.takari.maven.plugins</groupId>
  <artifactId>takari-lifecycle</artifactId>
  <version>2.3.2</version>
  <packaging>pom</packaging>
  <name>${project.groupId}:${project.artifactId}</name>

  <modules>
    <module>takari-lifecycle-plugin</module>
    <module>takari-lifecycle-plugin-its</module>
  </modules>

  <scm>
    <connection>scm:git:git@github.com:takari/takari-lifecycle.git</connection>
    <developerConnection>scm:git:git@github.com:takari/takari-lifecycle.git</developerConnection>
    <tag>takari-lifecycle-2.3.2</tag>
    <url>https://github.com/takari/takari-lifecycle</url>
  </scm>

  <properties>
    <!--
    Note: actual runtime requirement is Java 17+ due Eclipse JDT/ECJ!
    But, to support Maven 3.6/3.8 that use ancient Eclipse Sisu, we cannot
    create components having bytecode newer than Java 14.
    So we cheat here: we create components having bytecode Java 11 to make them
    discoverable, but takari-lifecycle due dependencies is in fact Java 17+
    -->
    <takari.javaSourceVersion>11</takari.javaSourceVersion>

    <mavenVersion>3.9.9</mavenVersion>
    <aetherVersion>1.9.23</aetherVersion>
    <sisuVersion>0.9.0.M4</sisuVersion>
    <incrementalbuild.version>1.0.4</incrementalbuild.version>
    <mavenPluginPluginVersion>3.15.1</mavenPluginPluginVersion>
    <m2eWorkspaceVersion>0.4.0</m2eWorkspaceVersion>
    <plexusUtilsVersion>3.6.0</plexusUtilsVersion>
    <pluginTestingVersion>3.1.1</pluginTestingVersion>

    <!-- UT and IT only! -->
    <guava.version>33.4.8-jre</guava.version>
  </properties>

  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
      <resource>
        <filtering>true</filtering>
        <directory>src/main/resources-filtered</directory>
      </resource>
    </resources>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>io.takari.maven.plugins</groupId>
          <artifactId>takari-lifecycle-plugin</artifactId>
          <dependencies>
            <dependency>
              <groupId>io.takari.m2e.workspace</groupId>
              <artifactId>org.eclipse.m2e.workspace.cli</artifactId>
              <version>${m2eWorkspaceVersion}</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>com.mycila</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <configuration>
            <licenseSets>
              <licenseSet>
                <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>**/src/main/java/io/takari/maven/plugins/compile/jdt/ReferenceCollection.java</exclude>
                </excludes>
              </licenseSet>
            </licenseSets>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.gaul</groupId>
          <artifactId>modernizer-maven-plugin</artifactId>
          <configuration>
            <!-- TODO: fix MANY violations we have -->
            <failOnViolations>false</failOnViolations>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
</project>
