generated from wiverson/maven-jpackage-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpom.xml
749 lines (726 loc) · 37.7 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
<?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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>aduial</groupId>
<artifactId>ithildin</artifactId>
<version>0.2-SNAPSHOT</version>
<!-- <parent>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-parent</artifactId>-->
<!-- <version>2.4.3</version>-->
<!-- <relativePath/> <!– lookup parent from aduial.ithildin.repository –>-->
<!-- </parent>-->
<properties>
<main-class>aduial.ithildin.IthildinBootApplication</main-class>
<!-- This should be the . version of the project artifactId -->
<java-mod-name>ithildin</java-mod-name>
<!-- for using the IDE -->
<java.level>11</java.level>
<javafx.version>15.0.1</javafx.version>
<springboot.version>2.4.3</springboot.version>
<fxweaver.version>1.3.0</fxweaver.version>
<h2.version>1.4.200</h2.version>
<!-- These version numbers are used in both the macOS and Windows profiles -->
<javafx-mods-version>javafx-jmods-15.0.1</javafx-mods-version>
<javafx-libs-version>javafx-sdk-15.0.1</javafx-libs-version>
<javafx.libs>${project.basedir}/${platform}-javafx/${javafx-libs-version}/lib/</javafx.libs>
<javafx.mods>${project.basedir}/${platform}-javafx/${javafx-mods-version}/</javafx.mods>
<!-- These are the modules explicitly used by the project. You may want to add/remove if you
are using other modules. -->
<!-- <modules-in-use>javafx.base,javafx.controls,javafx.graphics,javafx.fxml,javafx.web,java.logging</modules-in-use>-->
<modules-in-use>javafx.controls,javafx.fxml,javafx.web</modules-in-use>
<!-- Eliminate warnings about UTF-8 in the build -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>${java.level}</maven.compiler.source>
<maven.compiler.target>${java.level}</maven.compiler.target>
<!-- This project uses the https://github.com/wiverson/jtoolprovider-plugin to invoke jdeps and jpackage -->
<jtoolprovider.version>1.0.25</jtoolprovider.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${springboot.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- using newer version because the included one gives an error while packaging -->
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>4.0.3</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${h2.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.rgielen</groupId>
<artifactId>javafx-weaver-spring-boot-starter</artifactId>
<version>${fxweaver.version}</version>
</dependency>
<!-- Base JavaFX import. This dependency is provided via a module, so we don't want it included in the
shaded master jar, but by including it here it it works nicely with IDEs such as IntelliJ. -->
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>${javafx.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>${javafx.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-web</artifactId>
<version>${javafx.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>${project.basedir}/src/packaging</directory>
<filtering>true</filtering>
<targetPath>${project.build.directory}/packaging</targetPath>
</resource>
</resources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.9.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.1.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.2</version>
</plugin>
<plugin>
<groupId>io.github.wiverson</groupId>
<artifactId>jtoolprovider-plugin</artifactId>
<version>${jtoolprovider.version}</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>3.0.0-M1</version>
<!-- This is an app, so we don't want to install it in the local Maven repository -->
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<release>${maven.compiler.target}</release>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.2</version>
<executions>
<execution>
<id>copy</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
</execution>
</executions>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<version>${springboot.version}</version>
</artifactItem>
<artifactItem>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<version>${springboot.version}</version>
</artifactItem>
<artifactItem>
<groupId>net.rgielen</groupId>
<artifactId>javafx-weaver-spring-boot-starter</artifactId>
<version>${fxweaver.version}</version>
</artifactItem>
<artifactItem>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.200</version>
</artifactItem>
<artifactItem>
<groupId>antlr</groupId>
<artifactId>antlr</artifactId>
<version>2.7.7</version>
</artifactItem>
<artifactItem>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.9.6</version>
</artifactItem>
<artifactItem>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<version>1.10.20</version>
</artifactItem>
<artifactItem>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
<version>1.10.20</version>
</artifactItem>
<artifactItem>
<groupId>com.fasterxml</groupId>
<artifactId>classmate</artifactId>
<version>1.5.1</version>
</artifactItem>
<artifactItem>
<groupId>org.dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>2.1.3</version>
</artifactItem>
<artifactItem>
<groupId>org.hibernate.common</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<version>5.1.2.Final</version>
</artifactItem>
<artifactItem>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.4.28.Final</version>
</artifactItem>
<artifactItem>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>4.0.3</version>
</artifactItem>
<artifactItem>
<groupId>com.sun.istack</groupId>
<artifactId>istack-commons-runtime</artifactId>
<version>3.0.11</version>
</artifactItem>
<artifactItem>
<groupId>com.sun.activation</groupId>
<artifactId>jakarta.activation</artifactId>
<version>1.2.2</version>
</artifactItem>
<artifactItem>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<version>1.3.5</version>
</artifactItem>
<artifactItem>
<groupId>jakarta.persistence</groupId>
<artifactId>jakarta.persistence-api</artifactId>
<version>2.2.3</version>
</artifactItem>
<artifactItem>
<groupId>jakarta.transaction</groupId>
<artifactId>jakarta.transaction-api</artifactId>
<version>1.3.3</version>
</artifactItem>
<artifactItem>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>2.3.3</version>
</artifactItem>
<artifactItem>
<groupId>org.jboss</groupId>
<artifactId>jandex</artifactId>
<version>2.2.3.Final</version>
</artifactItem>
<artifactItem>
<groupId>net.rgielen</groupId>
<artifactId>javafx-weaver-core</artifactId>
<version>1.3.0</version>
<destFileName>javafx-weaver-core.jar</destFileName>
</artifactItem>
<artifactItem>
<groupId>net.rgielen</groupId>
<artifactId>javafx-weaver-spring</artifactId>
<version>1.3.0</version>
</artifactItem>
<artifactItem>
<groupId>net.rgielen</groupId>
<artifactId>javafx-weaver-spring-boot-autoconfigure</artifactId>
<version>1.3.0</version>
</artifactItem>
<artifactItem>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.27.0-GA</version>
</artifactItem>
<artifactItem>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>2.3.3</version>
</artifactItem>
<artifactItem>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
<version>3.4.1.Final</version>
</artifactItem>
<artifactItem>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
<version>1.7.30</version>
</artifactItem>
<artifactItem>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.13.3</version>
</artifactItem>
<artifactItem>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
<version>2.13.3</version>
</artifactItem>
<artifactItem>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.3</version>
<!-- <scope>test</scope>-->
</artifactItem>
<artifactItem>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.2.3</version>
</artifactItem>
<artifactItem>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.30</version>
</artifactItem>
<artifactItem>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.27</version>
</artifactItem>
<artifactItem>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>5.3.4</version>
</artifactItem>
<artifactItem>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
<version>5.3.4</version>
</artifactItem>
<artifactItem>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>5.3.4</version>
</artifactItem>
<artifactItem>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
<version>2.4.3</version>
</artifactItem>
<artifactItem>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<version>2.4.3</version>
</artifactItem>
<artifactItem>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
<version>2.4.3</version>
</artifactItem>
<artifactItem>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
<version>2.4.3</version>
</artifactItem>
<artifactItem>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
<version>2.4.3</version>
</artifactItem>
<artifactItem>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.3.4</version>
</artifactItem>
<artifactItem>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>5.3.4</version>
</artifactItem>
<artifactItem>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
<version>2.4.5</version>
</artifactItem>
<artifactItem>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>2.4.5</version>
</artifactItem>
<artifactItem>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
<version>5.3.4</version>
</artifactItem>
<artifactItem>
<groupId>org.springframework</groupId>
<artifactId>spring-jcl</artifactId>
<version>5.3.4</version>
</artifactItem>
<artifactItem>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>5.3.4</version>
</artifactItem>
<artifactItem>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>5.3.4</version>
</artifactItem>
<artifactItem>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>5.3.4</version>
</artifactItem>
<artifactItem>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>txw2</artifactId>
<version>2.3.3</version>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/module-jars</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</plugin>
<plugin>
<!-- Plugin to make working with JavaFX nicer. See https://github.com/openjfx/javafx-maven-plugin -->
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.5</version>
<configuration>
<mainClass>${main-class}</mainClass>
</configuration>
</plugin>
<plugin>
<!-- The shade plugin is used to generate a merged JAR, which in turn is analyzed to sort out
dependencies. It's not actually used to generate an executable JAR, as you might see in other
projects. -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<configuration>
<finalName>${project.artifactId}</finalName>
<!-- Use this section to filter out items by artifactId from the shaded jar. Here we are excluding
the JavaFX SDK - those will be added in as platform-specific libraries later. You would do something
similar for other artifacts that would be supplied as modules. -->
<artifactSet>
<excludes>
<exclude>org.openjfx:javafx-base</exclude>
<exclude>org.openjfx:javafx-controls</exclude>
<exclude>org.openjfx:javafx-fxml</exclude>
<exclude>org.openjfx:javafx-graphics</exclude>
<exclude>org.openjfx:javafx-media</exclude>
<exclude>org.openjfx:javafx-swing</exclude>
<exclude>org.openjfx:javafx-web</exclude>
<exclude>net.rgielen:javafx-weaver-core</exclude>
<exclude>net.rgielen:javafx-weaver-spring-boot-starter</exclude>
<exclude>net.rgielen:javafx-weaver-spring</exclude>
<exclude>net.rgielen:javafx-weaver-spring-boot-autoconfigure</exclude>
<exclude>com.h2database:h2</exclude>
<exclude>antlr:antlr</exclude>
<exclude>org.aspectj:aspectjweaver</exclude>
<exclude>net.bytebuddy:byte-buddy</exclude>
<exclude>net.bytebuddy:byte-buddy-agent</exclude>
<exclude>com.fasterxml:classmate</exclude>
<exclude>org.dom4j:dom4j</exclude>
<exclude>org.hibernate.common:hibernate-commons-annotations</exclude>
<exclude>org.hibernate:hibernate-core</exclude>
<exclude>com.zaxxer:HikariCP</exclude>
<exclude>com.sun.istack:istack-commons-runtime</exclude>
<exclude>com.sun.activation:jakarta.activation</exclude>
<exclude>jakarta.annotation:jakarta.annotation-api</exclude>
<exclude>jakarta.persistence:jakarta.persistence-api</exclude>
<exclude>jakarta.transaction:jakarta.transaction-api</exclude>
<exclude>jakarta.xml.bind:jakarta.xml.bind-api</exclude>
<exclude>org.jboss:jandex</exclude>
<exclude>org.javassist:javassist</exclude>
<exclude>org.glassfish.jaxb:jaxb-runtime</exclude>
<exclude>org.jboss.logging:jboss-logging</exclude>
<exclude>org.slf4j:jul-to-slf4j</exclude>
<exclude>org.apache.logging.log4j:log4j-api</exclude>
<exclude>org.apache.logging.log4j:log4j-to-slf4j</exclude>
<exclude>ch.qos.logback:logback-classic</exclude>
<exclude>ch.qos.logback:logback-core</exclude>
<exclude>org.slf4j:slf4j-api</exclude>
<exclude>org.yaml:snakeyaml</exclude>
<exclude>org.springframework:spring-aop</exclude>
<exclude>org.springframework:spring-aspects</exclude>
<exclude>org.springframework:spring-beans</exclude>
<exclude>org.springframework.boot:spring-boot</exclude>
<exclude>org.springframework.boot:spring-boot-starter</exclude>
<exclude>org.springframework.boot:spring-boot-starter-data-jpa</exclude>
<exclude>org.springframework.boot:spring-boot-autoconfigure</exclude>
<exclude>org.springframework.boot:spring-boot-starter-aop</exclude>
<exclude>org.springframework.boot:spring-boot-starter-jdbc</exclude>
<exclude>org.springframework.boot:spring-boot-starter-logging</exclude>
<exclude>org.springframework:spring-context</exclude>
<exclude>org.springframework:spring-core</exclude>
<exclude>org.springframework.data:spring-data-commons</exclude>
<exclude>org.springframework.data:spring-data-jpa</exclude>
<exclude>org.springframework:spring-expression</exclude>
<exclude>org.springframework:spring-jcl</exclude>
<exclude>org.springframework:spring-jdbc</exclude>
<exclude>org.springframework:spring-orm</exclude>
<exclude>org.springframework:spring-tx</exclude>
<exclude>org.glassfish.jaxb:txw2</exclude>
</excludes>
</artifactSet>
<!-- Use this section to filter out items by file name from the shaded jar. Here we are excluding
any module information and manifest data from the shaded jar - they would be incorrect and/or
duplicates given our shaded jar strategy. -->
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>**/module-info.java</exclude>
<exclude>**/module-info.class</exclude>
<exclude>module-info.java</exclude>
<exclude>module-info.class</exclude>
<exclude>META-INF/*.MF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<outputDirectory>${project.build.directory}/shaded-jar/</outputDirectory>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.0.0</version>
<!-- We use the Ant task here to unzip the shaded jar, which we then pass to make jdeps later. -->
<executions>
<execution>
<id>prepare</id>
<phase>package</phase>
<configuration>
<target>
<unzip src="target/shaded-jar/${project.artifactId}.jar"
dest="target/unpacked-shade/"/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<!-- https://github.com/wiverson/jtoolprovider-plugin -->
<groupId>io.github.wiverson</groupId>
<artifactId>jtoolprovider-plugin</artifactId>
<version>${jtoolprovider.version}</version>
<executions>
<!-- We use the jdeps tool here on the exploded directory to automatically generate a module-info.java
file for the entire shaded jar. You'll notice that we are explicitly passing in the JavaFX modules here -
you may want to tweak this as you use (or don't use) different modules. The smaller the set of modules,
the smaller the final app will be.
-->
<execution>
<id>jdeps</id>
<phase>package</phase>
<goals>
<goal>java-tool</goal>
</goals>
<configuration>
<toolName>jdeps</toolName>
<!-- <modulePath>${javafx.libs}</modulePath>-->
<modulePath>${project.build.directory}/module-jars:${java.home}/jmods/:${project.build.directory}/modules/:${javafx.libs}</modulePath>
<addModules>javafx.controls,javafx.fxml,javafx.web</addModules>
<!-- <addModules>javafx.base,javafx.controls,javafx.graphics,javafx.fxml,javafx.web,java.logging</addModules>-->
<generateModuleInfo>${project.build.directory}/work</generateModuleInfo>
<multiRelease>11</multiRelease>
<args>
<arg>${project.build.directory}/shaded-jar/${project.artifactId}.jar</arg>
</args>
</configuration>
</execution>
<!-- The command that actually generates the installer. The options for each platform
are found the /src/packaging directory. These files are copied into the target directory by
the Maven resources plugin, which does the filtering to replace the original values with
the actual Maven properties.
-->
<execution>
<id>jpackage</id>
<phase>install</phase>
<goals>
<goal>java-tool</goal>
</goals>
<configuration>
<toolName>jpackage</toolName>
<args>@${project.build.directory}/packaging/${platform}-jpackage.txt</args>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!-- This plugin compiles and attaches the generated module-info back to the shaded jar -
now we have everything we need to start generating an installer! -->
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
<version>1.0.0.RC1</version>
<executions>
<execution>
<id>add-module-infos</id>
<phase>package</phase>
<goals>
<goal>add-module-info</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/modules</outputDirectory>
<overwriteExistingFiles>true</overwriteExistingFiles>
<modules>
<module>
<file>${project.build.directory}/shaded-jar/${project.artifactId}.jar</file>
<moduleInfoFile>${project.build.directory}/work/${java-mod-name}/versions/11/module-info.java
</moduleInfoFile>
</module>
</modules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>add-jlink-package</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>io.github.wiverson</groupId>
<artifactId>jtoolprovider-plugin</artifactId>
<version>${jtoolprovider.version}</version>
<!-- jlink here generates an image and launcher for your app, but does not wrap it
with an installer (like jpackage). This execution is not run by default - if you are using
jpackage, it's calling jlink for you anyways, so this would just make the build slower.
It's bound to the verify goal to make sure all of the other plugins run first instead.
From a purist, it would probably make more sense to bind this to install (like jpackage is),
but by putting this on verify it means that you can quickly flip back and forth between
jlink builds (in IntelliJ) and jpackage builds (via command-line Maven runner).
-->
<executions>
<execution>
<id>jlink</id>
<phase>verify</phase>
<goals>
<goal>java-tool</goal>
</goals>
<configuration>
<toolName>jlink</toolName>
<modulePath>${project.build.directory}/module-jars:${java.home}/jmods/:${project.build.directory}/modules/:${javafx.mods}
</modulePath>
<addModules>${java-mod-name},${modules-in-use}</addModules>
<launcher>${project.artifactId}=${java-mod-name}/${main-class}</launcher>
<output>${project.build.directory}/jlink-image</output>
<args>
<arg>--strip-debug</arg>
<arg>--no-header-files</arg>
<arg>--no-man-pages</arg>
<arg>--compress=2</arg>
</args>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- We use the built-in Maven profile activation system to set the platform property.
These properties are then use to build the directory paths to the platform specific resources.
-->
<profile>
<id>unix-active</id>
<activation>
<os>
<family>unix</family>
</os>
</activation>
<properties>
<platform>unix</platform>
</properties>
</profile>
<profile>
<id>windows-active</id>
<activation>
<os>
<family>windows</family>
</os>
</activation>
<properties>
<platform>windows</platform>
</properties>
</profile>
<profile>
<id>mac-active</id>
<activation>
<os>
<family>mac</family>
</os>
</activation>
<properties>
<platform>mac</platform>
</properties>
</profile>
</profiles>
</project>