<?xml version="1.0"?>
<project 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" xmlns="http://maven.apache.org/POM/4.0.0">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.openstreetmap.josm</groupId>
    <artifactId>josm-parent</artifactId>
    <version>1.5-SNAPSHOT</version>
    <packaging>pom</packaging>
    <properties>
        <project.build.sourceEncoding>US-ASCII</project.build.sourceEncoding>
        <project.reporting.outputEncoding>US-ASCII</project.reporting.outputEncoding>
        <java.lang.version>11</java.lang.version>
        <maven.compiler.release>${java.lang.version}</maven.compiler.release>
        <maven.compiler.source>${java.lang.version}</maven.compiler.source>
        <maven.compiler.target>${java.lang.version}</maven.compiler.target>
        <test.headless>true</test.headless>
        <sonar.host.url>https://josm.openstreetmap.de/sonar/</sonar.host.url>
        <sonar.projectKey>JOSM</sonar.projectKey>
        <jmockit.version>1.49.a</jmockit.version>
        <pmd.version>7.22.0</pmd.version>
        <jacoco.version>0.8.13</jacoco.version>
        <checkstyle.version>10.26.1</checkstyle.version>
        <spotbugs.version>4.9.8</spotbugs.version>
        <!-- Note: 2.0.0 requires Java 17, and we'll need to upgrade to it for Java 25 LTS (see JEP 486)-->
        <junit5-system-exit.version>1.1.2</junit5-system-exit.version>
        <equalsverifier.version>3.19.4</equalsverifier.version>
    </properties>
    <modules>
        <module>..</module>
        <!-- The test pom is mostly for plugins; JOSM core dev doesn't need it -->
        <module>../test/pom.xml</module>
    </modules>
    <repositories>
        <repository>
            <id>JOSM</id>
            <url>https://josm.openstreetmap.de/repository/public/</url>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>JOSM</id>
            <url>https://josm.openstreetmap.de/repository/public/</url>
        </pluginRepository>
    </pluginRepositories>
    <distributionManagement>
        <snapshotRepository>
            <id>josm-snapshots</id>
            <name>JOSM snapshots</name>
            <url>https://josm.openstreetmap.de/repository/snapshots</url>
        </snapshotRepository>
    </distributionManagement>
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>javacc-maven-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>3.4.0</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>3.5.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.3.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-pmd-plugin</artifactId>
                    <version>3.25.0</version>
                    <dependencies>
                        <dependency>
                            <groupId>net.sourceforge.pmd</groupId>
                            <artifactId>pmd-core</artifactId>
                            <version>${pmd.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>net.sourceforge.pmd</groupId>
                            <artifactId>pmd-java</artifactId>
                            <version>${pmd.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>net.sourceforge.pmd</groupId>
                            <artifactId>pmd-javascript</artifactId>
                            <version>${pmd.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>net.sourceforge.pmd</groupId>
                            <artifactId>pmd-jsp</artifactId>
                            <version>${pmd.version}</version>
                        </dependency>
                    </dependencies>
                    <configuration>
                      <targetJdk>${java.lang.version}</targetJdk>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.5.1</version>
                </plugin>
                <plugin>
                    <groupId>com.github.spotbugs</groupId>
                    <artifactId>spotbugs-maven-plugin</artifactId>
                    <version>4.8.6.5</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>3.5.0</version>
                    <dependencies>
                      <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>${checkstyle.version}</version>
                      </dependency>
                    </dependencies>
                </plugin>
                <!-- Used to merge compile dependencies into jars -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>3.6.0</version>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <goals>
                                <goal>shade</goal>
                            </goals>
                            <configuration>
                                <filters>
                                    <filter>
                                        <artifact>*:*</artifact>
                                        <excludes>
                                            <!--<exclude>META-INF/*</exclude>-->
                                            <!--<exclude>*</exclude>-->
                                            <exclude>META-INF/versions/*</exclude>
                                            <exclude>META-INF/maven/**</exclude>
                                            <exclude>META-INF/*.SF</exclude>
                                            <exclude>META-INF/*.DSA</exclude>
                                            <exclude>META-INF/*.RSA</exclude>
                                        </excludes>
                                    </filter>
                                </filters>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.4.2</version>
                    <configuration>
                        <archive>
                            <addMavenDescriptor>false</addMavenDescriptor>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.sonarsource.scanner.maven</groupId>
                    <artifactId>sonar-maven-plugin</artifactId>
                    <version>3.7.0.1746</version>
                </plugin>
                <!-- Used to set version information -->
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>buildnumber-maven-plugin</artifactId>
                    <version>3.2.1</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.5.0</version>
                <executions>
                    <execution>
                        <id>enforce-versions</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>3.6.3</version>
                                </requireMavenVersion>
                                <requireJavaVersion>
                                    <version>${java.lang.version}</version>
                                </requireJavaVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.3.1</version>
                <executions>
                    <execution>
                        <id>copy-root-resources</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.basedir}/target/classes</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>${project.basedir}</directory>
                                    <includes>
                                        <include>GPL-v2.0.txt</include>
                                        <include>GPL-v3.0.txt</include>
                                        <include>LICENSE</include>
                                        <include>LICENSE.md</include>
                                        <include>README</include>
                                        <include>README.md</include>
                                    </includes>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin> <!-- Adds properties that point at dependency jars. Useful for jmockit and junit5-system-exit -->
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>properties</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.jmockit</groupId>
                <artifactId>jmockit</artifactId>
                <version>${jmockit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>5.14.2</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.openstreetmap.jmapviewer</groupId>
                <artifactId>jmapviewer</artifactId>
                <version>2.25</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>jakarta.json</groupId>
                <artifactId>jakarta.json-api</artifactId>
                <version>2.1.3</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.eclipse.parsson</groupId>
                <artifactId>parsson</artifactId>
                <version>1.1.7</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-jcs3-core</artifactId>
                <version>3.2.1</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-compress</artifactId>
                <version>1.28.0</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>jakarta.annotation</groupId>
                <artifactId>jakarta.annotation-api</artifactId>
                <version>3.0.0</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.tukaani</groupId>
                <artifactId>xz</artifactId>
                <version>1.11</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.adobe.xmp</groupId>
                <artifactId>xmpcore</artifactId>
                <version>6.1.11</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.drewnoakes</groupId>
                <artifactId>metadata-extractor</artifactId>
                <version>2.19.0</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.formdev</groupId>
                <artifactId>svgSalamander</artifactId>
                <version>1.1.4</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>ch.poole</groupId>
                <artifactId>OpeningHoursParser</artifactId>
                <version>0.29.0</version>
                <scope>provided</scope>
            </dependency>
            <!-- Don't forget to update org.openstreetmap.josm.tools.Tag2Link#PREF_SOURCE -->
            <dependency>
                <groupId>org.webjars.npm</groupId>
                <artifactId>tag2link</artifactId>
                <version>2026.6.26</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.jacoco</groupId>
                <artifactId>org.jacoco.ant</artifactId>
                <version>${jacoco.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-annotations</artifactId>
                <version>${spotbugs.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.ginsberg</groupId>
                <artifactId>junit5-system-exit</artifactId>
                <version>${junit5-system-exit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.wiremock</groupId>
                <artifactId>wiremock</artifactId>
                <version>3.13.2</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>io.github.classgraph</groupId>
                <artifactId>classgraph</artifactId>
                <version>4.8.184</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>net.trajano.commons</groupId>
                <artifactId>commons-testing</artifactId>
                <version>2.1.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>nl.jqno.equalsverifier</groupId>
                <artifactId>equalsverifier</artifactId>
                <version>${equalsverifier.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>3.18.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.awaitility</groupId>
                <artifactId>awaitility</artifactId>
                <version>4.3.0</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <profiles>
        <profile>
            <id>java-17</id>
            <activation>
                <jdk>[17</jdk>
            </activation>
            <properties>
                <junit5-system-exit.version>2.0.2</junit5-system-exit.version>
                <jmockit.version>1.50</jmockit.version>
                <checkstyle.version>12.3.1</checkstyle.version>
                <equalsverifier.version>4.3.1</equalsverifier.version>
            </properties>
        </profile>
        <profile>
            <!-- should be used together with java-17 profile -->
            <id>java-21</id>
            <activation>
                <jdk>[21</jdk>
            </activation>
            <properties>
                <checkstyle.version>13.2.0</checkstyle.version>
            </properties>
        </profile>
    </profiles>
</project>
