<?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>
  <artifactId>josm</artifactId>
  <parent>
    <groupId>org.openstreetmap.josm</groupId>
    <artifactId>josm-parent</artifactId>
    <version>1.5-SNAPSHOT</version>
    <relativePath>./nodist/pom.xml</relativePath>
  </parent>

  <name>josm</name>
  <url>https://josm.openstreetmap.de</url>
  <properties>
    <src.dir>${project.basedir}/src</src.dir>
    <test.dir>${project.basedir}/test</test.dir>
    <scripts.src.dir>${project.basedir}/scripts</scripts.src.dir>
    <build.dir>${project.basedir}/build</build.dir>
    <dist.dir>${project.basedir}/dist</dist.dir>
    <checkstyle-build.dir>${project.basedir}/build2</checkstyle-build.dir>
    <checkstyle.dir>${tools.dir}/checkstyle</checkstyle.dir>
    <mapcss.dir>${src.dir}/org/openstreetmap/josm/gui/mappaint/mapcss</mapcss.dir>
    <modules.dir>${dist.dir}/modules</modules.dir>
    <pmd.dir>${tools.dir}/pmd</pmd.dir>
    <proj-build.dir>${project.basedir}/build2</proj-build.dir>
    <resources.dir>${project.basedir}/resources</resources.dir>
    <script-build.dir>${project.basedir}/build2</script-build.dir>
    <spotbugs.dir>${tools.dir}/spotbugs</spotbugs.dir>
    <tools.dir>${project.basedir}/tools</tools.dir>
    <epsg.output>${resources.dir}/data/projection/custom-epsg</epsg.output>
    <javacc.home>${tools.dir}</javacc.home>
    <dist.jar>${dist.dir}/josm-custom.jar</dist.jar>
    <dist-optimized.jar>${dist.dir}/josm-custom-optimized.jar</dist-optimized.jar>
    <dist-sources.jar>${dist.dir}/josm-custom-sources.jar</dist-sources.jar>
    <jacoco.includes>org.openstreetmap.josm.*</jacoco.includes>
    <jacoco.inclbootstrapclasses>false</jacoco.inclbootstrapclasses>
    <jacoco.inclnolocationclasses>false</jacoco.inclnolocationclasses>
    <junit.printsummary>on</junit.printsummary>
    <default-junit-includes>**/*Test.class</default-junit-includes>
    <default-junitIT-includes>**/*TestIT.class</default-junitIT-includes>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <!-- Needed just in case something adds argLine for tests before we set it -->
    <argLine/>
  </properties>
  <packaging>jar</packaging>
  <inceptionYear>2005</inceptionYear>
  <licenses>
    <license>
      <name>GPL-2.0-or-later</name>
      <url>https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <organization>
    <name>JOSM</name>
    <url>https://josm.openstreetmap.de</url>
  </organization>
  <scm>
    <connection>scm:svn:https://josm.openstreetmap.de/svn/trunk</connection>
    <url>https://josm.openstreetmap.de/browser/josm/trunk</url>
  </scm>
  <issueManagement>
    <system>Trac</system>
    <url>https://josm.openstreetmap.de</url>
  </issueManagement>
  <mailingLists>
    <mailingList>
      <name>josm-dev</name>
      <archive>https://lists.openstreetmap.org/pipermail/josm-dev/</archive>
      <post>josm-dev@openstreetmap.org</post>
    </mailingList>
  </mailingLists>

  <dependencies>
    <dependency>
      <groupId>org.jmockit</groupId>
      <artifactId>jmockit</artifactId>
    </dependency>
    <dependency>
      <groupId>org.openstreetmap.jmapviewer</groupId>
      <artifactId>jmapviewer</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>jakarta.json</groupId>
      <artifactId>jakarta.json-api</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.parsson</groupId>
      <artifactId>parsson</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-jcs3-core</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-compress</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>jakarta.annotation</groupId>
      <artifactId>jakarta.annotation-api</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.tukaani</groupId>
      <artifactId>xz</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.adobe.xmp</groupId>
      <artifactId>xmpcore</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.drewnoakes</groupId>
      <artifactId>metadata-extractor</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.github.weisj</groupId>
      <artifactId>jsvg</artifactId>
      <version>2.1.0</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.jetbrains</groupId>
      <artifactId>annotations</artifactId>
      <version>24.1.0</version>
      <scope>provided</scope> 
    </dependency>
    <dependency>
      <groupId>ch.poole</groupId>
      <artifactId>OpeningHoursParser</artifactId>
      <scope>compile</scope>
    </dependency>
    <!-- Don't forget to update org.openstreetmap.josm.tools.Tag2Link#PREF_SOURCE -->
    <dependency>
      <groupId>org.webjars.npm</groupId>
      <artifactId>tag2link</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.jacoco</groupId>
      <artifactId>org.jacoco.ant</artifactId>
    </dependency>
    <dependency>
      <groupId>com.github.spotbugs</groupId>
      <artifactId>spotbugs-annotations</artifactId>
    </dependency>
    <dependency>
      <groupId>com.ginsberg</groupId>
      <artifactId>junit5-system-exit</artifactId>
    </dependency>
    <dependency>
      <groupId>org.wiremock</groupId>
      <artifactId>wiremock</artifactId>
    </dependency>
    <dependency>
      <groupId>io.github.classgraph</groupId>
      <artifactId>classgraph</artifactId>
    </dependency>
    <dependency>
      <groupId>org.junit.platform</groupId>
      <artifactId>junit-platform-launcher</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.platform</groupId>
      <artifactId>junit-platform-suite</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.vintage</groupId>
      <artifactId>junit-vintage-engine</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-params</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-migrationsupport</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>net.trajano.commons</groupId>
      <artifactId>commons-testing</artifactId>
    </dependency>
    <dependency>
      <groupId>nl.jqno.equalsverifier</groupId>
      <artifactId>equalsverifier</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.awaitility</groupId>
      <artifactId>awaitility</artifactId>
    </dependency>
  </dependencies>
  <build>
    <sourceDirectory>${src.dir}</sourceDirectory>
    <testSourceDirectory>${test.dir}/unit</testSourceDirectory>
    <scriptSourceDirectory>${scripts.src.dir}</scriptSourceDirectory>
    <resources>
      <resource>
        <directory>${resources.dir}</directory>
      </resource>
      <resource>
        <directory>${project.basedir}</directory>
        <includes>
          <include>CONTRIBUTION</include>
          <include>gpl-2.0.txt</include>
          <include>gpl-3.0.txt</include>
          <include>LICENSE</include>
          <include>README</include>
          <include>REVISION</include>
        </includes>
      </resource>
    </resources>
    <testResources>
      <testResource>
        <directory>${test.dir}/data</directory>
      </testResource>
    </testResources>
    <pluginManagement>
      <plugins>
        <!-- Prevent m2e from also running checkstyle:check during its own
             incremental/full IDE builds. Without this, m2e's background build
             and a manually launched "mvn test" can write checkstyle-josm.xml
             concurrently, corrupting it. -->
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <versionRange>[0,)</versionRange>
                    <goals>
                      <goal>check</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore/>
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <!-- Generate sources -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>javacc-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>javacc</id>
            <goals>
              <goal>javacc</goal>
            </goals>
            <configuration>
              <debugParser>false</debugParser>
              <debugTokenManager>false</debugTokenManager>
              <jdkVersion>${java.lang.version}</jdkVersion>
              <grammarEncoding>UTF-8</grammarEncoding>
              <unicodeInput>true</unicodeInput>
              <sourceDirectory>${src.dir}</sourceDirectory>
              <outputDirectory>${src.dir}</outputDirectory>
              <includes><include>**/MapCSSParser.jj</include></includes>
              <excludes><exclude>**/*.java</exclude></excludes>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <!-- Update proj, epsg, etc. -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <executions>
          <!-- mvn test-compile && mvn exec:java@update-proj-reference-files -->
          <execution>
            <id>update-proj-reference-files</id>
            <configuration>
              <classpathScope>test</classpathScope>
              <mainClass>org.openstreetmap.josm.data.projection.ProjectionRefTest</mainClass>
            </configuration>
            <goals>
              <goal>java</goal>
            </goals>
          </execution>
          <!-- mvn test-compile && mvn exec:java@update-proj-regression-files -->
          <execution>
            <id>update-proj-regression-files</id>
            <configuration>
              <classpathScope>test</classpathScope>
              <mainClass>org.openstreetmap.josm.data.projection.ProjectionRegressionTest</mainClass>
            </configuration>
            <goals>
              <goal>java</goal>
            </goals>
          </execution>
          <!-- mvn compile && mvn exec:java@SyncEditorLayerIndex -->
          <execution>
            <id>SyncEditorLayerIndex</id>
            <configuration>
              <executable>java</executable>
              <arguments>
                <argument>-Djava.awt.headless=true</argument>
                <argument>-classpath</argument>
                <classpath/> <!-- Generates the actual classpath using all project dependencies -->
                <argument>${scripts.src.dir}/SyncEditorLayerIndex.java</argument>
                <argument>${basedir}</argument>
              </arguments>
            </configuration>
            <goals>
              <goal>exec</goal>
            </goals>
          </execution>
          <!-- Note that the epsg-touch/epsg executions are NOT duplicates - the first epsg makes an empty file for the
               next run, which makes a non-empty custom-epsg file -->
          <execution>
            <id>epsg-touch</id>
            <configuration>
              <executable>java</executable>
              <arguments>
                <argument>-Djava.awt.headless=true</argument>
                <argument>-classpath</argument>
                <classpath/> <!-- Generates the actual classpath using all project dependencies -->
                <argument>${basedir}/scripts/BuildProjectionDefinitions.java</argument>
                <argument>${basedir}</argument>
              </arguments>
            </configuration>
            <phase>process-classes</phase>
            <goals>
              <goal>exec</goal>
            </goals>
          </execution>
          <execution>
            <id>epsg</id>
            <configuration>
              <executable>java</executable>
              <arguments>
                <argument>-Djava.awt.headless=true</argument>
                <argument>-classpath</argument>
                <classpath/> <!-- Generates the actual classpath using all project dependencies -->
                <argument>${basedir}/scripts/BuildProjectionDefinitions.java</argument>
                <argument>${basedir}</argument>
              </arguments>
            </configuration>
            <phase>generate-test-resources</phase>
            <goals>
              <goal>exec</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <!-- This *must* be after the exec-maven-plugin since the epsg execution must occur first -->
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <!-- Note that the copy-resources-{epsg-touch,epsg} executions are NOT duplicates - the first epsg makes an
               empty file for the next run, which makes a non-empty custom-epsg file -->
          <execution>
            <id>copy-resources-epsg-touch</id>
            <phase>process-classes</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.outputDirectory}/data/projection</outputDirectory>
              <resources>
                <resource>
                  <directory>${resources.dir}/data/projection/</directory>
                  <includes>
                    <include>custom-epsg</include>
                  </includes>
                </resource>
              </resources>
            </configuration>
          </execution>
          <execution>
            <id>copy-resources-epsg</id>
            <phase>generate-test-resources</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.outputDirectory}/data/projection</outputDirectory>
              <resources>
                <resource>
                  <directory>${resources.dir}/data/projection/</directory>
                  <includes>
                    <include>custom-epsg</include>
                  </includes>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <!-- Configure checkstyle/pmd/other lint plugins -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <configuration>
          <analysisCache>true</analysisCache>
          <analysisCacheLocation>${pmd.dir}/cache</analysisCacheLocation>
          <language>java</language>
          <targetJdk>${java.lang.version}</targetJdk>
          <rulesets>
            <ruleset>${pmd.dir}/josm-ruleset.xml</ruleset>
          </rulesets>
          <includes>
            <include>**/*.java</include>
          </includes>
          <excludes>
            <exclude>org/openstreetmap/josm/gui/mappaint/mapcss/parsergen/*.java</exclude>
          </excludes>
          <printFailingErrors>true</printFailingErrors>
          <targetDirectory>${project.basedir}</targetDirectory>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
        <configuration>
          <xmlOutput>true</xmlOutput>
          <spotbugsXmlOutputFilename>spotbugs-josm.xml</spotbugsXmlOutputFilename>
          <effort>max</effort>
          <excludeFilterFile>${spotbugs.dir}/josm-filter.xml</excludeFilterFile>
          <onlyAnalyze>org.openstreetmap.josm.-</onlyAnalyze>
          <threshold>LOW</threshold>
        </configuration>
        <!-- This is commented out until all the current bugs are fixed. TODO uncomment!
        <executions>
          <execution>
            <id>validate</id>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        -->
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <configuration>
          <configLocation>${checkstyle.dir}/josm_checks.xml</configLocation>
          <includeTestSourceDirectory>true</includeTestSourceDirectory>
          <outputFile>${project.basedir}/checkstyle-josm.xml</outputFile>
          <!-- checkstyle cannot parse module-info.java yet -->
          <excludes>module-info.java,org/openstreetmap/josm/gui/mappaint/mapcss/parsergen/*.java</excludes>
        </configuration>
        <executions>
          <execution>
            <id>validate</id>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <!-- Configure the test plugin, specifically enable autodetection of global extensions -->
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>**/*TestIT</exclude>
          </excludes>
          <skipAfterFailureCount>1</skipAfterFailureCount>
          <useModulePath>false</useModulePath> <!-- testing with modules seems to be problematic right now -->
          <!-- We might need @{argLine} in the future if another plugin has issues -->
          <argLine>
            @{argLine}
            <!-- Must be a real -D flag: as a configurationParameters entry it is set too late,
                 after java-agents below already cached the JDK's default locale provider list. -->
            -Djava.locale.providers=SPI,CLDR
            -javaagent:${org.jmockit:jmockit:jar}
            --add-opens java.base/java.io=ALL-UNNAMED
            --add-opens java.base/java.lang=ALL-UNNAMED
            --add-opens java.base/java.nio=ALL-UNNAMED
            --add-opens java.base/java.text=ALL-UNNAMED
            --add-opens java.base/java.util=ALL-UNNAMED
            --add-opens java.base/jdk.internal.loader=ALL-UNNAMED
            --add-opens java.desktop/java.awt=ALL-UNNAMED
            --add-opens java.prefs/java.util.prefs=ALL-UNNAMED
          </argLine>
          <properties>
            <configurationParameters>
              file.encoding = UTF-8
              junit.jupiter.extensions.autodetection.enabled = true
              junit.jupiter.execution.parallel.enabled = true
            </configurationParameters>
          </properties>
          <systemPropertyVariables>
            <josm.home>${test.dir}/config/josm.home</josm.home>
            <josm.test.data>${test.dir}/data</josm.test.data>
            <java.awt.headless>${test.headless}</java.awt.headless>
            <glass.platform>Monocle</glass.platform>
            <monocle.platform>Headless</monocle.platform>
            <prism.order>sw</prism.order>
          </systemPropertyVariables>
        </configuration>
        <executions>
          <execution>
            <id>default-tests</id>
            <phase>test</phase>
            <goals>
              <goal>test</goal>
            </goals>
          </execution>
          <execution>
            <id>integration-tests</id>
            <phase>integration-test</phase>
            <goals>
              <goal>test</goal>
            </goals>
            <configuration>
              <includes>**/*TestIT</includes>
            </configuration>
          </execution>
          <execution>
            <id>functional-tests</id>
            <phase>integration-test</phase>
            <goals>
              <goal>test</goal>
            </goals>
            <configuration>
              <testSourceDirectory>${test.dir}/functional</testSourceDirectory>
            </configuration>
          </execution>
          <execution>
            <id>performance-tests</id>
            <phase>integration-test</phase>
            <goals>
              <goal>test</goal>
            </goals>
            <configuration>
              <testSourceDirectory>${test.dir}/performance</testSourceDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <!-- the clean plugin is needed since we currently store generated sources in the source directory -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-clean-plugin</artifactId>
        <configuration>
          <filesets>
            <fileset>
              <directory>${proj-build.dir}</directory>
            </fileset>
            <fileset>
              <directory>${build.dir}</directory>
            </fileset>
            <fileset>
              <directory>${script-build.dir}</directory>
            </fileset>
            <fileset>
              <directory>${checkstyle-build.dir}</directory>
            </fileset>
            <fileset>
              <directory>${dist.dir}</directory>
            </fileset>
            <fileset>
              <directory>${mapcss.dir}/parsergen</directory>
            </fileset>
            <fileset>
              <directory>${src.dir}/org/w3/_2001/xmlschema</directory>
              <includes>
                <include>Adapter1.java</include>
              </includes>
            </fileset>
            <fileset>
              <directory>${src.dir}/org/openstreetmap/josm/data/imagery/types</directory>
            </fileset>
            <!-- ${epsg.output} -->
            <fileset>
              <directory>${resources.dir}/data/projection/</directory>
              <includes>
                <include>custom-epsg</include>
              </includes>
            </fileset>
            <fileset>
              <directory>${pmd.dir}</directory>
              <includes>
                <include>cache</include>
              </includes>
            </fileset>
          </filesets>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>buildnumber-maven-plugin</artifactId>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>create</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <doCheck>false</doCheck>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <minimizeJar>true</minimizeJar>
              <filters>
                <filter>
                  <artifact>org.webjars.npm:tag2link</artifact>
                  <excludes>
                    <exclude>META-INF/resources/webjars/tag2link/*/LICENSE</exclude>
                    <exclude>META-INF/resources/webjars/tag2link/*/README.md</exclude>
                    <exclude>META-INF/resources/webjars/tag2link/*/build.js</exclude>
                    <exclude>META-INF/resources/webjars/tag2link/*/package.json</exclude>
                    <exclude>META-INF/resources/webjars/tag2link/*/schema.json</exclude>
                    <exclude>META-INF/resources/webjars/tag2link/*/tag2link.sophox.sparql</exclude>
                    <exclude>META-INF/resources/webjars/tag2link/*/tag2link.wikidata.sparql</exclude>
                  </excludes>
                </filter>
                <filter>
                  <artifact>org.openstreetmap.jmapviewer:jmapviewer</artifact>
                  <excludes>
                    <exclude>org/openstreetmap/gui/jmapviewer/Demo*</exclude>
                  </excludes>
                </filter>
                <filter>
                  <artifact>com.drewnoakes:metadata-extractor</artifact>
                  <excludes>
                    <exclude>com/drew/imaging/FileTypeDetector*</exclude>
                    <exclude>com/drew/imaging/ImageMetadataReader*</exclude>
                    <exclude>com/drew/imaging/avi/**</exclude>
                    <exclude>com/drew/imaging/bmp/**</exclude>
                    <exclude>com/drew/imaging/eps/**</exclude>
                    <exclude>com/drew/imaging/gif/**</exclude>
                    <exclude>com/drew/imaging/heif/**</exclude>
                    <exclude>com/drew/imaging/ico/**</exclude>
                    <exclude>com/drew/imaging/mp3/**</exclude>
                    <exclude>com/drew/imaging/mp4/**</exclude>
                    <exclude>com/drew/imaging/pcx/**</exclude>
                    <exclude>com/drew/imaging/psd/**</exclude>
                    <exclude>com/drew/imaging/quicktime/**</exclude>
                    <exclude>com/drew/imaging/raf/**</exclude>
                    <exclude>com/drew/imaging/riff/**</exclude>
                    <exclude>com/drew/imaging/wav/**</exclude>
                    <exclude>com/drew/imaging/webp/**</exclude>
                    <exclude>com/drew/metadata/avi/**</exclude>
                    <exclude>com/drew/metadata/bmp/**</exclude>
                    <exclude>com/drew/metadata/eps/**</exclude>
                    <exclude>com/drew/metadata/gif/**</exclude>
                    <exclude>com/drew/metadata/heif/**</exclude>
                    <exclude>com/drew/metadata/ico/**</exclude>
                    <exclude>com/drew/metadata/mov/**</exclude>
                    <exclude>com/drew/metadata/mp3/**</exclude>
                    <exclude>com/drew/metadata/mp4/**</exclude>
                    <exclude>com/drew/metadata/pcx/**</exclude>
                    <exclude>com/drew/metadata/wav/**</exclude>
                    <exclude>com/drew/metadata/webp/**</exclude>
                    <exclude>com/drew/tools/**</exclude>
                  </excludes>
                </filter>
                <filter>
                  <artifact>org.apache.commons:commons-compress</artifact>
                  <excludes>
                    <exclude>org/apache/commons/compress/PasswordRequiredException*</exclude>
                    <exclude>org/apache/commons/compress/archivers/**</exclude>
                    <exclude>org/apache/commons/compress/changes/**</exclude>
                    <exclude>org/apache/commons/compress/compressors/bzip2/BZip2Utils*</exclude>
                    <exclude>org/apache/commons/compress/compressors/brotli/**</exclude>
                    <exclude>org/apache/commons/compress/compressors/CompressorStreamFactory*</exclude>
                    <exclude>org/apache/commons/compress/compressors/CompressorStreamProvider*</exclude>
                    <exclude>org/apache/commons/compress/compressors/CompressorException*</exclude>
                    <exclude>org/apache/commons/compress/compressors/FileNameUtil*</exclude>
                    <exclude>org/apache/commons/compress/compressors/deflate/**</exclude>
                    <exclude>org/apache/commons/compress/compressors/gzip/**</exclude>
                    <exclude>org/apache/commons/compress/compressors/lz4/**</exclude>
                    <exclude>org/apache/commons/compress/compressors/lzma/**</exclude>
                    <exclude>org/apache/commons/compress/compressors/lz77support/**</exclude>
                    <exclude>org/apache/commons/compress/compressors/pack200/**</exclude>
                    <exclude>org/apache/commons/compress/compressors/snappy/**</exclude>
                    <exclude>org/apache/commons/compress/compressors/xz/XZUtils*</exclude>
                    <exclude>org/apache/commons/compress/compressors/z/**</exclude>
                    <exclude>org/apache/commons/compress/compressors/zstandard/**</exclude>
                    <exclude>org/apache/commons/compress/java/util/jar/Pack200*</exclude>
                    <exclude>org/apache/commons/compress/harmony/pack200/**</exclude>
                    <exclude>org/apache/commons/compress/harmony/unpack200/**</exclude>
                    <exclude>org/apache/commons/compress/parallel/**</exclude>
                    <exclude>org/apache/commons/compress/utils/ArchiveUtils*</exclude>
                  </excludes>
                </filter>
                <filter>
                  <artifact>org.apache.commons:commons-jcs3-core</artifact>
                  <excludes>
                    <exclude>org/apache/commons/jcs3/auxiliary/disk/jdbc/**</exclude>
                    <exclude>org/apache/commons/jcs3/auxiliary/remote/http/client/**</exclude>
                    <exclude>org/apache/commons/jcs3/auxiliary/remote/http/server/RemoteHttpCacheServlet*</exclude>
                    <exclude>org/apache/commons/jcs3/auxiliary/remote/server/RemoteCacheStartupServlet*</exclude>
                    <exclude>org/apache/commons/jcs3/log/Log4j2Factory*</exclude>
                    <exclude>org/apache/commons/jcs3/log/Log4j2LogAdapter*</exclude>
                    <exclude>org/apache/commons/jcs3/utils/servlet/**</exclude>
                  </excludes>
                </filter>
              </filters>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <mainClass>org.openstreetmap.josm.gui.MainApplication</mainClass>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
            </manifest>
            <manifestEntries>
              <Main-Version>${buildNumber} SVN</Main-Version>
              <!-- The default timestamp format is milliseconds since epoch -->
              <Main-Date>${timestamp}</Main-Date>
              <Permissions>all-permissions</Permissions>
              <Codebase>josm.openstreetmap.de</Codebase>
              <Application-Name>JOSM - Java OpenStreetMap Editor</Application-Name>
              <Add-Exports>java.base/sun.security.action java.desktop/com.apple.eawt java.desktop/com.sun.imageio.spi java.desktop/com.sun.imageio.plugins.jpeg javafx.graphics/com.sun.javafx.application jdk.deploy/com.sun.deploy.config</Add-Exports>
              <Add-Opens>java.base/java.lang java.base/java.nio java.base/jdk.internal.loader java.base/jdk.internal.ref java.desktop/javax.imageio.spi java.desktop/javax.swing.text.html java.prefs/java.util.prefs</Add-Opens>
              <Multi-Release>true</Multi-Release>
              <Is-Local-Build>true</Is-Local-Build>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>java-17</id>
      <activation>
        <jdk>[17</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <!-- We might need @{argLine} in the future if another plugin has issues -->
              <argLine>
                @{argLine}
                -Djava.locale.providers=SPI,CLDR
                -javaagent:${com.ginsberg:junit5-system-exit:jar}
                -javaagent:${org.jmockit:jmockit:jar}
                --add-opens java.base/java.io=ALL-UNNAMED
                --add-opens java.base/java.lang=ALL-UNNAMED
                --add-opens java.base/java.nio=ALL-UNNAMED
                --add-opens java.base/java.text=ALL-UNNAMED
                --add-opens java.base/java.util=ALL-UNNAMED
                --add-opens java.base/jdk.internal.loader=ALL-UNNAMED
                --add-opens java.desktop/java.awt=ALL-UNNAMED
                --add-opens java.prefs/java.util.prefs=ALL-UNNAMED
              </argLine>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
