c6379c04f6
- ${revision}-Property im Parent-POM eingeführt; alle Kind-POM-<parent>-Blöcke
verwenden ${revision} statt hartkodierter Version
- flatten-maven-plugin 1.6.0 in <build><plugins> des Parent-POM aktiviert
(resolveCiFriendliesOnly), sodass installierte POMs keine unaufgelösten
${revision}-Referenzen enthalten
- MANIFEST.MF des Shade-JARs enthält Implementation-Version und Implementation-Title
- app.version im Packaging-Modul auf ${revision} umgestellt (war 2.5.0)
- ApplicationVersionProvider: neue Utility-Klasse im Bootstrap-Modul liest
Implementation-Version aus MANIFEST.MF, Fallback "dev" bei ungepacktem Betrieb
- ApplicationVersionProviderTest: prüft Fallback-Verhalten im Testlauf
- .gitignore: .flattened-pom.xml-Dateien ausgeschlossen
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
168 lines
5.8 KiB
XML
168 lines
5.8 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
<parent>
|
|
<groupId>de.gecheckt</groupId>
|
|
<artifactId>pdf-umbenenner-parent</artifactId>
|
|
<version>${revision}</version>
|
|
</parent>
|
|
<artifactId>pdf-umbenenner-packaging</artifactId>
|
|
<packaging>pom</packaging>
|
|
|
|
<!--
|
|
Kapselt das native Windows-Installer-Packaging (MSI).
|
|
Im Normalbuild (ohne Profil) erzeugt dieses Modul kein Artefakt und
|
|
fuehrt keine Plugin-Ausfuehrungen jenseits der geerbten Grundkonfiguration aus.
|
|
Der eigentliche Installer-Build wird ueber das Profil "release" aktiviert und
|
|
benoetigt auf der Entwicklungsmaschine zusaetzlich das WiX Toolset 3.x im PATH.
|
|
-->
|
|
|
|
<properties>
|
|
<!--
|
|
Anwendungsversion des erzeugten Windows-Installers. Wird direkt aus ${revision}
|
|
abgeleitet, damit Installer-Version und JAR-Version konsistent sind.
|
|
Beim Release-Build: -Drevision=MAJOR.MINOR.BUILD_NUMBER
|
|
-->
|
|
<app.version>${revision}</app.version>
|
|
</properties>
|
|
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>de.gecheckt</groupId>
|
|
<artifactId>pdf-umbenenner-bootstrap</artifactId>
|
|
<version>${project.version}</version>
|
|
<scope>runtime</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<profiles>
|
|
<profile>
|
|
<id>release</id>
|
|
<build>
|
|
<plugins>
|
|
<!--
|
|
Kopiert das Shade-JAR aus dem Bootstrap-Modul in das jpackage-Eingabeverzeichnis.
|
|
jpackage erwartet genau ein Verzeichnis, das das selbstausfuehrbare JAR enthaelt.
|
|
-->
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-dependency-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>copy-shade-jar</id>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>copy-dependencies</goal>
|
|
</goals>
|
|
<configuration>
|
|
<includeArtifactIds>pdf-umbenenner-bootstrap</includeArtifactIds>
|
|
<outputDirectory>${project.build.directory}/jpackage-input</outputDirectory>
|
|
<stripVersion>false</stripVersion>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<!--
|
|
Erzeugt den nativen Windows-Installer (MSI) ueber jpackage.
|
|
Die Modulliste wurde auf Basis von `jdeps` (print-module-deps) auf dem
|
|
Shade-JAR ermittelt und um die zur Laufzeit reflektiv genutzten Module
|
|
java.logging (Log4j2-Bridge) und java.xml (FXML/XML-Parsing) erweitert.
|
|
WiX Toolset 3.x muss im PATH verfuegbar sein (nur auf der Entwicklungsmaschine).
|
|
-->
|
|
<plugin>
|
|
<groupId>org.panteleyev</groupId>
|
|
<artifactId>jpackage-maven-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>create-installer</id>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>jpackage</goal>
|
|
</goals>
|
|
<configuration>
|
|
<type>MSI</type>
|
|
<name>PDF-KI-Renamer</name>
|
|
<appVersion>${app.version}</appVersion>
|
|
<vendor>gecheckt.de</vendor>
|
|
<input>${project.build.directory}/jpackage-input</input>
|
|
<mainJar>pdf-umbenenner-bootstrap-${project.version}.jar</mainJar>
|
|
<mainClass>de.gecheckt.pdf.umbenenner.bootstrap.PdfUmbenennerApplication</mainClass>
|
|
<destination>${project.build.directory}/dist</destination>
|
|
<icon>${project.basedir}/src/main/packaging/icon.ico</icon>
|
|
<!--
|
|
Bindet die Beispiel-Konfiguration als zusaetzliche Datei in das
|
|
Anwendungs-Image ein. Sie landet neben den ausgelieferten JAR-Artefakten
|
|
im Installationsverzeichnis und muss vom Betreiber nach
|
|
C:\ProgramData\PDF KI Renamer\config\ kopiert und angepasst werden.
|
|
-->
|
|
<appContent>
|
|
<appContent>src/main/packaging/application.example.properties</appContent>
|
|
</appContent>
|
|
<addModules>
|
|
<module>java.base</module>
|
|
<module>java.compiler</module>
|
|
<module>java.desktop</module>
|
|
<module>java.logging</module>
|
|
<module>java.management</module>
|
|
<module>java.naming</module>
|
|
<module>java.net.http</module>
|
|
<module>java.rmi</module>
|
|
<module>java.scripting</module>
|
|
<module>java.sql</module>
|
|
<module>java.xml</module>
|
|
<module>jdk.jfr</module>
|
|
<module>jdk.unsupported</module>
|
|
</addModules>
|
|
<javaOptions>
|
|
<javaOption>-Xms64m</javaOption>
|
|
<javaOption>-Xmx512m</javaOption>
|
|
</javaOptions>
|
|
<winConsole>false</winConsole>
|
|
<winShortcut>true</winShortcut>
|
|
<winMenu>true</winMenu>
|
|
<winMenuGroup>PDF KI Renamer</winMenuGroup>
|
|
<winDirChooser>true</winDirChooser>
|
|
<winShortcutPrompt>false</winShortcutPrompt>
|
|
<installDir>PDF KI Renamer</installDir>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<!--
|
|
Kopiert die beiden Start-Batch-Dateien direkt in das EXE-Ausgabeverzeichnis,
|
|
damit sie gleichrangig neben dem erzeugten Anwendungsverzeichnis liegen.
|
|
-->
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-resources-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>copy-batch-files</id>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>copy-resources</goal>
|
|
</goals>
|
|
<configuration>
|
|
<outputDirectory>${project.build.directory}/dist</outputDirectory>
|
|
<resources>
|
|
<resource>
|
|
<directory>src/main/packaging</directory>
|
|
<includes>
|
|
<include>*.bat</include>
|
|
</includes>
|
|
</resource>
|
|
</resources>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
</profiles>
|
|
</project>
|