<?xml version="1.0" encoding="UTF-8"?>
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">

  <modelVersion>4.0.0</modelVersion>
  <groupId>ai.timefold.solver</groupId>
  <artifactId>timefold-solver-parent</artifactId>
  <packaging>pom</packaging>
  <version>2.0.0-beta-1</version>

  <name>Timefold Solver multiproject parent</name>
  <description>
    Timefold solves planning problems.
    This lightweight, embeddable planning engine implements powerful and scalable algorithms
    to optimize business resource scheduling and planning.

    This module is just the multiproject parent. The planning engine itself is in timefold-solver-core.
  </description>
  <url>https://solver.timefold.ai</url>
  <inceptionYear>2006</inceptionYear>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <properties>
    <version.javadoc.plugin>3.12.0</version.javadoc.plugin>
    <version.rewrite.plugin>6.28.1</version.rewrite.plugin>
    <version.source.plugin>3.4.0</version.source.plugin>
    <version.resources.plugin>3.5.0</version.resources.plugin>
    <version.cyclonedx.plugin>2.9.1</version.cyclonedx.plugin>
    <sonar.moduleKey>${project.groupId}:${project.artifactId}</sonar.moduleKey>
    <sonar.sources>.</sonar.sources>
    <sonar.tests>.</sonar.tests>
    <sonar.inclusions>src/main/**</sonar.inclusions>
    <sonar.test.inclusions>src/test/**</sonar.test.inclusions>
  </properties>

  <scm>
    <connection>scm:git:git@github.com:TimefoldAI/timefold-solver.git</connection>
    <developerConnection>scm:git:git@github.com:TimefoldAI/timefold-solver.git</developerConnection>
    <url>https://github.com/TimefoldAI/timefold-solver</url>
  </scm>
  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/TimefoldAI/solver/issues/</url>
  </issueManagement>
  <developers>
    <developer>
      <name>Timefold Community</name>
      <organization>Timefold</organization>
      <organizationUrl>https://timefold.ai</organizationUrl>
    </developer>
  </developers>

  <modules>
    <module>build/bom</module>
    <module>build/ide-config</module>
    <module>build/build-parent</module>
    <module>core</module>
    <module>persistence</module>
    <module>spring-integration</module>
    <module>quarkus-integration</module>
    <module>tools</module>
  </modules>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>${version.source.plugin}</version>
        </plugin>
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>${version.resources.plugin}</version>
          <configuration>
            <encoding>UTF-8</encoding>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${version.javadoc.plugin}</version>
          <configuration>
            <author>false</author>
            <failOnError>true</failOnError>
            <quiet>true</quiet>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.cyclonedx</groupId>
          <artifactId>cyclonedx-maven-plugin</artifactId>
          <version>${version.cyclonedx.plugin}</version>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <id>fullProfile</id>
      <activation>
        <property>
          <name>full</name>
        </property>
      </activation>
      <modules>
        <module>docs</module>
      </modules>
      <build>
        <plugins>
          <plugin>
            <!--
              All modules need this to be able to publish on Maven Central.
              Can not go into build-parent, because build-parent required ide-config.
              Therefore ide-config needs to depend on this parent and still publish sources.
            -->
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <phase>verify</phase>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin> <!-- Make sure the build fails-fast on Javadoc issues. -->
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>build-javadoc-jar</id>
                <phase>package</phase>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.cyclonedx</groupId>
            <artifactId>cyclonedx-maven-plugin</artifactId>
            <executions>
              <execution>
                <phase>package</phase>
                <goals>
                  <goal>makeAggregateBom</goal>
                </goals>
                <configuration>
                  <excludeTestProject>true</excludeTestProject>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
