| Matthias Andreas Benkard | b291c36 | 2020-11-22 10:22:27 +0100 | [diff] [blame] | 1 | <?xml version="1.0"?> |
| Matthias Andreas Benkard | 545aeb6 | 2020-12-06 15:16:22 +0100 | [diff] [blame] | 2 | <project |
| 3 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" |
| 4 | xmlns="http://maven.apache.org/POM/4.0.0" |
| 5 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
| Matthias Andreas Benkard | b291c36 | 2020-11-22 10:22:27 +0100 | [diff] [blame] | 6 | |
| 7 | <modelVersion>4.0.0</modelVersion> |
| 8 | |
| 9 | <groupId>eu.mulk</groupId> |
| 10 | <artifactId>aendggner</artifactId> |
| 11 | <version>${revision}</version> |
| 12 | |
| 13 | <properties> |
| 14 | <maven.compiler.parameters>true</maven.compiler.parameters> |
| Matthias Andreas Benkard | 1b9bfb1 | 2026-07-13 07:08:31 +0200 | [diff] [blame] | 15 | <maven.compiler.release>21</maven.compiler.release> |
| Matthias Andreas Benkard | b291c36 | 2020-11-22 10:22:27 +0100 | [diff] [blame] | 16 | |
| 17 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| 18 | <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
| 19 | |
| Matthias Andreas Benkard | 1b9bfb1 | 2026-07-13 07:08:31 +0200 | [diff] [blame] | 20 | <enforced.maven-version>3.9.0</enforced.maven-version> |
| Matthias Andreas Benkard | b291c36 | 2020-11-22 10:22:27 +0100 | [diff] [blame] | 21 | |
| Matthias Andreas Benkard | 2b1841e | 2026-08-15 10:51:11 +0200 | [diff] [blame] | 22 | <build-helper-plugin.version>3.6.0</build-helper-plugin.version> |
| Matthias Andreas Benkard | 1b9bfb1 | 2026-07-13 07:08:31 +0200 | [diff] [blame] | 23 | <compiler-plugin.version>3.15.0</compiler-plugin.version> |
| 24 | <dependency-plugin.version>3.11.0</dependency-plugin.version> |
| 25 | <enforcer-plugin.version>3.6.3</enforcer-plugin.version> |
| 26 | <exec-plugin.version>3.6.3</exec-plugin.version> |
| 27 | <jar-plugin.version>3.5.0</jar-plugin.version> |
| 28 | <resources-plugin.version>3.5.0</resources-plugin.version> |
| 29 | <spotless-plugin.version>3.8.0</spotless-plugin.version> |
| 30 | <surefire-plugin.version>3.5.6</surefire-plugin.version> |
| Matthias Andreas Benkard | b291c36 | 2020-11-22 10:22:27 +0100 | [diff] [blame] | 31 | |
| Matthias Andreas Benkard | 1b9bfb1 | 2026-07-13 07:08:31 +0200 | [diff] [blame] | 32 | <google.java.format.version>1.28.0</google.java.format.version> |
| 33 | |
| 34 | <assertj.version>3.27.7</assertj.version> |
| 35 | <java-diff-utils.version>4.17</java-diff-utils.version> |
| 36 | <jboss-logging.version>3.6.3.Final</jboss-logging.version> |
| Matthias Andreas Benkard | 2b1841e | 2026-08-15 10:51:11 +0200 | [diff] [blame] | 37 | <jzlib.version>1.1.5</jzlib.version> |
| Matthias Andreas Benkard | 1b9bfb1 | 2026-07-13 07:08:31 +0200 | [diff] [blame] | 38 | <jspecify.version>1.0.0</jspecify.version> |
| 39 | <junit.version>5.13.4</junit.version> |
| 40 | <pdfbox.version>3.0.8</pdfbox.version> |
| 41 | <picocli.version>4.7.7</picocli.version> |
| 42 | <slf4j.version>2.0.18</slf4j.version> |
| Matthias Andreas Benkard | b291c36 | 2020-11-22 10:22:27 +0100 | [diff] [blame] | 43 | </properties> |
| 44 | |
| Matthias Andreas Benkard | 1b9bfb1 | 2026-07-13 07:08:31 +0200 | [diff] [blame] | 45 | <dependencyManagement> |
| 46 | <dependencies> |
| 47 | <dependency> |
| 48 | <groupId>org.junit</groupId> |
| 49 | <artifactId>junit-bom</artifactId> |
| 50 | <version>${junit.version}</version> |
| 51 | <type>pom</type> |
| 52 | <scope>import</scope> |
| 53 | </dependency> |
| 54 | </dependencies> |
| 55 | </dependencyManagement> |
| 56 | |
| Matthias Andreas Benkard | b291c36 | 2020-11-22 10:22:27 +0100 | [diff] [blame] | 57 | <dependencies> |
| 58 | |
| 59 | <!-- Annotations --> |
| 60 | <dependency> |
| Matthias Andreas Benkard | 1b9bfb1 | 2026-07-13 07:08:31 +0200 | [diff] [blame] | 61 | <groupId>org.jspecify</groupId> |
| 62 | <artifactId>jspecify</artifactId> |
| 63 | <version>${jspecify.version}</version> |
| Matthias Andreas Benkard | b291c36 | 2020-11-22 10:22:27 +0100 | [diff] [blame] | 64 | </dependency> |
| 65 | |
| Matthias Andreas Benkard | 31a2c50 | 2020-11-22 14:36:27 +0100 | [diff] [blame] | 66 | <!-- Command line parsing --> |
| Matthias Andreas Benkard | b291c36 | 2020-11-22 10:22:27 +0100 | [diff] [blame] | 67 | <dependency> |
| 68 | <groupId>info.picocli</groupId> |
| 69 | <artifactId>picocli</artifactId> |
| 70 | <version>${picocli.version}</version> |
| 71 | </dependency> |
| 72 | |
| Matthias Andreas Benkard | 545aeb6 | 2020-12-06 15:16:22 +0100 | [diff] [blame] | 73 | <!-- Logging --> |
| 74 | <dependency> |
| 75 | <groupId>org.jboss.logging</groupId> |
| 76 | <artifactId>jboss-logging</artifactId> |
| 77 | <version>${jboss-logging.version}</version> |
| 78 | </dependency> |
| Matthias Andreas Benkard | 545aeb6 | 2020-12-06 15:16:22 +0100 | [diff] [blame] | 79 | <dependency> |
| 80 | <groupId>org.slf4j</groupId> |
| 81 | <artifactId>slf4j-jdk14</artifactId> |
| 82 | <version>${slf4j.version}</version> |
| 83 | </dependency> |
| 84 | <dependency> |
| 85 | <groupId>org.slf4j</groupId> |
| Matthias Andreas Benkard | 1b9bfb1 | 2026-07-13 07:08:31 +0200 | [diff] [blame] | 86 | <artifactId>jcl-over-slf4j</artifactId> |
| Matthias Andreas Benkard | 545aeb6 | 2020-12-06 15:16:22 +0100 | [diff] [blame] | 87 | <version>${slf4j.version}</version> |
| 88 | </dependency> |
| Matthias Andreas Benkard | 1b9bfb1 | 2026-07-13 07:08:31 +0200 | [diff] [blame] | 89 | |
| Matthias Andreas Benkard | 1b9bfb1 | 2026-07-13 07:08:31 +0200 | [diff] [blame] | 90 | <!-- PDF text extraction --> |
| Matthias Andreas Benkard | 31a2c50 | 2020-11-22 14:36:27 +0100 | [diff] [blame] | 91 | <dependency> |
| Matthias Andreas Benkard | 1b9bfb1 | 2026-07-13 07:08:31 +0200 | [diff] [blame] | 92 | <groupId>org.apache.pdfbox</groupId> |
| 93 | <artifactId>pdfbox</artifactId> |
| 94 | <version>${pdfbox.version}</version> |
| 95 | </dependency> |
| 96 | |
| 97 | <!-- Text diffing --> |
| 98 | <dependency> |
| 99 | <groupId>io.github.java-diff-utils</groupId> |
| 100 | <artifactId>java-diff-utils</artifactId> |
| 101 | <version>${java-diff-utils.version}</version> |
| 102 | </dependency> |
| 103 | |
| 104 | <!-- Testing --> |
| 105 | <dependency> |
| 106 | <groupId>org.junit.jupiter</groupId> |
| 107 | <artifactId>junit-jupiter</artifactId> |
| 108 | <scope>test</scope> |
| Matthias Andreas Benkard | 31a2c50 | 2020-11-22 14:36:27 +0100 | [diff] [blame] | 109 | </dependency> |
| 110 | <dependency> |
| Matthias Andreas Benkard | 1b9bfb1 | 2026-07-13 07:08:31 +0200 | [diff] [blame] | 111 | <groupId>org.assertj</groupId> |
| 112 | <artifactId>assertj-core</artifactId> |
| 113 | <version>${assertj.version}</version> |
| 114 | <scope>test</scope> |
| Matthias Andreas Benkard | 31a2c50 | 2020-11-22 14:36:27 +0100 | [diff] [blame] | 115 | </dependency> |
| 116 | |
| Matthias Andreas Benkard | b291c36 | 2020-11-22 10:22:27 +0100 | [diff] [blame] | 117 | </dependencies> |
| 118 | |
| 119 | <build> |
| 120 | |
| Matthias Andreas Benkard | 545aeb6 | 2020-12-06 15:16:22 +0100 | [diff] [blame] | 121 | <resources> |
| 122 | <resource> |
| 123 | <directory>src/main/resources</directory> |
| 124 | </resource> |
| 125 | </resources> |
| 126 | |
| Matthias Andreas Benkard | b291c36 | 2020-11-22 10:22:27 +0100 | [diff] [blame] | 127 | <pluginManagement> |
| 128 | <plugins> |
| 129 | |
| 130 | <plugin> |
| 131 | <groupId>org.codehaus.mojo</groupId> |
| 132 | <artifactId>versions-maven-plugin</artifactId> |
| 133 | <configuration> |
| 134 | <generateBackupPoms>false</generateBackupPoms> |
| 135 | </configuration> |
| 136 | </plugin> |
| 137 | |
| 138 | </plugins> |
| 139 | </pluginManagement> |
| 140 | |
| 141 | <plugins> |
| 142 | |
| 143 | <!-- Compiler --> |
| 144 | <plugin> |
| 145 | <artifactId>maven-compiler-plugin</artifactId> |
| 146 | <version>${compiler-plugin.version}</version> |
| Matthias Andreas Benkard | c7f1136 | 2020-11-22 15:01:07 +0100 | [diff] [blame] | 147 | <configuration> |
| 148 | <annotationProcessorPaths> |
| 149 | <path> |
| 150 | <groupId>info.picocli</groupId> |
| 151 | <artifactId>picocli-codegen</artifactId> |
| 152 | <version>${picocli.version}</version> |
| 153 | </path> |
| 154 | </annotationProcessorPaths> |
| 155 | <compilerArgs> |
| 156 | <arg>-Aproject=${project.groupId}/${project.artifactId}</arg> |
| 157 | </compilerArgs> |
| 158 | </configuration> |
| Matthias Andreas Benkard | b291c36 | 2020-11-22 10:22:27 +0100 | [diff] [blame] | 159 | </plugin> |
| 160 | |
| 161 | <!-- Resources --> |
| 162 | <plugin> |
| 163 | <artifactId>maven-resources-plugin</artifactId> |
| 164 | <version>${resources-plugin.version}</version> |
| 165 | </plugin> |
| 166 | |
| Matthias Andreas Benkard | 1b9bfb1 | 2026-07-13 07:08:31 +0200 | [diff] [blame] | 167 | <!-- Tests --> |
| 168 | <plugin> |
| 169 | <artifactId>maven-surefire-plugin</artifactId> |
| 170 | <version>${surefire-plugin.version}</version> |
| 171 | </plugin> |
| 172 | |
| Matthias Andreas Benkard | b291c36 | 2020-11-22 10:22:27 +0100 | [diff] [blame] | 173 | <!-- Google Java Code Formatter, for enforcing style conventions --> |
| 174 | <plugin> |
| 175 | <groupId>com.diffplug.spotless</groupId> |
| 176 | <artifactId>spotless-maven-plugin</artifactId> |
| 177 | <version>${spotless-plugin.version}</version> |
| 178 | <configuration> |
| 179 | <java> |
| 180 | <removeUnusedImports/> |
| 181 | <importOrder> |
| 182 | <order>java,javax,org,com,de,io,dagger,eu.mulk,</order> |
| 183 | </importOrder> |
| 184 | <googleJavaFormat> |
| 185 | <version>${google.java.format.version}</version> |
| 186 | <style>GOOGLE</style> |
| 187 | </googleJavaFormat> |
| 188 | </java> |
| 189 | </configuration> |
| 190 | </plugin> |
| 191 | |
| 192 | <plugin> |
| Matthias Andreas Benkard | b291c36 | 2020-11-22 10:22:27 +0100 | [diff] [blame] | 193 | <groupId>org.apache.maven.plugins</groupId> |
| 194 | <artifactId>maven-enforcer-plugin</artifactId> |
| 195 | <version>${enforcer-plugin.version}</version> |
| 196 | <executions> |
| 197 | <execution> |
| 198 | <id>enforce-maven</id> |
| 199 | <goals> |
| 200 | <goal>enforce</goal> |
| 201 | </goals> |
| 202 | <configuration> |
| 203 | <rules> |
| 204 | <requireMavenVersion> |
| 205 | <version>${enforced.maven-version}</version> |
| 206 | </requireMavenVersion> |
| 207 | </rules> |
| 208 | </configuration> |
| 209 | </execution> |
| 210 | </executions> |
| 211 | </plugin> |
| 212 | |
| 213 | <plugin> |
| 214 | <groupId>org.codehaus.mojo</groupId> |
| 215 | <artifactId>exec-maven-plugin</artifactId> |
| 216 | <version>${exec-plugin.version}</version> |
| 217 | <configuration> |
| 218 | <mainClass>eu.mulk.aendggner.AendGgner</mainClass> |
| 219 | </configuration> |
| 220 | </plugin> |
| 221 | |
| 222 | <plugin> |
| 223 | <groupId>org.apache.maven.plugins</groupId> |
| Matthias Andreas Benkard | c7f1136 | 2020-11-22 15:01:07 +0100 | [diff] [blame] | 224 | <artifactId>maven-dependency-plugin</artifactId> |
| Matthias Andreas Benkard | 1b9bfb1 | 2026-07-13 07:08:31 +0200 | [diff] [blame] | 225 | <version>${dependency-plugin.version}</version> |
| Matthias Andreas Benkard | b291c36 | 2020-11-22 10:22:27 +0100 | [diff] [blame] | 226 | <executions> |
| 227 | <execution> |
| Matthias Andreas Benkard | c7f1136 | 2020-11-22 15:01:07 +0100 | [diff] [blame] | 228 | <id>copy-dependencies</id> |
| 229 | <phase>prepare-package</phase> |
| Matthias Andreas Benkard | b291c36 | 2020-11-22 10:22:27 +0100 | [diff] [blame] | 230 | <goals> |
| Matthias Andreas Benkard | c7f1136 | 2020-11-22 15:01:07 +0100 | [diff] [blame] | 231 | <goal>copy-dependencies</goal> |
| Matthias Andreas Benkard | b291c36 | 2020-11-22 10:22:27 +0100 | [diff] [blame] | 232 | </goals> |
| 233 | <configuration> |
| Matthias Andreas Benkard | c7f1136 | 2020-11-22 15:01:07 +0100 | [diff] [blame] | 234 | <outputDirectory> |
| 235 | ${project.build.directory}/libs |
| 236 | </outputDirectory> |
| Matthias Andreas Benkard | 1b9bfb1 | 2026-07-13 07:08:31 +0200 | [diff] [blame] | 237 | <includeScope>runtime</includeScope> |
| Matthias Andreas Benkard | b291c36 | 2020-11-22 10:22:27 +0100 | [diff] [blame] | 238 | </configuration> |
| 239 | </execution> |
| 240 | </executions> |
| 241 | </plugin> |
| 242 | |
| Matthias Andreas Benkard | c7f1136 | 2020-11-22 15:01:07 +0100 | [diff] [blame] | 243 | <plugin> |
| 244 | <groupId>org.apache.maven.plugins</groupId> |
| 245 | <artifactId>maven-jar-plugin</artifactId> |
| Matthias Andreas Benkard | 1b9bfb1 | 2026-07-13 07:08:31 +0200 | [diff] [blame] | 246 | <version>${jar-plugin.version}</version> |
| Matthias Andreas Benkard | c7f1136 | 2020-11-22 15:01:07 +0100 | [diff] [blame] | 247 | <configuration> |
| 248 | <archive> |
| 249 | <manifest> |
| 250 | <addClasspath>true</addClasspath> |
| 251 | <classpathPrefix>libs/</classpathPrefix> |
| 252 | <mainClass> |
| 253 | eu.mulk.aendggner.AendGgner |
| 254 | </mainClass> |
| 255 | </manifest> |
| 256 | </archive> |
| 257 | </configuration> |
| 258 | </plugin> |
| 259 | |
| Matthias Andreas Benkard | b291c36 | 2020-11-22 10:22:27 +0100 | [diff] [blame] | 260 | </plugins> |
| 261 | |
| 262 | </build> |
| 263 | |
| Matthias Andreas Benkard | 2b1841e | 2026-08-15 10:51:11 +0200 | [diff] [blame] | 264 | <profiles> |
| 265 | |
| 266 | <!-- |
| 267 | Browserfassung: übersetzt dieselbe Pipeline mit GraalVM Web Image nach WebAssembly. |
| 268 | Ausdrücklich anzufordern (`-Pwasm`); der Standard-Build bleibt unberührt und braucht |
| 269 | kein GraalVM. |
| 270 | |
| 271 | Voraussetzung: Oracle GraalVM 25.1+ (Web Image ist dort enthalten, in der CE nicht): |
| 272 | |
| 273 | JAVA_HOME=/pfad/zu/oracle-graalvm ./mvnw -Pwasm package |
| 274 | |
| 275 | Ergebnis: target/web/ — aendggner.js, aendggner.js.wasm und die statischen Seiten. |
| 276 | --> |
| 277 | <profile> |
| 278 | <id>wasm</id> |
| 279 | |
| 280 | <properties> |
| 281 | <native-image.executable>${java.home}/bin/native-image</native-image.executable> |
| 282 | <wasm.output.directory>${project.build.directory}/web</wasm.output.directory> |
| 283 | <!-- |
| 284 | Die Option „release 21“ beschränkte den Modulpfad auf die dokumentierte JDK-API; die |
| 285 | Web-Image-API des GraalVM wäre damit unsichtbar. Deshalb hier source/target statt |
| 286 | release — übersetzt wird ohnehin nur mit dem GraalVM, gegen dessen eigene Klassen. |
| 287 | --> |
| 288 | <maven.compiler.release/> |
| 289 | <maven.compiler.source>21</maven.compiler.source> |
| 290 | <maven.compiler.target>21</maven.compiler.target> |
| 291 | </properties> |
| 292 | |
| 293 | <dependencies> |
| 294 | <!-- |
| 295 | Reines Java-zlib. Web Image bindet die nativen zlib-Funktionen des JDK nicht an |
| 296 | (GR-65205); ohne Inflate ist kein PDF lesbar. Siehe |
| 297 | src/wasm/java/.../InflaterErsatz.java. |
| 298 | --> |
| 299 | <dependency> |
| 300 | <groupId>org.jruby</groupId> |
| 301 | <artifactId>jzlib</artifactId> |
| 302 | <version>${jzlib.version}</version> |
| 303 | </dependency> |
| 304 | </dependencies> |
| 305 | |
| 306 | <build> |
| 307 | <plugins> |
| 308 | |
| 309 | <!-- Der Wasm-Quellbaum kommt nur in diesem Profil hinzu: Er braucht die |
| 310 | Web-Image-API und svm.jar, die es nur im GraalVM gibt. --> |
| 311 | <plugin> |
| 312 | <groupId>org.codehaus.mojo</groupId> |
| 313 | <artifactId>build-helper-maven-plugin</artifactId> |
| 314 | <version>${build-helper-plugin.version}</version> |
| 315 | <executions> |
| 316 | <execution> |
| 317 | <id>wasm-quellen</id> |
| 318 | <phase>generate-sources</phase> |
| 319 | <goals> |
| 320 | <goal>add-source</goal> |
| 321 | </goals> |
| 322 | <configuration> |
| 323 | <sources> |
| 324 | <source>src/wasm/java</source> |
| 325 | </sources> |
| 326 | </configuration> |
| 327 | </execution> |
| 328 | </executions> |
| 329 | </plugin> |
| 330 | |
| 331 | <plugin> |
| 332 | <artifactId>maven-compiler-plugin</artifactId> |
| 333 | <configuration> |
| 334 | <compilerArgs> |
| 335 | <arg>-Aproject=${project.groupId}/${project.artifactId}</arg> |
| 336 | <arg>--add-modules</arg> |
| 337 | <arg>org.graalvm.webimage.api</arg> |
| 338 | </compilerArgs> |
| 339 | <annotationProcessorPaths> |
| 340 | <path> |
| 341 | <groupId>info.picocli</groupId> |
| 342 | <artifactId>picocli-codegen</artifactId> |
| 343 | <version>${picocli.version}</version> |
| 344 | </path> |
| 345 | </annotationProcessorPaths> |
| 346 | </configuration> |
| 347 | </plugin> |
| 348 | |
| 349 | <plugin> |
| 350 | <artifactId>maven-resources-plugin</artifactId> |
| 351 | <executions> |
| 352 | <execution> |
| 353 | <id>statische-seiten</id> |
| 354 | <phase>package</phase> |
| 355 | <goals> |
| 356 | <goal>copy-resources</goal> |
| 357 | </goals> |
| 358 | <configuration> |
| 359 | <outputDirectory>${wasm.output.directory}</outputDirectory> |
| 360 | <resources> |
| 361 | <resource> |
| 362 | <directory>src/main/resources/eu/mulk/aendggner/web</directory> |
| 363 | </resource> |
| 364 | </resources> |
| 365 | </configuration> |
| 366 | </execution> |
| 367 | </executions> |
| 368 | </plugin> |
| 369 | |
| 370 | <plugin> |
| 371 | <groupId>org.codehaus.mojo</groupId> |
| 372 | <artifactId>exec-maven-plugin</artifactId> |
| 373 | <executions> |
| 374 | <execution> |
| 375 | <id>web-image</id> |
| 376 | <phase>package</phase> |
| 377 | <goals> |
| 378 | <goal>exec</goal> |
| 379 | </goals> |
| 380 | <configuration> |
| 381 | <executable>${native-image.executable}</executable> |
| 382 | <arguments> |
| 383 | <argument>--tool:svm-wasm</argument> |
| 384 | <!-- Der Textzwischenschritt (aendggner.js.wat) wird sonst mehrere hundert |
| 385 | Megabyte groß; auf die Größe des .wasm hat das keinen Einfluss. --> |
| 386 | <argument>-H:WasmComments=NONE</argument> |
| 387 | <argument>-classpath</argument> |
| 388 | <classpath/> |
| 389 | <argument>-o</argument> |
| 390 | <argument>${wasm.output.directory}/aendggner</argument> |
| 391 | <argument>eu.mulk.aendggner.wasm.BrowserMain</argument> |
| 392 | </arguments> |
| 393 | </configuration> |
| 394 | </execution> |
| 395 | </executions> |
| 396 | </plugin> |
| 397 | |
| 398 | </plugins> |
| 399 | </build> |
| 400 | </profile> |
| 401 | |
| 402 | </profiles> |
| 403 | |
| Matthias Andreas Benkard | b291c36 | 2020-11-22 10:22:27 +0100 | [diff] [blame] | 404 | </project> |