Repository navigation
Expand file tree
/
Copy pathpom.xml
More file actions
275 lines (261 loc) · 12.3 KB
/
Copy pathpom.xml
File metadata and controls
275 lines (261 loc) · 12.3 KB
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
<?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>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>4.0.3</version>
<relativePath/>
</parent>
<groupId>net.timafe.triptale</groupId>
<artifactId>triptale</artifactId>
<version>0.1.0-SNAPSHOT</version>
<name>TripTale</name>
<description>Offline-first cycling and hiking trip diary with git sync</description>
<properties>
<java.version>25</java.version>
<maven.compiler.source>25</maven.compiler.source>
<maven.compiler.target>25</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<javafx.version>23.0.1</javafx.version>
<jgit.version>7.0.0.202409031743-r</jgit.version>
<commonmark.version>0.29.0</commonmark.version>
<metadata-extractor.version>2.19.0</metadata-extractor.version>
<git-commit-id.version>9.0.1</git-commit-id.version>
<!-- Launcher, not TripTaleApplication: an Application subclass as main class breaks
classpath launches (extracted jar / AOT cache), see Launcher's javadoc. -->
<main.class>net.timafe.triptale.Launcher</main.class>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<!--
No <classifier> here on purpose: openjfx's own parent pom detects the build host's
OS/arch and pulls exactly one set of natives (mac, mac-aarch64, linux, win, ...).
A hard-coded classifier used to drag in a second, foreign set (the jar shipped both
-win and -mac natives). Consequence: the jar runs on the OS it was built on — CI's
release jar is built on ubuntu for Linux, macOS/Windows build locally.
-->
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>${javafx.version}</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>${javafx.version}</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId>
<version>${javafx.version}</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-base</artifactId>
<version>${javafx.version}</version>
</dependency>
<!-- Radio (todo 46): MediaPlayer for MP3/AAC playback. Uses AVFoundation on macOS and the
bundled GStreamer-lite on Windows; on Linux it needs a supported system FFmpeg
(libavcodec/libavformat). See docs/46_radio.md. -->
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-media</artifactId>
<version>${javafx.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit</artifactId>
<version>${jgit.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.ssh.apache</artifactId>
<version>${jgit.version}</version>
</dependency>
<dependency>
<groupId>org.commonmark</groupId>
<artifactId>commonmark</artifactId>
<version>${commonmark.version}</version>
</dependency>
<dependency>
<groupId>com.drewnoakes</groupId>
<artifactId>metadata-extractor</artifactId>
<version>${metadata-extractor.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>triptale</finalName>
<plugins>
<!--
Resolves the most recent reachable git tag (e.g. "v0.9.0" — no commit-distance
suffix, no dirty marker) so AboutDialog can show a real release version instead of
the Maven coordinate, which is never bumped. spring-boot-maven-plugin:build-info
(below) actually binds to generate-resources, not prepare-package as its own docs
imply — bind here to the same phase, declared first, so this plugin's property is
set before build-info reads it. This also means both plugins run on every
`make run`/`run-fast`, not just packaging builds (javafx:run forks the build up to
process-classes, which is after generate-resources) — acceptable since resolving
the closest tag is a cheap, local walk of already-loaded git objects.
-->
<plugin>
<groupId>io.github.git-commit-id</groupId>
<artifactId>git-commit-id-maven-plugin</artifactId>
<version>${git-commit-id.version}</version>
<executions>
<execution>
<goals>
<goal>revision</goal>
</goals>
<phase>generate-resources</phase>
</execution>
</executions>
<configuration>
<generateGitPropertiesFile>false</generateGitPropertiesFile>
<failOnNoGitDirectory>false</failOnNoGitDirectory>
<!-- Only the closest tag is consumed (build-info below); also silences the
per-property "Collected …" / "including property …" INFO lines. -->
<verbose>false</verbose>
<includeOnlyProperties>
<includeOnlyProperty>^git\.closest\.tag\.name$</includeOnlyProperty>
</includeOnlyProperties>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>${main.class}</mainClass>
</configuration>
<executions>
<execution>
<goals>
<goal>build-info</goal>
</goals>
<configuration>
<additionalProperties>
<version>${git.closest.tag.name}</version>
</additionalProperties>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.13</version>
<executions>
<!-- Instrument bytecode before tests run -->
<execution>
<id>prepare-agent</id>
<goals><goal>prepare-agent</goal></goals>
<configuration>
<!--
Restrict agent instrumentation to our own classes only.
Without this, JaCoCo tries to instrument JDK-internal
bootstrap classes (e.g. java.sql.Timestamp, sun.util.*),
which may be compiled at a bytecode version newer than
JaCoCo's bundled ASM supports, producing a flood of
"Unsupported class file major version" warnings at runtime.
-->
<includes>net.timafe.triptale.*</includes>
</configuration>
</execution>
<!-- Generate HTML + XML report after tests -->
<execution>
<id>report</id>
<phase>test</phase>
<goals><goal>report</goal></goals>
</execution>
</executions>
<configuration>
<!-- Exclude JavaFX UI layer — it can't run headless -->
<excludes>
<exclude>net/timafe/triptale/ui/**</exclude>
<exclude>net/timafe/triptale/TripTaleApplication.class</exclude>
<exclude>net/timafe/triptale/Launcher.class</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.8</version>
<configuration>
<mainClass>${main.class}</mainClass>
<options>
<option>--enable-native-access=javafx.graphics,javafx.media</option>
<option>--sun-misc-unsafe-memory-access=allow</option>
</options>
</configuration>
</plugin>
</plugins>
</build>
<!-- Windows-only profile to prepare JavaFX native jars and set module-path for spring-boot:run -->
<profiles>
<profile>
<id>windows-javafx</id>
<activation>
<os>
<family>Windows</family>
</os>
</activation>
<properties>
<javafx.platform>win</javafx.platform>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<id>copy-javafx-native</id>
<phase>initialize</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/javafx-lib</outputDirectory>
<includeGroupIds>org.openjfx</includeGroupIds>
<includeArtifactIds>javafx-controls,javafx-fxml,javafx-graphics,javafx-base,javafx-media</includeArtifactIds>
<includeClassifiers>${javafx.platform}</includeClassifiers>
<stripVersion>false</stripVersion>
</configuration>
</execution>
</executions>
</plugin>
<!-- Override spring-boot:run jvm args to use the copied JavaFX jars on module-path -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>${main.class}</mainClass>
<jvmArguments>--module-path "${project.build.directory}/javafx-lib" --add-modules=javafx.controls,javafx.fxml,javafx.media</jvmArguments>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>