forked from TheTrunk/zcash-swing-wallet
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpom.xml
More file actions
229 lines (223 loc) · 12.2 KB
/
Copy pathpom.xml
File metadata and controls
229 lines (223 loc) · 12.2 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
<project xmlns="http://maven.apache.org/POM/5.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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>zel.cash</groupId>
<artifactId>ZelCashOfficialSwingWalletUI</artifactId>
<version>7.6.0</version>
</parent>
<artifactId>installer</artifactId>
<name>ZelCash Wallet Installer</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<staging.dir>${project.build.directory}/staging</staging.dir>
<installer-output-filename>zelcash-wallet-installer</installer-output-filename>
<zcash.project.url>https://github.com</zcash.project.url>
<zcash.binaries.file.name.windows>zelcash/zelcash/releases/download/v2.0.0/Windows.zip</zcash.binaries.file.name.windows>
<izpack.version>5.1.3</izpack.version>
</properties>
<dependencies>
<dependency>
<groupId>zel.cash</groupId>
<artifactId>zelcash-wallet-swing</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<profiles>
<profile>
<id>installer</id>
<build>
<defaultGoal>package</defaultGoal>
<plugins>
<!-- copy all resources to the staging directory. -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<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>src/main/izpack</directory>
<includes>
<include>**/*</include>
</includes>
<filtering>false</filtering>
</resource>
<resource>
<directory>../zelcash-wallet-swing/src/deb/resources</directory>
<includes>
<include>licences/*</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>download-zelcash</id>
<phase>validate</phase>
<goals>
<goal>download-single</goal>
</goals>
<configuration>
<url>${zelcash.project.url}</url>
<fromFile>${zelcash.binaries.file.name.windows}</fromFile>
<toFile>${project.build.directory}/staging/zelcash-win-binaries.zip</toFile>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>generate-resources</phase>
<configuration>
<tasks>
<echo message="unzipping file" />
<unzip src="${project.build.directory}/staging/zcash-win-binaries.zip"
dest="${project.build.directory}/staging/zcash-win-binaries">
<patternset>
<include name="**/zelcash-cli.exe"/>
<include name="**/zelcash-tx.exe"/>
<include name="**/zelcashd.exe"/>
</patternset>
<mapper type="flatten"/>
</unzip>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</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>zelcash-wallet-swing,bitcoinj-core,sqlite-jdbc,minimal-json,zxing-core,zxing-javase</includeArtifactIds>
</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 install file to use:
-->
<plugin>
<groupId>org.codehaus.izpack</groupId>
<artifactId>izpack-maven-plugin</artifactId>
<version>${izpack.version}</version>
<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}.jar</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>zel.cash</groupId>
<artifactId>zelcash-wallet-swing</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>com.akathist.maven.plugins.launch4j</groupId>
<artifactId>launch4j-maven-plugin</artifactId>
<executions>
<execution>
<id>l4j-gui</id>
<phase>package</phase>
<goals>
<goal>launch4j</goal>
</goals>
<configuration>
<icon>${staging.dir}/win-shortcut/zelcash.ico</icon>
<headerType>gui</headerType>
<jar>${project.build.directory}/${installer-output-filename}.jar</jar>
<outfile>${project.build.directory}/${installer-output-filename}.exe</outfile>
<classPath>
<mainClass>com.izforge.izpack.installer.bootstrap.Installer</mainClass>
</classPath>
<jre>
<bundledJre64Bit>false</bundledJre64Bit>
<bundledJreAsFallback>false</bundledJreAsFallback>
<minVersion>1.8.0</minVersion>
<jdkPreference>preferJre</jdkPreference>
<runtimeBits>64/32</runtimeBits>
</jre>
<versionInfo>
<fileVersion>1.0.0.0</fileVersion>
<txtFileVersion>1.0.0.0</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>${installer-output-filename}</internalName>
<originalFilename>${installer-output-filename}.exe</originalFilename>
</versionInfo>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>assembly</id>
<phase>package</phase>
<goals><goal>single</goal></goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<descriptors>
<descriptor>${staging.dir}/assembly.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>