-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpom.xml
242 lines (232 loc) · 11.3 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
<?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>org.esupportail.esupsgcclient</groupId>
<artifactId>esupsgcclient</artifactId>
<version>2.2-SNAPSHOT</version>
<packaging>jar</packaging>
<name>esup-sgc-client-installer</name>
<url>https://maven.apache.org</url>
<properties>
<java.version>17</java.version>
<staging.dir>${project.build.directory}/staging</staging.dir>
<izpack.version>5.1.3</izpack.version>
<installer-output-filename>esupsgc-installer.jar</installer-output-filename>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.izpack</groupId>
<artifactId>izpack-maven-plugin</artifactId>
<version>${izpack.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>2.4.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.6</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>2.3</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.3.0</version>
<executions>
<execution>
<id>jdk</id>
<!-- the wget goal actually binds itself to this phase by default -->
<phase>generate-resources</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://cdn.azul.com/zulu/bin/zulu21.40.17-ca-fx-jre21.0.6-win_x64.zip</url>
<outputFileName>openjdk.zip</outputFileName>
<!-- default target location, just to demonstrate the parameter -->
<outputDirectory>${basedir}/target</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>unzipJdk</id>
<phase>generate-resources</phase>
<configuration>
<tasks>
<unzip src="${basedir}/target/openjdk.zip" dest="target/jdktemp" />
<move file="target/jdktemp/zulu21.40.17-ca-fx-jre21.0.6-win_x64" tofile="target/jdk"/>
<delete file="target/openjdk.zip"/>
<delete dir="target/jdktemp"/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>replaceVersion</id>
<phase>package</phase>
<configuration>
<tasks>
<replace file="target/staging/install.xml" token="$version" value="${project.version}" />
<replace file="target/staging/default_shortcut_spec.xml" token="$version" value="${project.version}" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>copy-resources</id>
<!-- here the phase you need -->
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${staging.dir}</outputDirectory>
<!-- recursive copy of all resource under src/main/izpack. this is
the stuff to install as well as install.xml and panel data and such -->
<resources>
<resource>
<directory>resources/izpack</directory>
<includes>
<include>**/*</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<!-- copy izpack custom (custom panels, etc.) jars to izpack staging
custom -->
<id>copy-izpack-dependencies</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${staging.dir}/custom</outputDirectory>
<excludeTransitive>false</excludeTransitive>
<stripVersion>true</stripVersion>
<overWriteReleases>true</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
<includeArtifactIds>izpack-panels</includeArtifactIds> <!-- IMPORTANT: this causes *only* our custom panels to be copied -->
</configuration>
</execution>
</executions>
</plugin>
<!-- We need to tell the izpack-maven-plugin what to use as the base directory
(this is our staging area), and also tell it the installation file to use: -->
<plugin>
<groupId>org.codehaus.izpack</groupId>
<artifactId>izpack-maven-plugin</artifactId>
<version>${izpack.version}</version>
<configuration>
<!--
le Tag classifier permet d'éviter l'erreur suivante :
An attached artifact must have a different ID than its corresponding main artifact.
-->
<classifier>Toto</classifier>
<descriptorEncoding>UTF-8</descriptorEncoding>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>izpack</goal>
</goals>
<configuration>
<!-- base for relative paths in izpack descriptor -->
<baseDir>${staging.dir}</baseDir>
<installFile>${staging.dir}/install.xml</installFile>
<output>${project.build.directory}/${installer-output-filename}</output>
</configuration>
</execution>
</executions>
<!-- must have a dependency here on any code used in the installer, otherwise
the classloader will not find it. So in this case we need our panels and
then the package that contains the base classes for the panels -->
<dependencies>
<dependency>
<groupId>org.codehaus.izpack</groupId>
<artifactId>izpack-panel</artifactId>
<version>${izpack.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>com.akathist.maven.plugins.launch4j</groupId>
<artifactId>launch4j-maven-plugin</artifactId>
<version>2.1.2</version>
<executions>
<execution>
<id>l4j-gui</id>
<phase>package</phase>
<goals>
<goal>launch4j</goal>
</goals>
<configuration>
<headerType>gui</headerType>
<jar>target/${installer-output-filename}</jar>
<outfile>target/esupsgc-installer.exe</outfile>
<classPath>
<mainClass>com.izforge.izpack.installer.bootstrap.Installer</mainClass>
</classPath>
<jre>
<path>jdk</path>
</jre>
<versionInfo>
<fileVersion>1.0.0.0</fileVersion>
<txtFileVersion>${project.version}</txtFileVersion>
<fileDescription>${project.name}</fileDescription>
<copyright>C</copyright>
<productVersion>1.0.0.0</productVersion>
<txtProductVersion>1.0.0.0</txtProductVersion>
<productName>${project.name}</productName>
<internalName>AppName</internalName>
<originalFilename>esupsgc-installer.exe</originalFilename>
</versionInfo>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>