-
Notifications
You must be signed in to change notification settings - Fork 0
/
pom.xml
246 lines (242 loc) · 11.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
<?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>ch.luatan</groupId>
<artifactId>DNSResolver</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<name>DNSResolver</name>
<dependencies>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.10.0</version>
</dependency>
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
<version>3.9.0</version>
</dependency>
<dependency>
<groupId>no.tornado</groupId>
<artifactId>fxlauncher</artifactId>
<version>1.0.21</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20231013</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10</version>
</dependency>
<dependency>
<groupId>dnsjava</groupId>
<artifactId>dnsjava</artifactId>
<version>3.5.2</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.5</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>2.0.5</version>
</dependency>
</dependencies>
<properties>
<app.mode>live</app.mode>
<!-- Installer Filename without suffix -->
<app.filename>${project.name}</app.filename>
<!-- The JavaFX Application class name -->
<app.mainClass>ch.luatan.DNSResolver.DNSResolver</app.mainClass>
<!-- Optional override to specify where the cached files are stored. Default is current working directory -->
<app.cacheDir>downloads</app.cacheDir>
<!-- The Application vendor used by javapackager -->
<app.vendor>Simon Schmid</app.vendor>
<!-- The Application version used by javapackager -->
<app.version>1.1</app.version>
<!-- Base URL where you will host the application artifacts -->
<app.url>https://update.dnsresolver.ch/v1/${app.mode}</app.url>
<!-- Optional scp target for application artifacts hosted at the above url -->
<app.deploy.target>[email protected]:/mnt/data/apache2/update.dnsresolver.ch/data/v1/${app.mode}</app.deploy.target>
<!-- scp target Port the above server -->
<app.deploy.port>69</app.deploy.port>
<!-- The app and launcher will be assembled in this folder -->
<app.dir>${project.build.directory}/DNSResolver</app.dir>
<!-- Native installers will be built in this folder -->
<app.installerdir>${project.build.directory}/installer</app.installerdir>
<!-- Should the client downgrade if the server version is older than the local version? -->
<app.acceptDowngrade>true</app.acceptDowngrade>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<javafx.version>1</javafx.version>
<javafx.maven.plugin.version>0.0.6</javafx.maven.plugin.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<build>
<plugins>
<!-- Compile project jar to appdir -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.6</version>
<configuration>
<outputDirectory>${app.dir}</outputDirectory>
</configuration>
</plugin>
<!-- Copy dependencies to appdir -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<configuration>
<excludeScope>provided</excludeScope>
<outputDirectory>${app.dir}</outputDirectory>
<stripVersion>true</stripVersion>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<!-- Generate app.xml manifest -->
<executions>
<execution>
<id>create-manifest</id>
<phase>package</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>fxlauncher.CreateManifest</mainClass>
<arguments>
<argument>${app.url}</argument>
<argument>${app.mainClass}</argument>
<argument>${app.dir}</argument>
<argument>--cache-dir=${app.cacheDir}</argument>
<argument>--accept-downgrade=${app.acceptDowngrade}</argument>
<argument>--include-extensions=jpg</argument>
</arguments>
</configuration>
</execution>
<!-- Embed app.xml inside fxlauncher.xml so we don't need to reference app.xml to start the app -->
<execution>
<id>embed-manifest-in-launcher</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>jar</executable>
<workingDirectory>${app.dir}</workingDirectory>
<arguments>
<argument>uf</argument>
<argument>fxlauncher.jar</argument>
<argument>app.xml</argument>
</arguments>
</configuration>
</execution>
<!-- Optional step to include custom UI, see https://github.com/edvin/fxlauncher-custom-ui -->
<execution>
<id>embed-custom-ui-in-launcher</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>jar</executable>
<workingDirectory>${app.dir}</workingDirectory>
<arguments>
<argument>uf</argument>
<argument>fxlauncher.jar</argument>
<argument>-C</argument>
<argument>${project.basedir}/../DNSResolver_launcher_ui/target/classes</argument>
<argument>.</argument>
</arguments>
</configuration>
</execution>
<!-- Create native installer. Feel free to add more arguments as needed.
https://docs.oracle.com/javase/8/docs/technotes/tools/windows/javapackager.html
-->
<execution>
<id>installer</id>
<phase>install</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>javapackager</executable>
<arguments>
<argument>-deploy</argument>
<argument>-native</argument>
<argument>-outdir</argument>
<argument>${app.installerdir}</argument>
<argument>-outfile</argument>
<argument>${app.filename}</argument>
<argument>-srcdir</argument>
<argument>${app.dir}</argument>
<argument>-srcfiles</argument>
<argument>fxlauncher.jar</argument>
<argument>-appclass</argument>
<argument>fxlauncher.Launcher</argument>
<argument>-name</argument>
<argument>${project.name}</argument>
<argument>-title</argument>
<argument>${project.name}</argument>
<argument>-vendor</argument>
<argument>${app.vendor}</argument>
<argument>-BappVersion=${app.version}</argument>
<argument>-Bidentifier=${project.groupId}.${project.artifactId}</argument>
</arguments>
</configuration>
</execution>
<!-- Copy application artifacts to remote site using scp (optional) -->
<execution>
<id>deploy-app</id>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>scp</executable>
<arguments>
<argument>-P ${app.deploy.port}</argument>
<argument>-r</argument>
<argument>${app.dir}/*</argument>
<argument>${app.deploy.target}</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>