-
Notifications
You must be signed in to change notification settings - Fork 0
/
pom.xml
371 lines (358 loc) · 17.2 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
<?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>at.nirostar_labs</groupId>
<artifactId>m4a_merge</artifactId>
<version>0.1-SNAPSHOT</version>
<!-- This description text is included in the Windows installer by default, see win-jpackage.txt -->
<description>This is a small app to merge audio book chapters</description>
<properties>
<!-- Set this to the class with the main method for your application -->
<main-class>at.nirostar_labs.m4a_merge.Main</main-class>
<!-- Change your app's name to something interesting... but you might want to avoid spaces
just to safe for compatibility across operating systems. -->
<app.name>m4aMerge</app.name>
<!-- This converts the build timestamp to a Windows-installer friendly version number (minute level resolution).
Note that Maven generated timestamp is in UTC, not local time. For more information see:
https://docs.microsoft.com/en-us/windows/win32/msi/productversion
https://docs.oracle.com/en/java/javase/15/docs/api/java.base/java/text/SimpleDateFormat.html
-->
<maven.build.timestamp.format>yy.w.ukkmm</maven.build.timestamp.format>
<app.version>${maven.build.timestamp}</app.version>
<!-- This property is used to specify the modules included in the (custom) JVM image. -->
<!-- Reminder: javafx.web (the embedded browser component) is not included in this project by default due
to GitHub template size restrictions. You can download the full SDK from https://openjfx.io -->
<jvm.modules>javafx.controls,javafx.fxml,javafx.media,java.logging,java.desktop</jvm.modules>
<!-- Set the project to UTF-8, avoiding warnings in the build logs -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>16</maven.compiler.source>
<maven.compiler.target>16</maven.compiler.target>
<!-- Used to set both the path to find the JavaFX modules and also the versions for Maven dependencies -->
<javafx.version>16</javafx.version>
<!-- Replace this UUID with a custom one for your project. This ID is used by the Windows installer system
to know that an installer is intended to replace/upgrade an earlier version. The easiest thing to do is
grab a unique UUID via https://www.uuidgenerator.net -->
<windows.upgrade.uuid>1b69ec01-ce8a-4b54-b600-031d1bf1e3f6</windows.upgrade.uuid>
<!-- This is used to set many user-visible fields in the Windows Installer. See win-jpackage.txt -->
<windows.vendor>nirostar-labs</windows.vendor>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org/jaudiotagger -->
<dependency>
<groupId>org</groupId>
<artifactId>jaudiotagger</artifactId>
<version>2.0.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.jcodec/jcodec -->
<dependency>
<groupId>org.jcodec</groupId>
<artifactId>jcodec</artifactId>
<version>0.2.6-SNAPSHOT</version>
</dependency>
<!--Needed for scripting in chapter names-->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.9</version>
</dependency>
<dependency>
<groupId>org.openjdk.nashorn</groupId>
<artifactId>nashorn-core</artifactId>
<version>15.3</version>
</dependency>
<!-- This downloads the platform specific JavaFX libraries used by the project. -->
<!-- For the final installable, the JavaFX dependencies are provided via modules, but by including these here
they work nicely with with IDEs and other Maven plugins (e.g. the javafx:run). -->
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-base</artifactId>
<version>${javafx.version}</version>
<classifier>${platform}</classifier>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>${javafx.version}</version>
<classifier>${platform}</classifier>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId>
<version>${javafx.version}</version>
<classifier>${platform}</classifier>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>${javafx.version}</version>
<classifier>${platform}</classifier>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-media</artifactId>
<version>${javafx.version}</version>
<classifier>${platform}</classifier>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<!-- Here we are processing the platform-specific jpackage command files, adding in Maven
properties for configuration. -->
<directory>${project.basedir}/src/packaging</directory>
<filtering>true</filtering>
<targetPath>${project.build.directory}/packaging</targetPath>
</resource>
<!-- Add the default resource path back in - by overriding above it disables the default -->
<resource>
<directory>${project.basedir}/src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<configuration>
<!-- This is an app, so we don't want to install it in the local Maven repository -->
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<!-- This copies all of the jar files declared by the Maven build into a single directory.
This makes it easy to assemble the final installer package -->
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<!-- The JavaFX libraries are bundled into the custom JVM, so we don't want to duplicate
them in the bundled app and installer. This command skips all of the JavaFX by groupId. -->
<excludeGroupIds>org.openjfx</excludeGroupIds>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!-- Put the application jar generated by the project into the dependency folder - the default folder
for the maven-dependency-plugin output. -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<outputDirectory>${project.build.directory}/dependency</outputDirectory>
</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>
<!-- https://github.com/wiverson/jtoolprovider-plugin -->
<groupId>io.github.wiverson</groupId>
<artifactId>jtoolprovider-plugin</artifactId>
<version>1.0.34</version>
<executions>
<!-- This command runs jlink, generating a custom JVM by combining the JavaFX modules bundled in
this project with the JDK modules. -->
<execution>
<id>jlink</id>
<phase>package</phase>
<goals>
<goal>java-tool</goal>
</goals>
<configuration>
<toolName>jlink</toolName>
<removeDirectories>${project.build.directory}/jvm-image/</removeDirectories>
<modulePath>${project.basedir}/${platform}-javafx/javafx-jmods-${javafx.version}/
</modulePath>
<addModules>${jvm.modules}</addModules>
<output>${project.build.directory}/jvm-image</output>
<args>
<arg>--no-header-files</arg>
<arg>--strip-debug</arg>
<arg>--no-man-pages</arg>
<arg>--compress=2</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.
https://github.com/wiverson/jtoolprovider-plugin/blob/main/java-tool-doc.md
-->
<execution>
<id>jpackage</id>
<phase>install</phase>
<goals>
<goal>java-tool</goal>
</goals>
<configuration>
<toolName>jpackage</toolName>
<removeDirectories>${project.build.directory}/installer-work</removeDirectories>
<args>@${project.build.directory}/packaging/${platform}-jpackage.txt</args>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>3.0.0-M1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</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-resources-plugin</artifactId>
<version>3.2.0</version>
</plugin>
<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-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<reporting>
<plugins>
<!-- http://mojo.codehaus.org/versions-maven-plugin/version-rules.html -->
<!-- This plugin is a utility to find outdated dependencies in your project. Just run mvn site and
the resulting HTML reports in target/site will let you know what plugins and dependencies are out of date.
-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.8.1</version>
<reportSets>
<reportSet>
<reports>
<report>dependency-updates-report</report>
<report>plugin-updates-report</report>
<report>property-updates-report</report>
</reports>
</reportSet>
</reportSets>
<configuration>
<processDependencyManagementTransitive>false</processDependencyManagementTransitive>
</configuration>
</plugin>
</plugins>
</reporting>
<profiles>
<!-- 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.
It would be great if Maven automatically added the os family as a property by default
-->
<profile>
<id>unix-active</id>
<activation>
<os>
<family>unix</family>
</os>
</activation>
<properties>
<platform>linux</platform>
</properties>
</profile>
<profile>
<id>windows-active</id>
<activation>
<os>
<family>windows</family>
</os>
</activation>
<properties>
<platform>win</platform>
</properties>
<build>
<plugins>
<plugin>
<!-- This adds a "launch on finish" to the Windows msi installer. This just tweaks the Windows
installer package to run the executable after the installer runs, simplifying the user experience.
If you don't want this behavior, just delete this plug execution. -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<phase>install</phase>
<id>add-launch-to-msi</id>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>cscript</executable>
<outputFile>${project.build.directory}/msi-result.log</outputFile>
<workingDirectory>${project.build.directory}</workingDirectory>
<arguments>
<argument>${project.build.directory}/packaging/add-launch-to-msi.js</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>mac-active</id>
<activation>
<os>
<family>mac</family>
</os>
</activation>
<properties>
<platform>mac</platform>
</properties>
</profile>
</profiles>
</project>