<?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 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.openjump</groupId>
    <artifactId>OpenJUMP</artifactId>
    <!-- update before every release accordingly -->
    <version>2.4.0</version>
    <scm>
        <connection>scm:git:https://github.com/openjump-gis/openjump.git</connection>
        <developerConnection>scm:git:ssh://git@github.com:openjump-gis/openjump.git</developerConnection>
        <tag>main</tag>
        <url>https://github.com/openjump-gis/openjump</url>
    </scm>
    <properties>
        <!-- setup some defaults used or overridden later -->
        <version.number>${build.datestamp}</version.number>
        <version.release>mvn build</version.release>
        <version.revision>${git.total.commit.count}[${git.commit.id.abbrev}]</version.revision>
        <version.buildDateLong>${build.datelong}</version.buildDateLong>
        <version.buildDate>${build.date}</version.buildDate>
        <version.string>${git.branch}(${git.commit.id.abbrev})</version.string>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <project.binaries>**/*.command,**/*.sh,**/*.bat,**/*.exe,**/MacOS/OpenJUMP</project.binaries>
        <batik.version>1.6-1</batik.version>
        <jts.version>1.20.0</jts.version>
        <postgresql.version>42.7.7</postgresql.version>
        <imageio-ext.version>1.4.16</imageio-ext.version>
        <junit.version>5.13.4</junit.version>
    </properties>
    <profiles>
        <!-- switching os dependent lib paths for launch4j (not needed anymore, kept for reference) -->
        <profile>
            <id>windows</id>
            <activation>
                <os>
                    <family>windows</family>
                </os>
            </activation>
            <properties>
                <launch4j.dir>launcher/launch4j-3.50-win32/launch4j</launch4j.dir>
            </properties>
        </profile>
        <profile>
            <id>unix</id>
            <activation>
                <os>
                    <family>unix</family>
                </os>
            </activation>
            <properties>
                <launch4j.dir>launcher/launch4j-3.50-linux-x64/launch4j</launch4j.dir>
            </properties>
        </profile>
        <profile>
          <id>download of extensions distro zips (for testing purposes)</id>
          <activation>
            <property>
              <name>skipDownloads</name>
              <value>!true</value>
            </property>
          </activation>
          <properties>
            <core.folder>${project.build.directory}/lib.ext.core/</core.folder>
            <plus.folder>${project.build.directory}/lib.ext.plus/</plus.folder>
            <db.folder>${plus.folder}/dbdatastore/</db.folder>
          </properties>
          <build>
            <plugins>
              <plugin>
                <groupId>io.github.download-maven-plugin</groupId>
                <artifactId>download-maven-plugin</artifactId>
                <?m2e execute onConfiguration,onIncremental?>
                <executions>
                  <!-- add executions sorted by id alphabetically for maintainability -->
                  <execution>
                    <id>CORE-install-skyprinter</id>
                    <goals>
                      <goal>wget</goal>
                    </goals>
                    <configuration>
                      <url>https://github.com/openjump-gis/skyprinter-extension/releases/download/SNAPSHOT-41a887b/skyprinter-extension-2.0.0-SNAPSHOT.zip</url>
                      <sha1>653272988759f52971ef40b7000ff37db911d14c</sha1>
                      <unpack>true</unpack>
                      <outputDirectory>${core.folder}</outputDirectory>
                    </configuration>
                  </execution>
                  <!-- example execution to download/integrate an extension for PLUS distro
                  <execution>
                    <id>PLUS-install-extension</id>
                    <goals>
                      <goal>wget</goal>
                    </goals>
                    <configuration>
                      <url>https://github.com/my.cool.extension/distro.zip</url>
                      <md5>2b1b2b606f1171b681c8f25ca847c171</md5>
                      or
                      <sha1>d837327dfec6955ed1dd0a3135ea54318fd2d0a4</sha1>
                      <unpack>true</unpack>
                      <outputDirectory>${plus.folder}</outputDirectory>
                    </configuration>
                  </execution>
                  -->
                  <!-- plus dbdatastore jdbc libs -->
                  <execution>
                    <id>PLUS-install-jdbc-mariadb</id>
                    <goals>
                      <goal>wget</goal>
                    </goals>
                    <configuration>
                      <url>https://dlm.mariadb.com/Connectors/java/connector-java-3.5.8/mariadb-java-client-3.5.8.jar</url>
                      <sha1>272078c15f3f45051aa4ff5630d563dd0969d834</sha1>
                      <unpack>false</unpack>
                      <outputDirectory>${db.folder}</outputDirectory>
                    </configuration>
                  </execution>
                  <execution>
                    <id>PLUS-install-jdbc-sqlite</id>
                    <goals>
                      <goal>wget</goal>
                    </goals>
                    <configuration>
                      <url>https://github.com/xerial/sqlite-jdbc/releases/download/3.36.0.3/sqlite-jdbc-3.36.0.3.jar</url>
                      <sha1>7fa71c4dfab806490cb909714fb41373ec552c29</sha1>
                      <unpack>false</unpack>
                      <outputDirectory>${db.folder}</outputDirectory>
                    </configuration>
                  </execution>
                  <!-- plus extensions -->
                  <execution>
                    <id>PLUS-install-aggregation_extension</id>
                    <goals>
                      <goal>wget</goal>
                    </goals>
                    <configuration>
                      <url>https://github.com/openjump-gis/aggregation-extension/releases/download/v2.0.1/aggregation-extension-2.0.1.zip</url>
                      <sha1>3c1d420aebee60df946cab468dad90d7e99837f3</sha1>
                      <unpack>true</unpack>
                      <outputDirectory>${plus.folder}</outputDirectory>
                    </configuration>
                  </execution>
                  <execution>
                    <id>PLUS-install-bsheditor</id>
                    <goals>
                      <goal>wget</goal>
                    </goals>
                    <configuration>
                      <url>https://github.com/openjump-gis/bsheditor-extension/releases/download/v2.0.1/bsheditor-extension-2.0.1.zip</url>
                      <sha1>5b06393c125ed241e32828e489ccb9a882110341</sha1>
                      <unpack>true</unpack>
                      <outputDirectory>${plus.folder}</outputDirectory>
                    </configuration>
                  </execution>
                  <execution>
                    <id>PLUS-install-cadplan-printer-extension</id>
                    <goals>
                      <goal>wget</goal>
                    </goals>
                    <configuration>
                      <url>https://github.com/openjump-gis/cadplan-printer-extension/releases/download/2.1.0/cadplan-printer-extension-2.1.0.zip</url>
                      <sha1>740323b8d76dc5ec6d75c8b25f043c73c563f8e5</sha1>
                      <unpack>true</unpack>
                      <outputDirectory>${plus.folder}</outputDirectory>
                    </configuration>
                  </execution>
                  <execution>
                    <id>PLUS-install-cadtools-extension</id>
                    <goals>
                      <goal>wget</goal>
                    </goals>
                    <configuration>
                      <url>https://github.com/openjump-gis/cadtools-extension/releases/download/v2.1.4/cadtools-extension-2.1.4.jar</url>
                      <sha1>805efb2f0c035351fd71fe3331274eb4ae145094</sha1>
                      <unpack>false</unpack>
                      <outputDirectory>${plus.folder}</outputDirectory>
                    </configuration>
                  </execution>
                  <execution>
                    <id>PLUS-install-concave_hull</id>
                    <goals>
                      <goal>wget</goal>
                    </goals>
                    <configuration>
                      <url>https://github.com/openjump-gis/concave-hull-extension/releases/download/v2.0.0/concave-hull-2.0.0.zip</url>
                      <sha1>c7b0ac56fe42233a7e86d2d1a790a06c7db3578d</sha1>
                      <unpack>true</unpack>
                      <outputDirectory>${plus.folder}</outputDirectory>
                    </configuration>
                  </execution>
                  <execution>
                    <id>PLUS-install-color_chooser_extension</id>
                    <goals>
                      <goal>wget</goal>
                    </goals>
                    <configuration>
                      <url>https://github.com/openjump-gis/color-chooser-extension/releases/download/v2.1.0/color-chooser-extension-2.1.0.zip</url>
                      <sha1>76400b466ca3ad2f60b2918800f7e22dbd551e62</sha1>
                      <unpack>true</unpack>
                      <outputDirectory>${plus.folder}</outputDirectory>
                    </configuration>
                  </execution>
                  <execution>
                    <id>PLUS-install-csv_driver</id>
                    <goals>
                      <goal>wget</goal>
                    </goals>
                    <configuration>
                      <url>https://github.com/openjump-gis/csv-driver/releases/download/2.0.0/csv-driver-2.0.0.zip</url>
                      <sha1>9f53a98ae1e5f52f0d0a2fd5990490fa1b0692d7</sha1>
                      <unpack>true</unpack>
                      <outputDirectory>${plus.folder}</outputDirectory>
                    </configuration>
                  </execution>
                  <execution>
                    <id>PLUS-install-dxf_driver</id>
                    <goals>
                      <goal>wget</goal>
                    </goals>
                    <configuration>
                      <url>https://github.com/openjump-gis/dxf-driver/releases/download/2.0.1/dxf-driver-2.0.1.zip</url>
                      <sha1>7daec7aeb8a5bb3a4a9921e3308f8b435b27afb9</sha1>
                      <unpack>true</unpack>
                      <outputDirectory>${plus.folder}</outputDirectory>
                    </configuration>
                  </execution>
                  <execution>
                    <id>PLUS-install-fill-patterns</id>
                    <goals>
                      <goal>wget</goal>
                    </goals>
                    <configuration>
                      <url>https://github.com/openjump-gis/fill-patterns/releases/download/v2.1.1/fill-patterns-2.1.1.zip</url>
                      <sha1>d0c746e704525e4e72802e6c4d230a25da7a1cc3</sha1>
                      <unpack>true</unpack>
                      <outputDirectory>${plus.folder}</outputDirectory>
                    </configuration>
                  </execution>
                  <execution>
                    <id>PLUS-install-five_color_extension</id>
                    <goals>
                      <goal>wget</goal>
                    </goals>
                    <configuration>
                      <url>https://github.com/openjump-gis/five-color-extension/releases/download/2.0.1/five-color-extension-2.0.1.zip</url>
                      <sha1>deb0105c285f6a80c3276e5f9831a25c3ba77231</sha1>
                      <unpack>true</unpack>
                      <outputDirectory>${plus.folder}</outputDirectory>
                    </configuration>
                  </execution>
                  <execution>
                    <id>PLUS-install-graph_toolbox_extension</id>
                    <goals>
                      <goal>wget</goal>
                    </goals>
                    <configuration>
                      <url>https://github.com/openjump-gis/graph-toolbox-extension/releases/download/v2.0.4/graph-toolbox-2.0.4.zip</url>
                      <sha1>fddcac6d4c67326d1d6f8d51dfed801feaaf53be</sha1>
                      <unpack>true</unpack>
                      <outputDirectory>${plus.folder}</outputDirectory>
                    </configuration>
                  </execution>
                  <execution>
                    <id>PLUS-install-jump_chart_extension</id>
                    <goals>
                      <goal>wget</goal>
                    </goals>
                    <configuration>
                      <url>https://github.com/openjump-gis/jump-chart-extension/releases/download/v2.1.0/jump-chart-extension-2.1.0.zip</url>
                      <sha1>b24a465fb802f8b98c1b776a8ee6e7acca40e4ad</sha1>
                      <unpack>true</unpack>
                      <outputDirectory>${plus.folder}</outputDirectory>
                    </configuration>
                  </execution>
                  <execution>
                    <id>PLUS-install-kml_driver</id>
                    <goals>
                      <goal>wget</goal>
                    </goals>
                    <configuration>
                      <url>https://github.com/openjump-gis/kml-driver/releases/download/v2.0.3/kml-driver-2.0.3.zip</url>
                      <sha1>93a5528dbd34a038fbd6e39f58ae3ef3b124d71e</sha1>
                      <unpack>true</unpack>
                      <outputDirectory>${plus.folder}</outputDirectory>
                    </configuration>
                  </execution>
                  <execution>
                    <id>PLUS-install-matching_extension</id>
                    <goals>
                      <goal>wget</goal>
                    </goals>
                    <configuration>
                      <url>https://github.com/openjump-gis/matching-extension/releases/download/v2.0.2/matching-extension-2.0.2.zip</url>
                      <sha1>948e8b06aacecf00064e67d9e6ad40b2547b41ba</sha1>
                      <unpack>true</unpack>
                      <outputDirectory>${plus.folder}</outputDirectory>
                    </configuration>
                  </execution>
                  <execution>
                    <id>PLUS-install-measure_toolbox_extension</id>
                    <goals>
                      <goal>wget</goal>
                    </goals>
                    <configuration>
                      <url>https://github.com/openjump-gis/measure-toolbox-extension/releases/download/v2.1.1/measure-toolbox-extension-2.1.1.zip</url>
                      <sha1>8c32f15aaec0a8010c2d11e8f564548405c67170</sha1>
                      <unpack>true</unpack>
                      <outputDirectory>${plus.folder}</outputDirectory>
                    </configuration>
                  </execution>
                  <execution>
                    <id>PLUS-install-online_doc_extension</id>
                    <goals>
                      <goal>wget</goal>
                    </goals>
                    <configuration>
                      <url>https://github.com/openjump-gis/online-doc-extension/releases/download/2.0.0/online-doc-extension-2.0.0.zip</url>
                      <sha1>333e9401103bcc5ed17ccb7e4942515f8bddac73</sha1>
                      <unpack>true</unpack>
                      <outputDirectory>${plus.folder}</outputDirectory>
                    </configuration>
                  </execution>
                  <execution>
                    <id>PLUS-install-openklem_extension</id>
                    <goals>
                      <goal>wget</goal>
                    </goals>
                    <configuration>
                      <url>https://github.com/openjump-gis/openklem-extension/releases/download/v2.0.2/openklem-openjump-2.0.2.zip</url>
                      <sha1>9e4e0daf0cf373e785f6d5cd4228fa3742210789</sha1>
                      <unpack>true</unpack>
                      <outputDirectory>${plus.folder}</outputDirectory>
                    </configuration>
                  </execution>
                  <execution>
                   <id>PLUS-install-raster_tools_extension</id>
                   <goals>
                     <goal>wget</goal>
                   </goals>
                   <configuration>
                     <url>https://sourceforge.net/projects/opensit/files/Openjump/PlugIn/Raster%20Tools/RasterTools-3.0.1-20241219.jar</url>
                     <sha1>83fdb570cbc79c468c5688d62845be04b9ddb1fa</sha1>
                     <unpack>false</unpack>
                     <outputDirectory>${plus.folder}</outputDirectory>
                   </configuration>
                 </execution>
                  <execution>
                    <id>PLUS-install-set_attributes_extension</id>
                    <goals>
                      <goal>wget</goal>
                    </goals>
                    <configuration>
                      <url>https://github.com/openjump-gis/set-attributes-extension/releases/download/v2.0.2/set-attributes-extension-2.0.2.zip</url>
                      <sha1>522d222c9187a960786ae82ae2b5b200c09aa32d</sha1>
                      <unpack>true</unpack>
                      <outputDirectory>${plus.folder}</outputDirectory>
                    </configuration>
                  </execution>
                  <execution>
                    <id>PLUS-install-sextante</id>
                    <goals>
                      <goal>wget</goal>
                    </goals>
                    <configuration>
                      <url>https://github.com/openjump-gis/sextante-extension/releases/download/v2.2.0-SNAPSHOT/sextante-openjump-2.2.0-SNAPSHOT.zip</url>
                      <sha1>48498b6a630d8c83c25b2b137fad93381c993945</sha1>
                      <unpack>true</unpack>
                      <outputDirectory>${plus.folder}</outputDirectory>
                    </configuration>
                  </execution>
                  <execution>
                    <id>PLUS-install-topology_extension</id>
                    <goals>
                      <goal>wget</goal>
                    </goals>
                    <configuration>
                      <url>https://github.com/openjump-gis/topology-extension/releases/download/v2.0.6/topology-extension-2.0.6.zip</url>
                      <sha1>29dda7c4d67c333e9785e8d8aa061cdb19a83191</sha1>
                      <unpack>true</unpack>
                      <outputDirectory>${plus.folder}</outputDirectory>
                    </configuration>
                  </execution>
                  <execution>
                    <id>PLUS-install-vertex_symbols</id>
                    <goals>
                      <goal>wget</goal>
                    </goals>
                    <configuration>
                      <url>https://github.com/openjump-gis/vertex-symbols/releases/download/v2.2.2/vertex-symbols-2.2.2.zip</url>
                      <sha1>06010079348991b85be2347d50ae8d70f513fd6c</sha1>
                      <unpack>true</unpack>
                      <outputDirectory>${plus.folder}</outputDirectory>
                    </configuration>
                  </execution>
                  <execution>
                    <id>PLUS-install-view_manager</id>
                    <goals>
                      <goal>wget</goal>
                    </goals>
                    <configuration>
                      <url>https://github.com/openjump-gis/view-manager-extension/releases/download/v2.0.4/view-manager-extension-2.0.4.zip</url>
                      <sha1>ae274f250c4c05c4534635e091eca2f543c30e4a</sha1>
                      <unpack>true</unpack>
                      <outputDirectory>${plus.folder}</outputDirectory>
                    </configuration>
                  </execution>
                </executions>
              </plugin>
            </plugins>
          </build>
        </profile>
        <!-- profile creating snapshot distro zips for CORE/PLUS -->
        <profile>
          <id>snapshot</id>
          <properties>
            <!-- essential props used in etc/readme.txt and Version.java -->
            <version.number>${build.datestamp}</version.number>
            <version.release>snapshot</version.release>
            <!-- props used by jar and assembly naming -->
            <version.string>${version.number}-r${version.revision}</version.string>
          </properties>
          <build>
            <plugins>
              <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                  <execution>
                    <id>nolang</id>
                    <phase>package</phase>
                    <goals>
                      <goal>jar</goal>
                    </goals>
                    <configuration>
                      <classifier>nolang</classifier>
                      <excludes>
                        <exclude>language/**</exclude>
                      </excludes>
                    </configuration>
                  </execution>
                </executions>
              </plugin>
              <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                  <appendAssemblyId>false</appendAssemblyId>
                </configuration>
                <executions>
                  <execution>
                    <id>snap-core</id>
                    <phase>package</phase>
                    <configuration>
                      <appendAssemblyId>false</appendAssemblyId>
                      <finalName>${project.build.finalName}-CORE</finalName>
                      <descriptors>
                        <descriptor>etc/mvn/bin_zip-core_snapshot.xml</descriptor>
                      </descriptors>
                    </configuration>
                    <goals>
                      <goal>single</goal>
                    </goals>
                  </execution>
                  <execution>
                    <id>snap-plus</id>
                    <phase>package</phase>
                    <configuration>
                      <appendAssemblyId>false</appendAssemblyId>
                      <finalName>${project.build.finalName}-PLUS</finalName>
                      <descriptors>
                        <descriptor>etc/mvn/bin_zip-plus_snapshot.xml</descriptor>
                      </descriptors>
                    </configuration>
                    <goals>
                      <goal>single</goal>
                    </goals>
                  </execution>
                </executions>
              </plugin>
              <!-- installing to local repo is disabled during distro creation -->
              <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
                <executions>
                  <execution>
                    <id>custom-install</id>
                    <phase>none</phase>
                  </execution>
                </executions>
              </plugin>
            </plugins>
          </build>
        </profile>
        <!-- profile creating release distro zips for CORE/PLUS -->
        <profile>
            <id>release</id>
            <properties>
              <!-- set <version/> property above accordingly, but
                   can be be overridden on maven run with e.g.
                   -D version.number=X.X.X -D version.release=alpha -->
              <version.number>${project.version}</version.number>
              <version.release>release</version.release>
              <recompress.jars>true</recompress.jars>
              <!-- props used by jar and assembly naming -->
              <version.string>${version.number}-r${version.revision}</version.string>
            </properties>
            <build>
                <plugins>
                    <plugin>
                      <artifactId>maven-jar-plugin</artifactId>
                      <executions>
                        <execution>
                          <id>nosrc</id>
                          <phase>package</phase>
                          <goals>
                            <goal>jar</goal>
                          </goals>
                          <configuration>
                            <classifier>nosrc</classifier>
                            <excludes>
                              <exclude>**/*.java</exclude>
                              <!-- excluding unit-test and doc resources -->
                              <exclude>**/*Test.class</exclude>
                              <exclude>fixtures/**</exclude>
                              <exclude>jumptest/**</exclude>
                              <exclude>versiondoc/**</exclude>
                            </excludes>
                          </configuration>
                        </execution>
                      </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <configuration>
                            <appendAssemblyId>false</appendAssemblyId>
                        </configuration>
                        <executions>
                            <execution>
                                <id>release core</id>
                                <phase>package</phase>
                                <configuration>
                                    <finalName>${project.build.finalName}-CORE</finalName>
                                    <descriptors>
                                        <descriptor>etc/mvn/bin_zip-core_stable.xml</descriptor>
                                    </descriptors>
                                </configuration>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>release plus</id>
                                <phase>package</phase>
                                <configuration>
                                    <finalName>${project.build.finalName}-PLUS</finalName>
                                    <descriptors>
                                        <descriptor>etc/mvn/bin_zip-plus_stable.xml</descriptor>
                                    </descriptors>
                                </configuration>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                            </execution>
                        </executions>
                      </plugin>
                      <!-- installing to local repo is disabled during distro creation -->
                      <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-install-plugin</artifactId>
                        <executions>
                          <execution>
                            <id>custom-install</id>
                            <phase>none</phase>
                          </execution>
                        </executions>
                      </plugin>
                      <!-- properly name release deployments -->
                      <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <executions>
                          <execution>
                            <id>custom-deploy</id>
                            <configuration>
                              <file>${project.build.directory}/${project.build.finalName}.jar</file>
                              <version>${version.number}</version>
                            </configuration>
                          </execution>
                        </executions>
                      </plugin>
                </plugins>
            </build>
        </profile>
        <!-- repack the distros, apply some postprocessing, permission fixing, recompression -->
        <profile>
            <id>portable</id>
            <properties>
                <portable.filename>${project.artifactId}-Portable-${version.string}</portable.filename>
                <portable.filepath>${project.build.directory}/recompress</portable.filepath>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-enforcer-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>snapshot-or-release-is-active</id>
                                <goals>
                                    <goal>enforce</goal>
                                </goals>
                                <configuration>
                                    <rules>
                                        <requireActiveProfile>
                                            <profiles>snapshot,release</profiles>
                                            <all>false</all>
                                            <message>You need to select a profile to build the portable distro for!</message>
                                        </requireActiveProfile>
                                    </rules>
                                    <fail>true</fail>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>unzip distros</id>
                                <phase>package</phase>
                                <configuration>
                                    <target>
                                        <property name="file.encoding" value="UTF-8" />
                                        <!--property name="recompress.folder"
                                                  value="${project.build.directory}/recompress" /-->
                                        <echo>Cleanup</echo>
                                        <delete includeemptydirs="true" quiet="true">
                                            <fileset dir="${portable.filepath}"
                                                     followsymlinks="false" />
                                        </delete>
                                        <!-- Using an ant task to deflate *.zip -->
                                        <echo>Unzip CORE</echo>
                                        <unzip
                                            src="${project.build.directory}/${project.build.finalName}-CORE.zip"
                                            dest="${portable.filepath}/core">
                                            <cutdirsmapper dirs="1" />
                                        </unzip>
                                        <echo>Unzip PLUS</echo>
                                        <unzip
                                            src="${project.build.directory}/${project.build.finalName}-PLUS.zip"
                                            dest="${portable.filepath}/plus">
                                            <cutdirsmapper dirs="1" />
                                        </unzip>
                                    </target>
                                </configuration>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>fix permissions, zip portable distros</id>
                                <phase>package</phase>
                                <configuration>
                                      <target>
                                        <!-- Recompress to distro zips -->
                                        <echo>Zip CORE portable </echo>
                                        <zip
                                            destfile="${portable.filepath}/${portable.filename}-CORE.zip"
                                            level="9">
                                            <zipfileset dir="${portable.filepath}/core"
                                                        prefix="${project.build.finalName}-CORE" excludes="${project.binaries}" />
                                            <zipfileset dir="${portable.filepath}/core"
                                                        prefix="${project.build.finalName}-CORE" includes="${project.binaries}"
                                                        filemode="755" />
                                        </zip>
                                        <echo>Zip PLUS portable </echo>
                                        <zip
                                            destfile="${portable.filepath}/${portable.filename}-PLUS.zip"
                                            level="9">
                                            <zipfileset dir="${portable.filepath}/plus"
                                                        prefix="${project.build.finalName}-PLUS" excludes="${project.binaries}" />
                                            <zipfileset dir="${portable.filepath}/plus"
                                                        prefix="${project.build.finalName}-PLUS" includes="${project.binaries}"
                                                        filemode="755" />
                                        </zip>
                                    </target>
                                </configuration>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <!-- create jar/exe installers from portable distros -->
        <profile>
            <id>installer</id>
            <properties>
              <installer.filename>${project.artifactId}-Installer-${version.string}</installer.filename>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-enforcer-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>portable-is-active</id>
                                <goals>
                                    <goal>enforce</goal>
                                </goals>
                                <configuration>
                                    <rules>
                                        <requireActiveProfile>
                                            <profiles>portable</profiles>
                                            <all>true</all>
                                            <message>The installers are build using the portable distro zips!</message>
                                        </requireActiveProfile>
                                    </rules>
                                    <fail>true</fail>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>create izpack installer jars</id>
                                <phase>package</phase>
                                <configuration>
                                    <target>
                                        <property name="file.encoding" value="UTF-8" />
                                        <delete includeemptydirs="true" quiet="true">
                                            <fileset dir="${project.build.directory}/izpack"
                                                     followsymlinks="false" />
                                        </delete>
                                        <!-- Using an ant task to deflate *.zip -->
                                        <unzip
                                            src="${portable.filepath}/${portable.filename}-CORE.zip"
                                            dest="${project.build.directory}/izpack/core/pack0">
                                            <cutdirsmapper dirs="1" />
                                        </unzip>
                                        <unzip
                                            src="${portable.filepath}/${portable.filename}-PLUS.zip"
                                            dest="${project.build.directory}/izpack/plus/pack0">
                                            <cutdirsmapper dirs="1" />
                                        </unzip>
                                        <!-- Set correct permissions for executables. Seems not to be respected 
                                        by izpack packer, hence it has to be done again in post-install -->
                                        <chmod dir="${project.build.directory}/izpack" perm="644" type="file"
                                               includes="**" verbose="true" />
                                        <chmod dir="${project.build.directory}/izpack" perm="755" type="dir"
                                               includes="**" verbose="true" />
                                        <chmod dir="${project.build.directory}/izpack" perm="755" type="file"
                                               includes="${project.binaries}" verbose="true" />

                                        <!-- prepare izpack environments -->
                                        <!-- jump through hoops to get special chars in readme infopanel 
                                        correct -->
                                        <copy file="${project.build.directory}/res/Readme.txt"
                                              tofile="${project.build.directory}/izpack/readme.text.html" />
                                        <replace
                                            file="${project.build.directory}/izpack/readme.text.html"
                                            encoding="UTF-8">
                                            <replacefilter>
                                                <replacetoken>&amp;</replacetoken>
                                                <replacevalue>&amp;amp;</replacevalue>
                                            </replacefilter>
                                            <replacefilter>
                                                <replacetoken>&lt;</replacetoken>
                                                <replacevalue>&amp;lt;</replacevalue>
                                            </replacefilter>
                                            <replacefilter>
                                                <replacetoken>&gt;</replacetoken>
                                                <replacevalue>&amp;gt;</replacevalue>
                                            </replacefilter>
                                        </replace>
                                        <concat destfile="${project.build.directory}/izpack/readme.html"
                                                binary="yes">
                                            <fileset file="etc/izpack/res/readme.html.head" />
                                            <fileset
                                                file="${project.build.directory}/izpack/readme.text.html" />
                                            <fileset file="etc/izpack/res/readme.html.foot" />
                                        </concat>
                                        <!-- prepare different editions -->
                                        <filter token="edition" value="CORE" />
                                        <filter token="version" value="${version.number}" />
                                        <filter token="revision" value="${version.revision}" />
                                        <!-- copydir src="etc/izpack" dest="${project.build.directory}/izpack/core" 
                                        / -->
                                        <copy todir="${project.build.directory}/izpack/core">
                                            <fileset dir="etc/izpack" />
                                        </copy>
                                        <copy file="etc/izpack/oj_installer.xml" todir="${project.build.directory}/izpack/core/"
                                              filtering="true" overwrite="true" />
                                        <filter token="edition" value="PLUS" />
                                        <copy todir="${project.build.directory}/izpack/plus">
                                            <fileset dir="etc/izpack" />
                                        </copy>
                                        <copy file="etc/izpack/oj_installer.xml" todir="${project.build.directory}/izpack/plus/"
                                              filtering="true" overwrite="true" />
                                        <!-- Allows us to use the IzPack Ant task -->
                                        <taskdef name="IzPack"
                                                 classpath="launcher/IzPack-4.3.5/lib/standalone-compiler.jar"
                                                 classname="com.izforge.izpack.ant.IzPackTask" />
                                        <!-- We call IzPack -->
                                        <echo message="Make CORE installer" />
                                        <IzPack
                                            input="${project.build.directory}/izpack/core/oj_installer.xml"
                                            output="${project.build.directory}/izpack/${installer.filename}-CORE.jar"
                                            installerType="standard" basedir="${project.build.directory}/izpack/core/"
                                            IzPackDir="launcher/IzPack-4.3.5" />
                                        <echo message="Make PLUS installer" />
                                        <IzPack
                                            input="${project.build.directory}/izpack/plus/oj_installer.xml"
                                            output="${project.build.directory}/izpack/${installer.filename}-PLUS.jar"
                                            installerType="standard" basedir="${project.build.directory}/izpack/plus/"
                                            IzPackDir="launcher/IzPack-4.3.5" />
                                        <!-- generate exe launcher via launch4j -->
                                        <!-- property name="launch4j.dir" location="launcher/launch4j-3.0.2" 
                                        / -->
                                        <!-- kept for reference, can be deleted at some point in the future
                                        <property name="launch4j.config"
                                                  location="etc/launch4j/ojinstall-launch4j.xml" />
                                        <taskdef name="launch4j" classname="net.sf.launch4j.ant.Launch4jTask"
                                                 classpath="${launch4j.dir}/launch4j.jar:${launch4j.dir}/lib/xstream.jar" />
                                        <launch4j configFile="${launch4j.config}"
                                                  jar="${project.build.directory}/izpack/${installer.filename}-CORE.jar"
                                                  outfile="${project.build.directory}/izpack/${installer.filename}-CORE.exe" />
                                        <launch4j configFile="${launch4j.config}"
                                                  jar="${project.build.directory}/izpack/${installer.filename}-PLUS.jar"
                                                  outfile="${project.build.directory}/izpack/${installer.filename}-PLUS.exe" />
                                        -->
                                    </target>
                                </configuration>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>com.akathist.maven.plugins.launch4j</groupId>
                        <artifactId>launch4j-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>wrap CORE exe installer</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>launch4j</goal>
                                </goals>
                                <configuration>
                                    <headerType>gui</headerType>
                                    <jar>${project.build.directory}/izpack/${installer.filename}-CORE.jar</jar>
                                    <outfile>${project.build.directory}/izpack/${installer.filename}-CORE.exe</outfile>
                                </configuration>
                            </execution>
                            <execution>
                                <id>wrap PLUS exe installer</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>launch4j</goal>
                                </goals>
                                <configuration>
                                    <headerType>gui</headerType>
                                    <jar>${project.build.directory}/izpack/${installer.filename}-PLUS.jar</jar>
                                    <outfile>${project.build.directory}/izpack/${installer.filename}-PLUS.exe</outfile>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <!-- create javadoc zip -->
        <profile>
            <id>javadoc</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <configuration>
                            <outputDirectory>${project.build.directory}/apidocs/</outputDirectory>
                            <reportOutputDirectory>${project.build.directory}/apidocs/</reportOutputDirectory>
                            <source>8</source>
                            <quiet>true</quiet>
                            <!-- 
                            java8+ enforces some strict checking, which we do not abide (yet?) 
                            also see https://stackoverflow.com/questions/39616344/how-to-disable-javadoc-warnings-in-maven-javadoc-plugin
                            -->
                            <doclint>none</doclint>
                        </configuration>
                        <executions>
                            <execution>
                                <id>generate javadocs</id>
                                <phase>compile</phase>
                                <goals>
                                    <!-- don't reinvoke 'generate-sources' -->
                                    <goal>javadoc-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>create apidoc zip</id>
                                <phase>package</phase>
                                <configuration>
                                    <target>
                                        <zip
                                            destfile="${project.build.directory}/${project.build.finalName}-apidocs.zip"
                                            level="9">
                                            <zipfileset dir="${project.build.directory}/apidocs" prefix=""/>
                                        </zip>
                                    </target>
                                </configuration>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- attach to installed artifact -->
                    <plugin>
                      <artifactId>maven-install-plugin</artifactId>
                      <executions>
                        <execution>
                          <id>custom-install</id>
                          <configuration>
                            <javadoc>${project.build.directory}/${project.build.finalName}-apidocs.zip</javadoc>
                          </configuration>
                        </execution>
                      </executions>
                    </plugin>

                    <!-- attach to deployed artifact -->
                    <plugin>
                      <artifactId>maven-deploy-plugin</artifactId>
                      <executions>
                        <execution>
                          <id>custom-deploy</id>
                          <configuration>
                            <javadoc>${project.build.directory}/${project.build.finalName}-apidocs.zip</javadoc>
                          </configuration>
                        </execution>
                      </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <!-- create zip containing the sources -->
        <profile>
            <id>srczip</id>
            <!-- activated by default unless -DskipSrczip is defined -->
            <activation>
              <property>
                <name>!skipSrczip</name>
              </property>
            </activation>
            <build>
                <plugins>
                    <!-- for testing speedup disable compilation --> <!--
                    <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-compiler-plugin</artifactId>
                      <executions>
                        <execution>
                          <id>default-compile</id>
                          <configuration>
                            <skipMain>true</skipMain>
                          </configuration>
                        </execution>
                      </executions>
                    </plugin>
                    -->
                    <plugin>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>create src zip</id>
                                <phase>package</phase>
                                <configuration>
                                    <target>
                                        <zip
                                            destfile="${project.build.directory}/${project.build.finalName}-src.zip"
                                            level="9">
                                            <zipfileset dir="${project.build.directory}/classes" prefix="" excludes="**/*.class"/>
                                        </zip>
                                    </target>
                                </configuration>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- attach to installed artifact -->
                    <plugin>
                      <artifactId>maven-install-plugin</artifactId>
                      <executions>
                        <execution>
                          <id>custom-install</id>
                          <configuration>
                            <sources>${project.build.directory}/${project.build.finalName}-src.zip</sources>
                          </configuration>
                        </execution>
                      </executions>
                    </plugin>

                    <!-- attach to deployed artifact -->
                    <plugin>
                      <artifactId>maven-deploy-plugin</artifactId>
                      <executions>
                        <execution>
                          <id>custom-deploy</id>
                          <configuration>
                            <sources>${project.build.directory}/${project.build.finalName}-src.zip</sources>
                          </configuration>
                        </execution>
                      </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
      <!-- some helpful switches allowing disabling certain time consuming tasks during maven reruns -->
      <profile>
        <id>disable compilation (for testing purposes)</id>
        <activation>
          <property>
            <name>skipCompile</name>
            <value>true</value>
          </property>
        </activation>
        <build>
          <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-compiler-plugin</artifactId>
              <executions>
                <execution>
                  <id>default-compile</id>
                  <phase>none</phase>
                </execution>
              </executions>
            </plugin>
          </plugins>
        </build>
      </profile>
      <profile>
        <id>disable test compilation (for testing purposes)</id>
        <activation>
          <property>
            <name>skipTests</name>
            <value>true</value>
          </property>
        </activation>
        <build>
          <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-compiler-plugin</artifactId>
              <executions>
                <execution>
                  <id>default-testCompile</id>
                  <phase>none</phase>
                </execution>
              </executions>
            </plugin>
          </plugins>
        </build>
      </profile>
      <profile>
        <id>disable javadoc compilation (for testing purposes)</id>
        <activation>
          <property>
            <name>skipJavadoc</name>
            <value>true</value>
          </property>
        </activation>
        <build>
          <plugins>
            <plugin>
              <artifactId>maven-javadoc-plugin</artifactId>
              <executions>
                <execution>
                  <id>generate javadocs</id>
                  <phase>none</phase>
                </execution>
              </executions>
            </plugin>
          </plugins>
        </build>
      </profile>
      <!-- have mvn run OJ, e.g. mvn test -Dmaven.test.skip=true -DtestExecute=true -->
      <profile>
        <id>execute</id>
        <activation>
          <property>
            <name>testExecute</name>
            <value>true</value>
          </property>
        </activation>
        <build>
          <plugins>
            <plugin>
              <groupId>org.codehaus.mojo</groupId>
              <artifactId>exec-maven-plugin</artifactId>
              <version>3.5.1</version>
              <?m2e ignore?>
              <executions>
                <execution>
                  <id>echo java version</id>
                  <phase>test</phase>
                  <goals>
                    <goal>exec</goal>
                  </goals>
                  <configuration>
                    <executable>java</executable>
                    <arguments>
                      <argument>-version</argument>
                    </arguments>
                  </configuration>
                </execution>
                <execution>
                  <id>run OpenJUMP</id>
                  <phase>test</phase>
                  <goals>
                    <goal>exec</goal>
                  </goals>
                  <configuration>
                    <workingDirectory>${project.basedir}</workingDirectory>
                    <executable>java</executable>
                    <arguments>
                      <argument>-classpath</argument>
                      <!-- automatically creates the classpath using all project dependencies,
                           also adding the project build directory -->
                      <classpath/>
                      <argument>-Djava.system.class.loader=com.vividsolutions.jump.workbench.plugin.PlugInClassLoader</argument>
                      <argument>com.vividsolutions.jump.workbench.JUMPWorkbench</argument>
                      <argument>-properties</argument>
                      <argument>"workbench-properties.xml"</argument>
                      <argument>-default-plugins</argument>
                      <argument>scripts/default-plugins.xml</argument>
                      <argument>-extensions-directory</argument>
                      <argument>"lib/ext"</argument>
                      <argument>-extensions-directory</argument>
                      <argument>"target/lib.ext.core"</argument>
                      <argument>-extensions-directory</argument>
                      <argument>"target/lib.ext.plus"</argument>
                      <argument>-I18n</argument>
                      <argument>en_EN</argument>
                      <argument>-v</argument>
                      <argument>debug</argument>
                    </arguments>
                  </configuration>
                </execution>
              </executions>
            </plugin>
          </plugins>
        </build>
      </profile>
    </profiles>
    <build>
      <finalName>${project.artifactId}-${version.string}</finalName>
      <sourceDirectory>src/</sourceDirectory>
      <outputDirectory>target/classes/</outputDirectory>
      <testSourceDirectory>test/</testSourceDirectory>
      <testOutputDirectory>target/test-classes/</testOutputDirectory>
      <resources>
        <resource>
          <directory>src</directory>
          <!-- we copy _everything_ to target/classes and filter during packaging -->
          <excludes>
            <!-- exclude> **/*.java </exclude -->
            <exclude>language/*.properties</exclude>
          </excludes>
        </resource>
        <resource>
          <filtering>true</filtering>
          <directory>src</directory>
          <includes>
            <include>language/*.properties</include>
          </includes>
        </resource>
        <!-- filter version placeholders during copying -->
        <resource>
          <filtering>true</filtering>
          <directory>etc</directory>
          <includes>
            <include>Readme.txt</include>
          </includes>
          <targetPath>${project.build.directory}/res/</targetPath>
        </resource>
        <resource>
          <filtering>true</filtering>
          <directory>.</directory>
          <includes>
            <include>Changes.txt</include>
          </includes>
          <targetPath>${project.build.directory}/res/</targetPath>
        </resource>
      </resources>
      <testResources>
        <testResource>
          <directory>${project.build.testSourceDirectory}</directory>
          <excludes>
            <exclude> **/*.java </exclude>
          </excludes>
        </testResource>
      </testResources>
      <pluginManagement>
        <plugins>
          <!-- pin some versions here for plugins used in several profiles -->
          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <version>3.7.1</version>
          </plugin>
          <plugin>
            <artifactId>maven-jar-plugin</artifactId>
            <version>3.4.2</version>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-deploy-plugin</artifactId>
            <version>3.1.3</version>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <version>3.6.1</version>
          </plugin>
          <plugin>
            <groupId>io.github.download-maven-plugin</groupId>
            <artifactId>download-maven-plugin</artifactId>
            <version>2.0.0</version>
          </plugin>
          <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <version>3.1.0</version>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.12.0</version>
          </plugin>
        </plugins>
      </pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <executions>
            <execution>
              <id>no-duplicate-declared-dependencies</id>
              <goals>
                <goal>enforce</goal>
              </goals>
              <configuration>
                <rules>
                  <banDuplicatePomDependencyVersions />
                </rules>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.14.1</version>
          <configuration>
            <source>8</source>
            <target>8</target>
            <release>8</release>
            <compilerArgs>
              <arg>-Xlint:deprecation</arg>
            </compilerArgs>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>3.6.0</version>
          <?m2e ignore?>
          <executions>
            <!-- build several build date stamp formattings used all over -->
            <execution>
              <id>build-datestamp-property</id>
              <phase>validate</phase>
              <goals>
                <goal>timestamp-property</goal>
              </goals>
              <configuration>
                <name>build.datestamp</name>
                <pattern>yyyyMMdd</pattern>
                <timeSource>build</timeSource>
                <locale>en_US</locale>
              </configuration>
            </execution>
            <execution>
              <id>build-datelong-property</id>
              <phase>validate</phase>
              <goals>
                <goal>timestamp-property</goal>
              </goals>
              <configuration>
                <name>build.datelong</name>
                <pattern>dd. MMMM yyyy</pattern>
                <timeSource>build</timeSource>
                <locale>en_US</locale>
              </configuration>
            </execution>
            <execution>
              <id>build-date-property</id>
              <phase>validate</phase>
              <goals>
                <goal>timestamp-property</goal>
              </goals>
              <configuration>
                <name>build.date</name>
                <pattern>dd.MM.yyyy</pattern>
                <timeSource>build</timeSource>
                <locale>en_US</locale>
              </configuration>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>io.github.git-commit-id</groupId>
          <artifactId>git-commit-id-maven-plugin</artifactId>
          <!-- version 5+ are java11+ compatible only -->
          <version>4.9.9</version>
          <?m2e ignore?>
          <executions>
            <!-- retrieve git revision information from local repo -->
            <execution>
              <id>fetch git properties of current branch</id>
              <goals>
                <goal>revision</goal>
              </goals>
              <phase>validate</phase>
            </execution>
          </executions>
          <configuration>
            <verbose>true</verbose>
            <offline>true</offline>
            <!-- write a copy of git props into target/classes to be contained in the resulting jar below -->
            <generateGitPropertiesFile>true</generateGitPropertiesFile>
            <generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>
            <includeOnlyProperties>
              <includeOnlyProperty>^git.branch$</includeOnlyProperty>
              <includeOnlyProperty>^git.build.(time|version|(number(|.unique)))$</includeOnlyProperty>
              <includeOnlyProperty>^git.commit.(id.(abbrev|full)|message.short)$</includeOnlyProperty>
              <includeOnlyProperty>^git.dirty$</includeOnlyProperty>
              <includeOnlyProperty>^git.total.commit.count$</includeOnlyProperty>
            </includeOnlyProperties>
            <commitIdGenerationMode>full</commitIdGenerationMode>
          </configuration>
        </plugin>

        <plugin>
          <groupId>se.bjurr.gitchangelog</groupId>
          <artifactId>git-changelog-maven-plugin</artifactId>
          <version>1.101.0</version>
          <?m2e ignore?>
          <executions>
            <execution>
              <id>GenerateGitChangelogCommits</id>
              <phase>generate-sources</phase>
              <goals>
                <goal>git-changelog</goal>
              </goals>
              <configuration>
                <file>${project.build.directory}/res/Git-log.txt</file>
                <toRef>HEAD</toRef>
                <fromCommit>17603d8a46840a58dcf2d105d22a0000763e7dfd</fromCommit>
                <!-- needs 'git fetch __tags', rather use commit hash above
                    <fromRef>1.16</fromRef>
                    -->
                <dateFormat>yyyy.MM.dd HH:mm:ss</dateFormat>
                <templateContent>
                  <![CDATA[
${project.artifactId} ${project.version} Changelog

{{#tags}}
{{name}}

{{#commits}}
{{{commitTime}}} - {{{authorName}}}
- https://github.com/openjump-gis/openjump/commit/{{{hash}}}
{{{messageTitle}}}
{{#messageBodyItems}}
  {{{.}}}
{{/messageBodyItems}}

{{/commits}}

{{/tags}}
                  ]]>
                </templateContent>
              </configuration>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>com.github.ekryd.echo-maven-plugin</groupId>
          <artifactId>echo-maven-plugin</artifactId>
          <!-- version 2+ are java11+ compatible only -->
          <version>1.3.2</version>
          <!-- fixup some weird Eclipse m2e issue "Plugin execution not covered by lifecycle configuration"
                   https://www.eclipse.org/m2e/documentation/release-notes-17.html#new-syntax-for-specifying-lifecycle-mapping-metadata -->
          <?m2e ignore?>
          <executions>
            <execution>
              <id>echo-version-info</id>
              <phase>initialize</phase>
              <goals>
                <goal>echo</goal>
              </goals>
              <configuration>
                <message>Building
                        ${project.build.finalName}
                      </message>
              </configuration>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>io.github.download-maven-plugin</groupId>
          <artifactId>download-maven-plugin</artifactId>
          <configuration>
            <alwaysVerifyChecksum>true</alwaysVerifyChecksum>
          </configuration>
        </plugin>

        <!-- default-jar only needed for maven repo deployment,
             so postpone creation to install cycle  -->
        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <executions>
            <execution>
              <id>default-jar</id>
              <phase>install</phase>
              <configuration>
                <excludes>
                  <exclude>**/*.java</exclude>
                </excludes>
              </configuration>
            </execution>
          </executions>
        </plugin>

        <!-- installing artifact to local repo (usually "~/.m2")
             is mainly done to enable 
             https://jitpack.io/#openjump-gis/openjump
             repo builds -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>3.1.4</version>
          <executions>
            <execution>
              <id>default-install</id>
              <phase>none</phase>
              <goals>
                <goal>install-file</goal>
              </goals>
            </execution>
            <execution>
              <id>custom-install</id>
              <goals>
                <goal>install-file</goal>
              </goals>
              <phase>install</phase>
              <configuration>
                <packaging>jar</packaging>
                <file>${project.build.directory}/${project.build.finalName}.jar</file>
                <!-- 
                <localRepositoryPath>${project.build.directory}/repo/</localRepositoryPath>
                -->
                <version>${project.version}-${git.branch}-${git.commit.id.abbrev}</version>
              </configuration>
            </execution>
          </executions>
        </plugin>

        <!-- this deploys the jar to a repo-url given,
             used in snapshot/release builds to update
             oj.soldin.de repo -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <executions>
            <execution>
              <id>default-deploy</id>
              <phase>none</phase>
            </execution>
            <execution>
              <id>custom-deploy</id>
              <phase>deploy</phase>
              <goals>
                <goal>deploy-file</goal>
              </goals>
              <configuration>
                <file>${project.build.directory}/${project.build.finalName}.jar</file>
                <!-- needs to be set via -Durl=file://C:\m2-repo -->
                <!--
                <url>file://${project.build.directory}/build-repo/</url>
                -->
                <!-- default is snapshot which will be deployed as <branch>-SNAPSHOT to repo -->
                <version>${git.branch}-SNAPSHOT</version>
                <files>${project.build.outputDirectory}/git.properties,${project.build.directory}/res/Git-log.txt</files>
                <classifiers>git-info,git-log</classifiers>
                <types>txt,txt</types>
              </configuration>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>3.5.4</version>
          <configuration>
            <argLine>-Djava.system.class.loader=com.vividsolutions.jump.workbench.plugin.PlugInClassLoader</argLine>
          </configuration>
        </plugin>

        <plugin>
          <artifactId>maven-antrun-plugin</artifactId>
        </plugin>

        <plugin>
          <groupId>com.akathist.maven.plugins.launch4j</groupId>
          <artifactId>launch4j-maven-plugin</artifactId>
          <version>2.5.2</version>
          <!-- some defaults to used by all executions above -->
          <configuration>
            <supportUrl>http://openjump.org</supportUrl>
            <icon>icon/openjump_icon3.ico</icon>
            <jre>
              <path>%JAVA_HOME%;%PATH%</path>
              <minVersion>8</minVersion>
            </jre>
            <versionInfo>
              <fileVersion>1.0.0.0</fileVersion>
              <txtFileVersion>${version.string}</txtFileVersion>
              <fileDescription>${project.build.finalName}</fileDescription>
              <copyright>GPLv2</copyright>
              <productVersion>1.0.0.0</productVersion>
              <txtProductVersion>${project.build.finalName}</txtProductVersion>
              <productName>${project.artifactId}</productName>
              <companyName>OJ Team</companyName>
              <internalName>OJ-installer</internalName>
              <originalFilename>OJ-installer.exe</originalFilename>
            </versionInfo>
          </configuration>
        </plugin>
      </plugins>
    </build>
    <repositories>
        <!-- MvnRepository holds a list of recent repos
             https://mvnrepository.com/repos -->
        <repository>
            <id>Maven Central group</id>
            <name>Maven Central group Repository</name>
            <url>https://repo1.maven.org/maven2/</url>
        </repository>
        <repository>
            <id>apache.repo</id>
            <url>https://repo.maven.apache.org/maven2/</url>
            <name>Apache Repo</name>
        </repository>
        <repository>
            <id>apache.snapshots</id>
            <url>https://repository.apache.org/snapshots</url>
            <name>Apache Snapshots</name>
        </repository>
        <!-- deegree2 libs needed for WFS -->
        <!--repository>
            <id>deegree-snapshots</id>
            <name>Deegree Snaphots</name>
            <url>http://repo.deegree.org/content/repositories/snapshots/</url>
        </repository-->
        <!-- below the home of imageio-ext -->
        <repository>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <id>imageio-ext-repository</id>
            <name>imageio-ext Repository</name>
            <url>https://maven.geo-solutions.it/</url>
        </repository>
        <!-- Used for buoy and JAI core, codec and imageio
             which are not avail on maven central -->
        <repository>
            <id>ojrepo</id>
            <name>OpenJUMP Snapshot Repository</name>
            <url>https://ojrepo.soldin.de/</url>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>
        <dependency>
            <groupId>org.locationtech.jts</groupId>
            <artifactId>jts-core</artifactId>
            <version>${jts.version}</version>
        </dependency>
        <dependency>
            <groupId>org.locationtech.jts.io</groupId>
            <artifactId>jts-io-common</artifactId>
            <version>${jts.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache-extras.beanshell</groupId>
            <artifactId>bsh</artifactId>
            <version>2.0b6</version>
        </dependency>
        <dependency>
          <groupId>org.orbisgis</groupId>
          <artifactId>cts</artifactId>
          <version>1.5.2</version>
        </dependency>
        <!-- disabled as needed jar pulled by cts automatically, 
             not sure we need cts to log to file really
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.30</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.7.30</version>
        </dependency>
        -->
        <dependency>
            <groupId>org.jdom</groupId>
            <artifactId>jdom2</artifactId>
            <version>2.0.6.1</version>
        </dependency>
        <dependency>
            <groupId>xerces</groupId>
            <artifactId>xercesImpl</artifactId>
            <version>2.12.2</version>
            <exclusions>
                <!-- prevent error when building with jre9+, apparently 
                     org.w3c.dom is part of jre as module java.xml, error is
                    "The package org.w3c.dom is accessible from more than one module: <unnamed>, java.xml" -->
                <!-- reenabled [202201 ed] needed by log4j and extensions
                     will need to find another solution
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>xml-apis</artifactId>
                </exclusion>
                -->
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>${postgresql.version}</version>
        </dependency>
        <dependency>
            <groupId>batik</groupId>
            <artifactId>batik-svggen</artifactId>
            <version>${batik.version}</version>
            <exclusions>
                <exclusion>
                    <!-- currently not needed -->
                    <artifactId>*</artifactId>
                    <groupId>xml-apis</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>batik</groupId>
            <artifactId>batik-transcoder</artifactId>
            <version>${batik.version}</version>
            <exclusions>
                <exclusion>
                    <!-- prevent "SAX2 driver class org.apache.crimson.parser.XMLReaderImpl not found" 
                     when parsing/transcoding SVG -->
                    <artifactId>fop</artifactId>
                    <groupId>fop</groupId>
                </exclusion>
                 <exclusion>
                     <!-- currently not needed -->
                    <artifactId>js</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>net.sf.buoy</groupId>
            <artifactId>buoy</artifactId>
            <version>1.9</version>
        </dependency>
        <dependency>
            <groupId>com.github.yannrichet</groupId>
            <artifactId>JMathArray</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>com.github.yannrichet</groupId>
            <artifactId>JMathPlot</artifactId>
            <version>1.0.1</version>
        </dependency>
        <dependency>
            <groupId>gov.nist.math</groupId>
            <artifactId>jama</artifactId>
            <version>1.0.3</version>
        </dependency>
        <dependency>
          <groupId>org.junit.jupiter</groupId>
          <artifactId>junit-jupiter</artifactId>
          <version>${junit.version}</version>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.junit.vintage</groupId>
          <artifactId>junit-vintage-engine</artifactId>
          <version>${junit.version}</version>
          <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <version>3.0</version>
            <scope>test</scope>
        </dependency>
        <!-- Version 2.2.1 is the last of the unmaintained 2.2 series
        There are 2.5.x and 2.7 versions but they are much bigger
        don't know if we need them as only few if any people use jython -->
        <dependency>
            <groupId>org.python</groupId>
            <artifactId>jython</artifactId>
            <version>2.2.1</version>
        </dependency>
        <dependency>
            <groupId>org.tukaani</groupId>
            <artifactId>xz</artifactId>
            <version>1.9</version>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.19.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-compress</artifactId>
            <version>1.28.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-imaging</artifactId>
            <version>1.0.0-alpha4</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.20.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.18.0</version>
        </dependency>
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.3.5</version>
        </dependency>
        <dependency>
            <groupId>com.github.jai-imageio</groupId>
            <artifactId>jai-imageio-core</artifactId>
            <version>1.4.0</version>
        </dependency>
        <!-- used in CORE by org.libtiff.jai.codec.TIFF and by imagioext -->
        <dependency>
            <groupId>javax.media</groupId>
            <artifactId>jai_core</artifactId>
            <version>1.1.3</version>
        </dependency>
        <dependency>
            <groupId>javax.media</groupId>
            <artifactId>jai_codec</artifactId>
            <version>1.1.3</version>
        </dependency>
        <dependency>
            <groupId>javax.media</groupId>
            <artifactId>jai_imageio</artifactId>
            <version>1.1</version>
        </dependency>
        <dependency>
          <groupId>org.gdal</groupId>
          <artifactId>gdal</artifactId>
          <!--version>3.5.0</version-->
          <version>3.8.0</version>
        </dependency>
      <dependency>
        <groupId>de.digitalcollections.imageio</groupId>
        <artifactId>imageio-openjpeg</artifactId>
        <version>0.6.8</version>
      </dependency>
        <!-- imageio-ext modules needed for compilation and included in CORE -->
        <dependency>
            <groupId>it.geosolutions.imageio-ext</groupId>
            <artifactId>imageio-ext-utilities</artifactId>
            <version>${imageio-ext.version}</version>
        </dependency>
        <dependency>
            <groupId>it.geosolutions.imageio-ext</groupId>
            <artifactId>imageio-ext-gdalframework</artifactId>
            <version>${imageio-ext.version}</version>
        </dependency>
        <dependency>
            <groupId>it.geosolutions.imageio-ext</groupId>
            <artifactId>imageio-ext-geocore</artifactId>
            <version>${imageio-ext.version}</version>
            <exclusions>
              <exclusion>
                <!-- currently v1.3.11 these are 
                   javax.xml.bind:jaxb-api, org.glassfish.jaxb:jaxb-runtime, 
                   javax.activation:javax.activation-api
                  not sure they are needed, but even if there is already
                  another JAXB implementation included under lib/ext/jaxb/ by
                  view-manager, set-atributes extensions in PLUS -->
                <groupId>*</groupId>
                <artifactId>*</artifactId>
              </exclusion>
            </exclusions>
        </dependency>
        <dependency>
           <groupId>it.geosolutions.imageio-ext</groupId>
           <artifactId>imageio-ext-tiff</artifactId>
           <!-- downgrade, as > 1.1.13 does not load single band TIFFs properly -->
           <version>${imageio-ext.version}</version>
           <scope>compile</scope>
        </dependency>
        <!-- selected imageio-ext modules for different image formats to be packaged into PLUS -->
        <dependency>
            <groupId>it.geosolutions.imageio-ext</groupId>
            <artifactId>imageio-ext-arcgrid</artifactId>
            <version>${imageio-ext.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>it.geosolutions.imageio-ext</groupId>
            <artifactId>imageio-ext-gdalarcbinarygrid</artifactId>
            <version>${imageio-ext.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>it.geosolutions.imageio-ext</groupId>
            <artifactId>imageio-ext-gdalarcgrid</artifactId>
            <version>${imageio-ext.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>it.geosolutions.imageio-ext</groupId>
            <artifactId>imageio-ext-gdalbsb</artifactId>
            <version>${imageio-ext.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>it.geosolutions.imageio-ext</groupId>
            <artifactId>imageio-ext-gdaldoq1</artifactId>
            <version>${imageio-ext.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>it.geosolutions.imageio-ext</groupId>
            <artifactId>imageio-ext-gdaldoq2</artifactId>
            <version>${imageio-ext.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>it.geosolutions.imageio-ext</groupId>
            <artifactId>imageio-ext-gdaldted</artifactId>
            <version>${imageio-ext.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>it.geosolutions.imageio-ext</groupId>
            <artifactId>imageio-ext-gdalecw</artifactId>
            <version>${imageio-ext.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>it.geosolutions.imageio-ext</groupId>
            <artifactId>imageio-ext-gdalehdr</artifactId>
            <version>${imageio-ext.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>it.geosolutions.imageio-ext</groupId>
            <artifactId>imageio-ext-gdalenvihdr</artifactId>
            <version>${imageio-ext.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>it.geosolutions.imageio-ext</groupId>
            <artifactId>imageio-ext-gdalenvisat</artifactId>
            <version>${imageio-ext.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>it.geosolutions.imageio-ext</groupId>
            <artifactId>imageio-ext-gdalerdasimg</artifactId>
            <version>${imageio-ext.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>it.geosolutions.imageio-ext</groupId>
            <artifactId>imageio-ext-gdalgeotiff</artifactId>
            <version>${imageio-ext.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>it.geosolutions.imageio-ext</groupId>
            <artifactId>imageio-ext-gdalidrisi</artifactId>
            <version>${imageio-ext.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>it.geosolutions.imageio-ext</groupId>
            <artifactId>imageio-ext-gdaljpeg</artifactId>
            <version>${imageio-ext.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>it.geosolutions.imageio-ext</groupId>
            <artifactId>imageio-ext-gdalkakadujp2</artifactId>
            <version>${imageio-ext.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>it.geosolutions.imageio-ext</groupId>
            <artifactId>imageio-ext-gdalmrsid</artifactId>
            <version>${imageio-ext.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>it.geosolutions.imageio-ext</groupId>
            <artifactId>imageio-ext-gdalmrsidjp2</artifactId>
            <version>${imageio-ext.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>it.geosolutions.imageio-ext</groupId>
            <artifactId>imageio-ext-gdalnitf</artifactId>
            <version>${imageio-ext.version}</version>
            <scope>runtime</scope>
        </dependency>
                <dependency>
            <groupId>it.geosolutions.imageio-ext</groupId>
            <artifactId>imageio-ext-gdalvrt</artifactId>
            <version>${imageio-ext.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>it.geosolutions.imageio-ext</groupId>
            <artifactId>imageio-ext-imagereadmt</artifactId>
            <version>${imageio-ext.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>it.geosolutions.imageio-ext</groupId>
            <artifactId>imageio-ext-kakadu</artifactId>
            <version>${imageio-ext.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>it.geosolutions.imageio-ext</groupId>
            <artifactId>imageio-ext-nitf</artifactId>
            <version>${imageio-ext.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>it.geosolutions.imageio-ext</groupId>
            <artifactId>imageio-ext-png</artifactId>
            <version>${imageio-ext.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>it.geosolutions.imageio-ext</groupId>
            <artifactId>imageio-ext-turbojpeg</artifactId>
            <version>${imageio-ext.version}</version>
            <scope>runtime</scope>
        </dependency>

        <!--Nico Ribot: 30 jan 2015. For JTreeTable : Datastore list of layers:--> 
        <dependency>
            <groupId>uk.gov.nationalarchives.thirdparty.netbeans</groupId>
            <artifactId>org-netbeans-swing-outline</artifactId>
            <version>7.2</version>
        </dependency>
        <dependency>
          <groupId>com.googlecode.json-simple</groupId>
          <artifactId>json-simple</artifactId>
          <version>1.1.1</version>
          <exclusions>
            <!-- ignore weird junit scope compile inclusion -->
            <exclusion>
              <groupId>*</groupId>
              <artifactId>junit</artifactId>
            </exclusion>
          </exclusions>
        </dependency>
    </dependencies>
</project>
