<?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"><!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you 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.
    -->
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.apache.netbeans</groupId>
        <artifactId>netbeans-parent</artifactId>
        <version>4</version>
    </parent>

    <groupId>org.apache.netbeans.utilities</groupId>
    <artifactId>utilities-parent</artifactId>
    <version>14.3</version>
    <packaging>pom</packaging>

    <name>Apache Netbeans Maven Utilities</name>
    <description>Apache Netbeans Maven Utilities is a set of artefacts to build and populate Apache NetBeans artefacts using Apache Maven</description>
    <url>https://bits.netbeans.org/mavenutilities/nbm-maven-plugin</url>
    <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>

    <modules>
        <module>nb-shared</module>
        <module>nbm-maven-harness</module>
        <module>nb-repository-plugin</module>
        <module>nbm-maven-plugin</module>
    </modules>

    <scm>
        <connection>scm:git:https://gitbox.apache.org/repos/asf/netbeans-mavenutils-nbm-maven-plugin.git</connection>
        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/netbeans-mavenutils-nbm-maven-plugin.git</developerConnection>
        <url>https://github.com/apache/netbeans-mavenutils-nbm-maven-plugin</url>
        <tag>utilities-parent-14.3</tag>
    </scm>
    <issueManagement>
        <system>github</system>
        <url>https://github.com/apache/netbeans-mavenutils-nbm-maven-plugin/issues</url>
    </issueManagement>
    <distributionManagement>
        <site>
            <id>netbeans.bits</id>
            <url>https://bits.netbeans.org/mavenutilities/nbm-maven-plugin/</url>
        </site>
    </distributionManagement>

    <properties>
        <!--  <mojo.java.target>1.6</mojo.java.target> -->
        <maven.version>3.9.9</maven.version>
        <maven.minimum.version>3.6.3</maven.minimum.version>
        <maven.plugin.version>3.15.1</maven.plugin.version>
        <invoker.plugin.version>3.9.0</invoker.plugin.version>
        <skin.groupId>org.apache.maven.skins</skin.groupId>
        <skin.artifactId>maven-fluido-skin</skin.artifactId>
        <skin.version>2.0.0</skin.version>
        <!-- version of Apache NetBeans for harness build -->
        <netbeans.version>RELEASE250</netbeans.version>
        <javax.inject.version>1</javax.inject.version>
        <jdkbaseline>11</jdkbaseline>
        <mockito.version>5.17.0</mockito.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.13.2</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.ant</groupId>
                <artifactId>ant</artifactId>
                <version>1.10.15</version>
            </dependency>
            <dependency>
                <groupId>org.apache.maven.plugin-tools</groupId>
                <artifactId>maven-plugin-annotations</artifactId>
                <version>${maven.plugin.version}</version>
            </dependency>
            <dependency>
                <groupId>org.codehaus.plexus</groupId>
                <artifactId>plexus-utils</artifactId>
                <version>4.0.2</version>
            </dependency>
            <dependency>
                <groupId>org.codehaus.plexus</groupId>
                <artifactId>plexus-xml</artifactId>
                <version>4.0.0</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.8.13</version>
                </plugin>
                <plugin>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>3.4.1</version>
                </plugin>
                <plugin>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>3.1.4</version>
                </plugin>
                <plugin>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.4.2</version>
                </plugin>
                <plugin>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.8.1</version>
                </plugin>
                <plugin>
                    <artifactId>maven-invoker-plugin</artifactId>
                    <version>${invoker.plugin.version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
                <plugin>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>3.5.0</version>
                    <executions>
                        <execution>
                            <id>enforce-maven</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <rules>
                                    <requireMavenVersion>
                                        <version>${maven.minimum.version}</version>
                                    </requireMavenVersion>
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.5.3</version>
                </plugin>
                <plugin>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.21.0</version>
                    <!-- version sensitive to maven-fluido-skin version -->
                    <configuration>
                        <!-- hard coded work here,  ${project.distributionManagement.site.url} move everything
                        to staging root removing the "parent " -->
                        <topSiteURL>https://bits.netbeans.org/mavenutilities/nbm-maven-plugin/</topSiteURL>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>animal-sniffer-maven-plugin</artifactId>
                    <version>1.24</version>
                </plugin>
                <plugin>
                    <artifactId>maven-changes-plugin</artifactId>
                    <version>2.12.1</version>
                    <configuration>
                        <skip>true</skip>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>3.6.0</version>
                    <configuration>
                        <configLocation>google_checks.xml</configLocation>
                        <headerLocation>config/maven-header.txt</headerLocation>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.maven.shared</groupId>
                            <artifactId>maven-shared-resources</artifactId>
                            <version>6</version>
                        </dependency>
                        <dependency>
                            <groupId>com.puppycrawl.tools</groupId>
                            <artifactId>checkstyle</artifactId>
                            <!-- last jdk 8 compatible version -->
                            <version>10.0</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <artifactId>maven-jxr-plugin</artifactId>
                    <version>3.6.0</version>
                </plugin>
                <plugin>
                    <artifactId>maven-pmd-plugin</artifactId>
                    <version>3.26.0</version>
                    <configuration>
                        <targetJdk>1.8</targetJdk>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.rat</groupId>
                    <artifactId>apache-rat-plugin</artifactId>
                    <version>0.16.1</version>
                </plugin>
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.14.0</version>
                    <configuration>
                        <release>${jdkbaseline}</release>
                        <proc>none</proc>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.11.2</version>
                </plugin>
                <plugin>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>3.9.0</version>
                </plugin>
                <plugin>
                    <artifactId>maven-plugin-plugin</artifactId>
                    <version>${maven.plugin.version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>3.6.0</version>
                </plugin>
                <plugin>
                    <artifactId>maven-plugin-report-plugin</artifactId>
                    <version>${maven.plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>taglist-maven-plugin</artifactId>
                    <version>3.2.1</version>
                    <configuration>
                        <tagListOptions>
                            <tagClasses>
                                <tagClass>
                                    <displayName>Todo Work</displayName>
                                    <tags>
                                        <tag>
                                            <matchString>todo</matchString>
                                            <matchType>ignoreCase</matchType>
                                        </tag>
                                        <tag>
                                            <matchString>FIXME</matchString>
                                            <matchType>exact</matchType>
                                        </tag>
                                    </tags>
                                </tagClass>
                            </tagClasses>
                        </tagListOptions>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>report</id>
                        <goals>
                            <goal>report-aggregate</goal>
                        </goals>
                        <phase>verify</phase>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>index</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <artifactId>maven-changes-plugin</artifactId>
                <configuration>
                    <!-- <onlyCurrentVersion>true</onlyCurrentVersion>-->
                    <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
                </configuration>
                <reportSets>
                    <reportSet>
                        <!--<reports>
                            <report>github-report</report>
                        </reports>-->
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>
    <profiles>
        <profile>
            <id>coverage</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>prepare-agent</id>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>report</id>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <!-- select the artefact version according to supported jdk --> 
        <profile>
            <id>downgrade-release-for-jdk8-it</id>
            <activation>
                <jdk>(,11]</jdk>
            </activation>
            <properties>
                <netbeans.version.it>RELEASE126</netbeans.version.it>
            </properties>
        </profile>
        <profile>
            <id>downgrade-release-for-jdk11-it</id>
            <activation>
                <jdk>(11,17]</jdk>
            </activation>
            <properties>
                <netbeans.version.it>RELEASE210</netbeans.version.it>
            </properties>
        </profile>
        <profile>
            <id>it-for-current-jdk</id>
            <activation>
                <jdk>(17,)</jdk>
            </activation>
            <properties>
                <netbeans.version.it>${netbeans.version}</netbeans.version.it>
            </properties>
        </profile>
    </profiles>
</project>
