-
Notifications
You must be signed in to change notification settings - Fork 5
/
pom.xml
471 lines (431 loc) · 15.4 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
<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>de.paginagmbh</groupId>
<artifactId>EPUB-Checker</artifactId>
<version>2.0.10</version>
<packaging>jar</packaging>
<name>pagina EPUB-Checker</name>
<description>pagina EPUB-Checker is a free GUI wrapper for the official W3C EPUBCheck library.</description>
<url>https://pagina.gmbh/startseite/leistungen/publishing-softwareloesungen/epub-checker/</url>
<inceptionYear>2010</inceptionYear>
<organization>
<name>pagina GmbH</name>
<url>https://www.pagina.gmbh</url>
</organization>
<developers>
<developer>
<name>Tobias Fischer</name>
<id>tofi86</id>
<email>tobias.carl.fischer@gmail.com</email>
<organization>previously pagina GmbH</organization>
</developer>
<developer>
<name>Magdalena Sannwald</name>
<id>Sannwama</id>
<email>magdalena.sannwald@pagina.gmbh</email>
<organization>pagina GmbH</organization>
</developer>
<developer>
<name>Kai Weber</name>
<id>sermo_de_arboribus</id>
<email>kai.weber@pagina.gmbh</email>
<organization>pagina GmbH</organization>
</developer>
<developer>
<name>Dr. Björn Rudzewitz</name>
<id>br-pagina</id>
<email>bjoern.rudzewitz@pagina.gmbh</email>
<organization>pagina GmbH</organization>
</developer>
<developer>
<name>Hans Schülein</name>
<id>kamik423</id>
<email>hans.schuelein@pagina.gmbh</email>
<organization>pagina GmbH</organization>
</developer>
</developers>
<scm>
<url>https://github.com/paginagmbh/EPUB-Checker</url>
<connection>scm:git:git@github.com:paginagmbh/EPUB-Checker.git</connection>
<developerConnection>scm:git:git@github.com:paginagmbh/EPUB-Checker.git</developerConnection>
<tag>HEAD</tag>
</scm>
<issueManagement>
<system>GitHub</system>
<url>https://github.com/paginagmbh/EPUB-Checker/issues</url>
</issueManagement>
<repositories>
<!--
local in-repo maven repository for unmanaged dependencies
# https://devcenter.heroku.com/articles/local-maven-dependencies#create-a-local-maven-repository-directory
-->
<repository>
<id>project.local</id>
<name>project</name>
<url>file:${project.basedir}/repo</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.w3c</groupId>
<artifactId>epubcheck</artifactId>
<version>5.1.0</version>
</dependency>
<dependency>
<groupId>com.metaparadigm</groupId>
<artifactId>json-rpc</artifactId>
<version>1.0</version>
</dependency>
<!--
AppleJavaExtensions 1.4 differ from my version I had in use all the years
so I called my version "1.5" and added it as unmanaged dependency
-->
<!--
<dependency>
<groupId>com.apple</groupId>
<artifactId>AppleJavaExtensions</artifactId>
<version>1.4</version>
</dependency>
-->
<!--
local "unmanaged" dependencies
# see repository declaration above
-->
<dependency>
<groupId>com.apple</groupId>
<artifactId>AppleJavaExtensions</artifactId>
<version>1.5</version>
</dependency>
<dependency>
<groupId>com.bulenkov</groupId>
<artifactId>iconloader</artifactId>
<version>1.0</version>
</dependency>
<!-- build dependencies -->
<dependency>
<groupId>com.ultramixer.jarbundler</groupId>
<artifactId>jarbundler-core</artifactId>
<version>3.3.0</version>
</dependency>
</dependencies>
<properties>
<!-- use UTF-8 file encoding for java source files -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- default: SKIP codesigning the Mac App! Activate signing with -Dmaven.skip.macSigning=false -->
<maven.skip.macSigning>true</maven.skip.macSigning>
<!-- skip 'install' phase per default as this pom creates final binaries as GUI app and no reusable libraries -->
<maven.install.skip>true</maven.install.skip>
<!-- custom path properties -->
<project.assembly.sourceDir>${project.basedir}/src/main/assembly</project.assembly.sourceDir>
<project.build.sourceDir>${project.basedir}/src/build</project.build.sourceDir>
<project.build.icons.sourceDir>${project.build.sourceDir}/icons</project.build.icons.sourceDir>
<project.build.splash.sourceDir>${project.build.sourceDir}/splashscreen</project.build.splash.sourceDir>
<project.JavaStubRepo.directory>${project.build.directory}/universalJavaApplicationStub</project.JavaStubRepo.directory>
<!-- custom properties -->
<my.mainclass>de.paginagmbh.epubchecker.PaginaEPUBChecker</my.mainclass>
<my.finalJarName>paginaEPUBChecker</my.finalJarName>
<my.finalShortName>EPUB-Checker</my.finalShortName>
<my.finalLongName>pagina EPUB-Checker</my.finalLongName>
<my.versionNumber>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}</my.versionNumber>
<my.appleSigningIdentity>Developer ID Application: pagina GmbH Apps (PPJQ7BTA69)</my.appleSigningIdentity>
</properties>
<build>
<plugins>
<!-- require maven version 3.5 or higher -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M3</version>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>[3.5,)</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<!-- build helper -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.1.0</version>
<executions>
<!--
create and store ${current.year} timestamp for copyright information
# http://stackoverflow.com/a/39307242/1128689
-->
<execution>
<id>timestamp-property</id>
<phase>validate</phase>
<goals>
<goal>timestamp-property</goal>
</goals>
<configuration>
<name>current.year</name>
<pattern>yyyy</pattern>
</configuration>
</execution>
<!--
parse and split the current version number to its separate parts
# http://stackoverflow.com/a/18234772/1128689
${parsedVersion.majorVersion}
${parsedVersion.minorVersion}
${parsedVersion.incrementalVersion}
${parsedVersion.qualifier}
${parsedVersion.buildNumber}
-->
<execution>
<id>parse-version</id>
<phase>validate</phase>
<goals>
<goal>parse-version</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- create and update build ID from properties file -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.4</version>
<configuration>
<shortRevisionLength>5</shortRevisionLength>
</configuration>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- java compiler options -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<!-- package a single, runnable jar -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>jar-with-dependencies</id>
<!-- run before(!) phase "package" -->
<phase>prepare-package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>${my.finalJarName}</finalName>
<attach>false</attach>
<appendAssemblyId>false</appendAssemblyId>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<!-- does not work - IDKW -->
<!--<addClasspath>true</addClasspath>-->
<mainClass>${my.mainclass}</mainClass>
</manifest>
<manifestEntries>
<!-- manual class path entry -->
<Class-Path>.</Class-Path>
<Build-Version>${my.versionNumber}</Build-Version>
<Build-Id>${buildNumber}</Build-Id>
</manifestEntries>
</archive>
</configuration>
</execution>
<!-- create linux distributable -->
<execution>
<id>dist-linux</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>${project.assembly.sourceDir}/dist-linux.xml</descriptor>
</descriptors>
</configuration>
</execution>
<!-- create windows distributable -->
<execution>
<id>dist-win</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>${project.assembly.sourceDir}/dist-win.xml</descriptor>
</descriptors>
</configuration>
</execution>
<!-- create Mac App distributable -->
<execution>
<id>dist-mac</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>${project.assembly.sourceDir}/dist-mac.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
<!-- create windows executable -->
<plugin>
<groupId>com.akathist.maven.plugins.launch4j</groupId>
<artifactId>launch4j-maven-plugin</artifactId>
<version>2.3.3</version>
<executions>
<execution>
<id>exe-win</id>
<!-- run BEFORE phase "package", but AFTER the runnable Jar was created (position/sequence in pom matters) -->
<phase>prepare-package</phase>
<goals>
<goal>launch4j</goal>
</goals>
<configuration>
<!-- use external launch4j configuration file -->
<infile>${project.build.sourceDir}/launch4j-config.xml</infile>
<!-- override some build specific properties -->
<jar>${project.build.directory}/${my.finalJarName}.jar</jar>
<outfile>${project.build.directory}/${my.finalShortName}.exe</outfile>
<versionInfo>
<fileVersion>${my.versionNumber}.0</fileVersion>
<txtFileVersion>${my.versionNumber}</txtFileVersion>
<productVersion>${my.versionNumber}.0</productVersion>
<txtProductVersion>${my.versionNumber}</txtProductVersion>
</versionInfo>
</configuration>
</execution>
</executions>
</plugin>
<!-- download the universalJavaApplicationStub for the Mac App -->
<plugin>
<artifactId>maven-scm-plugin</artifactId>
<version>1.11.2</version>
<executions>
<execution>
<id>get-javaStub</id>
<phase>generate-resources</phase>
<goals>
<goal>checkout</goal>
</goals>
<configuration>
<connectionUrl>scm:git:https://github.com/tofi86/universalJavaApplicationStub.git</connectionUrl>
<checkoutDirectory>${project.JavaStubRepo.directory}</checkoutDirectory>
<skipCheckoutIfExists>true</skipCheckoutIfExists>
<!-- checkout a specific tag / pinned version -->
<scmVersionType>tag</scmVersionType>
<scmVersion>v3.2.0</scmVersion>
</configuration>
</execution>
</executions>
</plugin>
<!--
build mac app with "jarbundler" ant task
unfortunately there is no suitable maven plugin available ATM
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>create-macApp</id>
<phase>prepare-package</phase>
<configuration>
<target>
<taskdef name="jarbundler" classname="com.ultramixer.jarbundler.JarBundler" classpathref="maven.compile.classpath" />
<jarbundler dir="${project.build.directory}" name="${my.finalShortName}" shortname="${my.finalLongName}" bundleid="de.paginagmbh.epubchecker" mainclass="${my.mainclass}" stubfile="${project.JavaStubRepo.directory}/src/universalJavaApplicationStub" usejavaxkey="true" icon="${project.build.icons.sourceDir}/paginaEPUBChecker_1024.icns" splashfile="SplashScreen_Mac.png" version="${my.versionNumber}_${buildNumber}" developmentregion="German" allowMixedLocalizations="true" highresolutioncapable="true" signature="PAEC" build="${my.versionNumber}" copyright="© 2010-${current.year} pagina GmbH, Tübingen, Germany" jvmversion="1.8+" vmoptions="-Xss1024k">
<!-- this documenttype lets me received drag/drop events from safari to my dock icon -->
<!-- http://informagen.com/JarBundler/DocumentType.html -->
<documenttype name="EPUB files" extensions="epub EPUB" role="Viewer" />
<jarfileset dir="${project.build.directory}/">
<include name="${my.finalJarName}.jar" />
</jarfileset>
<resourcefileset dir="${project.build.splash.sourceDir}">
<include name="SplashScreen_Mac.png" />
<include name="SplashScreen_Mac@2x.png" />
</resourcefileset>
</jarbundler>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<!--
codesign and notarize the Mac App
skipped by default. enable with -Dmaven.skip.macSigning=false
-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<!-- rename license to prevent issues on non case sensitive system -->
<execution>
<id>fix-license-collisions-python</id>
<phase>prepare-package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>python3</executable>
<workingDirectory>${project.basedir}</workingDirectory>
<arguments>
<argument>fix_license_file.py</argument>
<argument>${project.build.directory}/${my.finalShortName}.app/Contents/Resources/Java/${my.finalJarName}.jar</argument>
</arguments>
</configuration>
</execution>
<!-- run mac-release.sh script to codesign and notarize the Mac App -->
<execution>
<id>mac-release</id>
<phase>prepare-package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<skip>${maven.skip.macSigning}</skip>
<executable>${project.build.sourceDir}/mac-release.sh</executable>
<workingDirectory>${project.basedir}</workingDirectory>
<environmentVariables>
<MVN_BASEDIR>${project.basedir}</MVN_BASEDIR>
<MVN_BUILDDIR>${project.build.directory}</MVN_BUILDDIR>
<APP_VERSION>${my.versionNumber}</APP_VERSION>
<APP_NAME>${my.finalShortName}</APP_NAME>
<APP_NAME_LONG>${my.finalLongName}</APP_NAME_LONG>
<APPLE_SIGN_ID>${my.appleSigningIdentity}</APPLE_SIGN_ID>
</environmentVariables>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>