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

    XML Format Maven Plugin (https://github.com/acegi/xml-format-maven-plugin)

    Copyright 2011-2025 Acegi Technology Pty Limited.

    Licensed 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

         https://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.

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

    <parent>
        <groupId>com.github.hazendaz</groupId>
        <artifactId>base-parent</artifactId>
        <version>51</version>
        <relativePath />
    </parent>

    <groupId>au.com.acegi</groupId>
    <artifactId>xml-format-maven-plugin</artifactId>
    <version>4.1.0</version>
    <packaging>maven-plugin</packaging>

    <name>XML Format Maven Plugin</name>
    <description>Automatically formats XML files in a project.</description>
    <inceptionYear>2011</inceptionYear>

    <prerequisites>
        <maven>3.6.3</maven>
    </prerequisites>

    <scm>
        <connection>scm:git:ssh://github.com/acegi/xml-format-maven-plugin.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/acegi/xml-format-maven-plugin.git</developerConnection>
        <tag>xml-format-maven-plugin-4.1.0</tag>
        <url>https://github.com/acegi/xml-format-maven-plugin</url>
    </scm>
    <issueManagement>
        <system>Github</system>
        <url>https://github.com/acegi/xml-format-maven-plugin/issues</url>
    </issueManagement>
    <ciManagement>
        <system>Github</system>
        <url>https://github.com/acegi/xml-format-maven-plugin/actions</url>
    </ciManagement>
    <distributionManagement>
        <site>
            <id>gh-pages-scm</id>
            <name>GitHub Pages</name>
            <url>scm:git:ssh://git@github.com/acegi/xml-format-maven-plugin.git</url>
        </site>
    </distributionManagement>

    <properties>
        <!-- Java Runtime Requirements -->
        <java.version>8</java.version>
        <java.release.version>8</java.release.version>
        <javadoc.java.release.version>8</javadoc.java.release.version>

        <!-- Plugins -->
        <maven-plugin.version>3.15.1</maven-plugin.version>

        <!-- Libraries -->
        <byte-buddy.version>1.17.2</byte-buddy.version>
        <dom4j.version>2.1.4</dom4j.version>
        <hamcrest.version>3.0</hamcrest.version>
        <junit.version>5.12.1</junit.version>
        <lang.version>3.17.0</lang.version>
        <maven.version>3.9.9</maven.version>
        <mockito.version>5.16.0</mockito.version>
        <plexus-utils.version>4.0.2</plexus-utils.version>
        <spotbugs.version note="maintain java 8 compatibiilty">4.8.6</spotbugs.version>

        <!-- Keep formatters generaly off, use only selectively to cleanup formatting of source files -->
        <formatter.skip>true</formatter.skip>
        <rewrite.skip>true</rewrite.skip>
        <spotbugs.skip>true</spotbugs.skip>
        <spotless.skip>true</spotless.skip>
        <whitespace.skip>true</whitespace.skip>
        <xml-format.skip>true</xml-format.skip>

        <!-- Skip modernizer until we upgrade to supported jdk -->
        <modernizer.skip>true</modernizer.skip>

        <!-- Surefire Setup -->
        <argLine>-javaagent:${settings.localRepository}/net/bytebuddy/byte-buddy-agent/${byte-buddy.version}/byte-buddy-agent-${byte-buddy.version}.jar</argLine>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>${lang.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-artifact</artifactId>
            <version>${maven.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <version>${maven.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>${maven.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>${maven-plugin.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-utils</artifactId>
            <version>${plexus-utils.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.dom4j</groupId>
            <artifactId>dom4j</artifactId>
            <version>${dom4j.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest</artifactId>
            <version>${hamcrest.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.bytebuddy</groupId>
            <artifactId>byte-buddy</artifactId>
            <version>${byte-buddy.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.bytebuddy</groupId>
            <artifactId>byte-buddy-agent</artifactId>
            <version>${byte-buddy.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>${maven-plugin.version}</version>
                <executions>
                    <execution>
                        <id>default-descriptor</id>
                        <goals>
                            <goal>descriptor</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>help-goal</id>
                        <goals>
                            <goal>helpmojo</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <configuration>
                    <licenseSets>
                        <licenseSet>
                            <header>LICENSE_HEADER</header>
                            <excludes combine.children="append">
                                <exclude>.fbExcludeFilterFile</exclude>
                                <exclude>**/test*.xml</exclude>
                                <exclude>**/invalid.xml</exclude>
                            </excludes>
                        </licenseSet>
                    </licenseSets>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-report-plugin</artifactId>
                <version>${maven-plugin.version}</version>
            </plugin>
        </plugins>
    </reporting>

    <!-- TODO: JWL Retain profile until we relocate the plugin later so it still uses acegi release process. -->
    <profiles>
        <profile>
            <id>ossrh-deploy</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.13</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <phase>verify</phase>
                                <configuration>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
