-
Notifications
You must be signed in to change notification settings - Fork 0
/
pom.xml
235 lines (221 loc) · 9.68 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
<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>de.skymatic.javafxtest</groupId>
<artifactId>javafx-helloworld</artifactId>
<version>1.2.0</version>
<organization>
<name>Skymatic</name>
<url>https://skymatic.de</url>
</organization>
<name>JavaFX Hello World Example</name>
<description>A JavaFX demo application for testing purpose.</description>
<url>https://github.com/skymatic/javafx-helloworld</url>
<scm>
<connection>scm:git:[email protected]:skymatic/javafx-helloworld.git</connection>
<developerConnection>scm:git:[email protected]:skymatic/javafx-helloworld.git</developerConnection>
<url>[email protected]:skymatic/javafx-helloworld.git</url>
</scm>
<developers>
<developer>
<name>Armin Schrenk</name>
<email>[email protected]</email>
<timezone>+1</timezone>
</developer>
</developers>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jdk.version>21</jdk.version>
<java.jpms.modulename>de.skymatic.javafxtest</java.jpms.modulename>
<!-- build dependencies -->
<javafx.version>21.0.1</javafx.version>
<!-- maven plugins -->
<mvn-compiler.version>3.11.0</mvn-compiler.version>
<mvn-jar.version>3.3.0</mvn-jar.version>
<mvn-dependency.version>3.6.1</mvn-dependency.version>
<mvn-resources.version>3.3.1</mvn-resources.version>
<mvn-exec.version>3.1.1</mvn-exec.version>
<mvn-assembly.version>3.6.0</mvn-assembly.version>
<mvn-javafx.version>0.0.8</mvn-javafx.version>
</properties>
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>${javafx.version}</version>
</dependency>
</dependencies>
<profiles>
<profile>
<id>windows</id>
<activation>
<os>
<family>windows</family>
</os>
</activation>
<properties>
<assembly.artifact.name>win</assembly.artifact.name>
</properties>
</profile>
<profile>
<id>linux</id>
<activation>
<os>
<family>unix</family>
<name>Linux</name>
</os>
</activation>
<properties>
<assembly.artifact.name>linux</assembly.artifact.name>
</properties>
</profile>
<profile>
<id>mac</id>
<activation>
<os>
<family>mac</family>
</os>
</activation>
<properties>
<assembly.artifact.name>mac</assembly.artifact.name>
</properties>
</profile>
</profiles>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${mvn-compiler.version}</version>
<configuration>
<release>${jdk.version}</release>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${mvn-jar.version}</version>
<configuration>
<archive>
<manifest>
<!-- adds Implementation-Version which can be read during runtime -->
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<mainClass>de.skymatic.javafxtest.App</mainClass>
</manifest>
</archive>
<outputDirectory>${project.build.directory}/libs</outputDirectory>
</configuration>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>${mvn-dependency.version}</version>
<executions>
<execution>
<id>copy-libs</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/libs</outputDirectory>
<excludeArtifactIds>java-utils</excludeArtifactIds>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${mvn-exec.version}</version>
<executions>
<execution>
<id>jlink</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${env.JAVA_HOME}/bin/jlink</executable>
<workingDirectory>${project.build.directory}</workingDirectory>
<commandlineArgs>--strip-debug --no-man-pages --no-header-files --compress=1 --module-path ./libs
--add-modules ${java.jpms.modulename} --output ./runtimeImage
</commandlineArgs>
</configuration>
</execution>
<execution>
<id>jpackage</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${env.JAVA_HOME}/bin/jpackage</executable>
<workingDirectory>${project.build.directory}</workingDirectory>
<!-- the maven assembly plugin depend on directory name, so be careful when changing it -->
<commandlineArgs>--name helloJavaFX --type app-image -m ${java.jpms.modulename}/${java.jpms.modulename}.App
--runtime-image runtimeImage --app-version ${project.version} --vendor "Skymatic GmbH"
--description "${project.description}" --icon ${project.basedir}/src/main/resources/skymatic.ico
</commandlineArgs>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>${mvn-resources.version}</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<resources>
<resource>
<directory>${project.basedir}/src/main/resources</directory>
<includes>
<include>version.txt</include>
<include>LICENSE.txt</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>${mvn-assembly.version}</version>
<executions>
<execution>
<id>assemble-buildkit</id>
<phase>install</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<!-- part of the descriptors depend on the jlink output -->
<descriptor>assembly-${assembly.artifact.name}.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
<finalName>helloJavaFX-${project.version}-${assembly.artifact.name}</finalName>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>${mvn-javafx.version}</version>
<configuration>
<mainClass>de.skymatic.javafxtest.App</mainClass>
</configuration>
</plugin>
</plugins>
</build>
</project>