<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (c) 2017-2026, TU Dortmund University
This file is part of ADD-Lib, https://add-lib.scce.info/.

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following
disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided with the distribution.

Neither the name of the TU Dortmund University nor the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<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"><!-- ADD-Lib -->
    <modelVersion>4.0.0</modelVersion>

    <groupId>info.scce</groupId>
    <artifactId>addlib-parent</artifactId>
    <version>4.0.1</version>
    <packaging>pom</packaging>

    <!-- Project Name, Description and URL -->
    <name>ADDLib :: Parent</name>
    <description>The Java Library for Algebraic Decision Diagrams, Code Generation, and Layouting</description>
    <url>https://add-lib.scce.info</url>
    <!-- License -->
    <licenses>
        <license>
            <name>3-Clause BSD License</name>
            <url>https://opensource.org/license/bsd-3-clause/</url>
        </license>
    </licenses>

    <!-- Developers -->
    <developers>
        <developer>
            <name>Frederik Gossen</name>
            <email>frederik.gossen@{tu-dortmund.de, ul.ie}</email>
            <organization>TU Dortmund University, University of Limerick</organization>
        </developer>
        <developer>
            <name>Alnis Murtovi</name>
            <email>alnis.murtovi@tu-dortmund.de</email>
            <organization>TU Dortmund University</organization>
        </developer>
        <developer>
            <name>Markus Frohme</name>
            <email>markus.frohme@tu-dortmund.de</email>
            <organization>TU Dortmund University</organization>
        </developer>
    </developers>
    <!-- Contributors -->
    <contributors>
        <contributor>
            <name>Jan Feider</name>
            <email>jan.feider@tu-dortmund.de</email>
            <organization>TU Dortmund University</organization>
        </contributor>
        <contributor>
            <name>Jan Linden</name>
            <email>jan.linden@tu-dortmund.de</email>
            <organization>TU Dortmund University</organization>
        </contributor>
        <contributor>
            <name>Bernhard Steffen</name>
            <email>bernhard.steffen@tu-dortmund.de</email>
            <organization>TU Dortmund University</organization>
        </contributor>
    </contributors>

    <modules>
        <module>api</module>
        <module>build-parent</module>
        <module>build-tools</module>
        <module>bundle</module>
        <module>core</module>
        <module>cudd</module>
        <module>sylvan</module>
        <module>util</module>
        <module>viewer</module>
    </modules>

    <!-- SCM -->
    <scm>
        <connection>scm:git:https://gitlab.com/scce/add-lib.git</connection>
        <developerConnection>scm:git:git@gitlab.com:scce/add-lib.git</developerConnection>
        <url>https://gitlab.com/scce/add-lib</url>
        <tag>addlib-4.0.1</tag>
    </scm>
    <!-- Used for deploying to maven central -->
    <distributionManagement>
        <repository>
            <id>sonatype</id>
            <url>https://central.sonatype.com</url>
        </repository>
        <snapshotRepository>
            <id>sonatype</id>
            <url>https://central.sonatype.com/repository/maven-snapshots/</url>
        </snapshotRepository>
        <!-- Dummy - this will NOT actually be used, but is required for mvn site:stage -->
        <!-- Use scm-publish plugin for site deployment on GitLab pages -->
        <site>
            <id>local</id>
            <url>file://${user.home}/addlib-site</url>
        </site>
    </distributionManagement>

    <!-- Properties -->
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
        <maven.compiler.release>11</maven.compiler.release>
        <argLine /> <!-- compatibility for property expansion in surefire-plugin -->

        <!-- custom properties -->

        <cacio.version>1.11.1</cacio.version>
        <central-publish-plugin.version>0.8.0</central-publish-plugin.version>
        <checkerframework.version>3.48.3</checkerframework.version>
        <checkstyle.version>10.26.1</checkstyle.version>
        <checkstyle-plugin.version>3.6.0</checkstyle-plugin.version>
        <commons-io.version>2.11.0</commons-io.version>
        <compiler-plugin.version>3.13.0</compiler-plugin.version>
        <dependency-plugin.version>3.8.1</dependency-plugin.version>
        <deploy-plugin.version>3.1.3</deploy-plugin.version>
        <info-reports-plugin.version>3.8.0</info-reports-plugin.version>
        <jacoco-plugin.version>0.8.12</jacoco-plugin.version>
        <javacc-plugin.version>3.0.1</javacc-plugin.version>
        <javadoc-plugin.version>3.11.2</javadoc-plugin.version>
        <jmh.version>1.35</jmh.version>
        <maven-antrun-plugin.version>3.1.0</maven-antrun-plugin.version>
        <maven-invoker-plugin.version>3.9.0</maven-invoker-plugin.version>
        <maven-gpg-plugin.version>3.2.7</maven-gpg-plugin.version>
        <maven-jar-plugin.version>3.4.2</maven-jar-plugin.version>
        <maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
        <maven-source-plugin.version>3.3.1</maven-source-plugin.version>
        <maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version>
        <metainf-services.version>1.11</metainf-services.version>
        <pmd-plugin.version>3.26.0</pmd-plugin.version>
        <release-plugin.version>3.1.0</release-plugin.version>
        <site-plugin.version>3.21.0</site-plugin.version>
        <slf4j.version>2.0.16</slf4j.version>
        <spotbugs-plugin.version>4.9.3.2</spotbugs-plugin.version>
        <testng.version>7.10.2</testng.version>
        <tidy-pom.version>1.3.0</tidy-pom.version>

        <checkerframework.apidocs>https://checkerframework.org/releases/${checkerframework.version}/api/</checkerframework.apidocs>
        <java11.apidocs>https://docs.oracle.com/javase/11/docs/api/</java11.apidocs>
    </properties>

    <!-- Dependencies -->
    <dependencyManagement>
        <dependencies>
            <!-- internal -->
            <dependency>
                <groupId>info.scce</groupId>
                <artifactId>addlib</artifactId>
                <version>${project.version}</version>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>info.scce</groupId>
                <artifactId>addlib-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>info.scce</groupId>
                <artifactId>addlib-build-tools</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>info.scce</groupId>
                <artifactId>addlib-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>info.scce</groupId>
                <artifactId>addlib-cudd</artifactId>
                <version>${project.version}</version>
            </dependency>
            <!-- do not include examples because it won't get deployed -->
            <!--dependency>
                <groupId>info.scce</groupId>
                <artifactId>addlib-examples</artifactId>
                <version>${project.version}</version>
            </dependency-->
            <!-- do not include docker because it won't get deployed -->
            <!--dependency>
                <groupId>info.scce</groupId>
                <artifactId>addlib-docker</artifactId>
                <version>${project.version}</version>
                <type>pom</type>
            </dependency-->
            <!-- do not include examples because it won't get deployed -->
            <!--dependency>
                <groupId>info.scce</groupId>
                <artifactId>addlib-profiling</artifactId>
                <version>${project.version}</version>
            </dependency-->
            <dependency>
                <groupId>info.scce</groupId>
                <artifactId>addlib-sylvan</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>info.scce</groupId>
                <artifactId>addlib-util</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>info.scce</groupId>
                <artifactId>addlib-viewer</artifactId>
                <version>${project.version}</version>
            </dependency>

            <!-- external -->
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${commons-io.version}</version>
            </dependency>
            <dependency>
                <groupId>org.checkerframework</groupId>
                <artifactId>checker-qual</artifactId>
                <version>${checkerframework.version}</version>
            </dependency>
            <dependency>
                <groupId>org.openjdk.jmh</groupId>
                <artifactId>jmh-core</artifactId>
                <version>${jmh.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>

            <!-- build -->
            <dependency>
                <groupId>org.kohsuke.metainf-services</groupId>
                <artifactId>metainf-services</artifactId>
                <version>${metainf-services.version}</version>
                <scope>provided</scope>
            </dependency>

            <!-- testing -->
            <dependency>
                <groupId>com.github.caciocavallosilano</groupId>
                <artifactId>cacio-tta</artifactId>
                <version>${cacio.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <version>${testng.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <!-- Build and Plugins -->
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>${maven-antrun-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${compiler-plugin.version}</version>
                    <configuration>
                        <annotationProcessorPaths>
                            <path>
                                <groupId>org.kohsuke.metainf-services</groupId>
                                <artifactId>metainf-services</artifactId>
                                <version>${metainf-services.version}</version>
                            </path>
                        </annotationProcessorPaths>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${maven-resources-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-invoker-plugin</artifactId>
                    <version>${maven-invoker-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${maven-jar-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven-surefire-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>javacc-maven-plugin</artifactId>
                    <version>${javacc-plugin.version}</version>
                    <executions>
                        <execution>
                            <id>javacc</id>
                            <goals>
                                <goal>javacc</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${maven-source-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${javadoc-plugin.version}</version>
                    <configuration>
                        <quiet>true</quiet>
                        <detectLinks>true</detectLinks>
                        <linksource>false</linksource>
                        <links>
                            <link>${java11.apidocs}</link>
                            <link>${checkerframework.apidocs}</link>
                        </links>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.central</groupId>
                    <artifactId>central-publishing-maven-plugin</artifactId>
                    <version>${central-publish-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${deploy-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${maven-gpg-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>com.github.spotbugs</groupId>
                    <artifactId>spotbugs-maven-plugin</artifactId>
                    <version>${spotbugs-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>${site-plugin.version}</version>
                    <configuration>
                        <!-- Skip site deployment; this will be done by scm-publish plugin -->
                        <skipDeploy>true</skipDeploy>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>${info-reports-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-pmd-plugin</artifactId>
                    <version>${pmd-plugin.version}</version>
                    <configuration>
                        <analysisCache>true</analysisCache>
                        <printFailingErrors>true</printFailingErrors>
                        <linkXRef>false</linkXRef>
                        <excludeRoots>
                            <excludeRoot>target/generated-sources</excludeRoot>
                        </excludeRoots>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>${checkstyle-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${jacoco-plugin.version}</version>
                    <executions>
                        <execution>
                            <id>prepare-report</id>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>report</id>
                            <phase>test</phase>
                            <goals>
                                <goal>report</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>tidy-maven-plugin</artifactId>
                    <version>${tidy-pom.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>${dependency-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>${release-plugin.version}</version>
                    <configuration>
                        <!-- Automatically use the parent version for all submodules, do not prompt for each one -->
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <tagNameFormat>addlib-@{version}</tagNameFormat>
                        <preparationGoals>clean test</preparationGoals>
                        <preparationProfiles>docker,docker-prepare-release,profiling,code-analysis,jlink</preparationProfiles>
                        <goals>deploy</goals>
                        <!-- explicitly disable preparationProfiles until https://issues.apache.org/jira/browse/MRELEASE-1124 is fixed-->
                        <releaseProfiles>release,!examples,!docker,!docker-prepare-release,!profiling,!code-analysis,!jlink</releaseProfiles>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-descriptor</id>
                        <inherited>false</inherited>
                        <goals>
                            <goal>attach-descriptor</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <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-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <extensions>true</extensions>
                        <configuration>
                            <deploymentName>ADDLib ${project.version}</deploymentName>
                            <publishingServerId>sonatype</publishingServerId>
                            <excludeArtifacts>addlib-examples</excludeArtifacts>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <!-- enables generation of test-coverage reports -->
            <id>code-coverage</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>touch-jacoco</id>
                                <phase>generate-test-resources</phase>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                                <configuration>
                                    <target>
                                        <touch file="${project.build.directory}/jacoco.exec" />
                                    </target>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>code-analysis</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>tidy-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>validate</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>analyze</id>
                                <!-- default phase is verify -->
                                <goals>
                                    <goal>analyze-only</goal>
                                </goals>
                                <configuration>
                                    <failOnWarning>true</failOnWarning>
                                    <!-- workaround for APT / slf4j test dependencies -->
                                    <ignoreNonCompile>true</ignoreNonCompile>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <!-- define module in a profile so that we can disable it during a release -->
            <id>docker</id>
            <modules>
                <module>docker</module>
            </modules>
        </profile>
        <profile>
            <!-- define module in a profile so that we can disable it during a release -->
            <id>examples</id>
            <activation>
                <!-- see https://stackoverflow.com/a/7481347 -->
                <property>
                    <name>!addlib.release</name>
                </property>
            </activation>
            <modules>
                <module>examples</module>
            </modules>
        </profile>
        <profile>
            <!-- define module in a profile so that we can disable it during a release -->
            <id>profiling</id>
            <modules>
                <module>profiling</module>
            </modules>
        </profile>
    </profiles>
</project>
