Newer
Older
Patrik Dufresne
committed
<?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">
Patrik Dufresne
committed
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.patrikdufresne</groupId>
<artifactId>planimod-parent</artifactId>
<version>${revision}</version>
Patrik Dufresne
committed
</parent>
Patrik Dufresne
committed
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
<packaging>pom</packaging>
<properties>
<deploy.ssh.hostname>patrikdufresne.com</deploy.ssh.hostname>
<deploy.ssh.username>maven</deploy.ssh.username>
<deploy.ssh.keyfile>${user.home}/.ssh/id_rsa</deploy.ssh.keyfile>
<deploy.ssh.tracenv>/srv/trac/planimod</deploy.ssh.tracenv>
</properties>
<build>
<plugins>
<!--Generate the shell script to start the application from command line -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>appassembler-maven-plugin</artifactId>
<version>1.3.1</version>
<executions>
<execution>
<id>assemble-standalone</id>
<phase>generate-resources</phase>
<goals>
<goal>assemble</goal>
</goals>
<configuration>
<assembleDirectory>${project.build.directory}/package</assembleDirectory>
<programs>
<program>
<mainClass>com.planimod.ui.Main</mainClass>
<name>planimod</name>
</program>
</programs>
<platforms>
<platform>unix</platform>
</platforms>
<repositoryLayout>flat</repositoryLayout>
<repositoryName>lib</repositoryName>
</configuration>
</execution>
</executions>
</plugin>
<!-- Copy SWT jars for supported platform. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<id>copy-swt-win-x86</id>
<phase>generate-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.eclipse.swt</groupId>
<artifactId>org.eclipse.swt.win32.win32.x86</artifactId>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/package/lib/win/x86</outputDirectory>
</configuration>
</execution>
<execution>
<id>copy-swt-win-x86-64</id>
<phase>generate-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.eclipse.swt</groupId>
<artifactId>org.eclipse.swt.win32.win32.x86_64</artifactId>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/package/lib/win/x86_64</outputDirectory>
</configuration>
</execution>
Patrik Dufresne
committed
<execution>
Patrik Dufresne
committed
<phase>generate-resources</phase>
<goals>
Patrik Dufresne
committed
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.patrikdufresne</groupId>
<artifactId>planimod-icons</artifactId>
<version>${project.version}</version>
Patrik Dufresne
committed
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/generated-resources/icons</outputDirectory>
Patrik Dufresne
committed
</configuration>
</execution>
</executions>
</plugin>
Patrik Dufresne
committed
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
Patrik Dufresne
committed
<executions>
<execution>
<id>copy-root-resources</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<resources>
<resource>
<filtering>false</filtering>
<directory>src/main/root</directory>
</resource>
</resources>
<outputDirectory>${project.build.directory}/package</outputDirectory>
<filtering>false</filtering>
</configuration>
</execution>
<!-- Copy icons into /target/package -->
<execution>
<id>copy-icons-resources</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<resources>
<resource>
<filtering>false</filtering>
<directory>${project.build.directory}/generated-resources/icons/com/planimod/ui/theme</directory>
</resource>
</resources>
<outputDirectory>${project.build.directory}/package</outputDirectory>
<filtering>false</filtering>
</configuration>
</execution>
Patrik Dufresne
committed
</executions>
</plugin>
<!-- Create an archive for linux from /package -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/main/assembly/linux-package.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<!-- Create a single Windows Installer (32bits & 64 bits) -->
Patrik Dufresne
committed
<execution>
Patrik Dufresne
committed
<phase>package</phase>
<configuration>
<target>
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
<!-- Import Ant contrib. -->
<taskdef resource="net/sf/antcontrib/antlib.xml"
classpathref="maven.plugin.classpath" />
<!-- Declare signexe macro. -->
<macrodef name="signexe">
<attribute name="osslsigncode-path"
default="osslsigncode" />
<attribute name="certs-file" />
<attribute name="key-file" />
<attribute name="passphrase" />
<attribute name="hash" default="sha2" />
<attribute name="name" default="${project.name}" />
<attribute name="url" default="${project.url}" />
<attribute name="file" />
<attribute name="if" default="true" />
<sequential>
<if>
<isset property="@{if}" />
<then>
<move file="@{file}" tofile="@{file}.unsigned" />
<echo message="Sign @{file}" />
<exec executable="@{osslsigncode-path}"
dir="${project.build.directory}" failonerror="true">
<arg value="-certs" />
<arg value="@{certs-file}" />
<arg value="-key" />
<arg value="@{key-file}" />
<arg value="-pass" />
<arg value="@{passphrase}" />
<arg value="-n" />
<arg value="@{name}" />
<arg value="-i" />
<arg value="@{url}" />
<arg value="-h" />
<arg value="@{hash}" />
<arg value="-t" />
<arg
value="http://timestamp.verisign.com/scripts/timstamp.dll" />
<arg value="-in" />
<arg value="@{file}.unsigned" />
<arg value="-out" />
<arg value="@{file}" />
</exec>
<delete file="@{file}.unsigned" />
</then>
</if>
</sequential>
</macrodef>
<!-- Sign winrun4j exe -->
<signexe certs-file="${sign.certs.path}"
key-file="${sign.key.path}" passphrase="${sign.passphrase}"
name="Planimod"
file="${project.build.directory}/package/bin/planimod.exe"
if="sign.key.path" />
<signexe certs-file="${sign.certs.path}"
key-file="${sign.key.path}" passphrase="${sign.passphrase}"
name="Planimod"
file="${project.build.directory}/package/bin/planimod64.exe"
if="sign.key.path" />
Patrik Dufresne
committed
<!-- Convert the license file into Window encoding -->
tofile="${project.build.directory}/package/LICENSE.txt"
encoding="UTF-8" outputencoding="ISO-8859-1" />
<copy file="${basedir}/../LICENSE.fr"
tofile="${project.build.directory}/package/LICENSE.fr.txt"
encoding="UTF-8" outputencoding="ISO-8859-1" />
<propertyregex property="AppVersion"
input="0.0.0.${project.version}"
regexp=".*([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)" select="\1" />
<exec osfamily="unix" executable="makensis"
dir="${project.build.directory}/package" failonerror="true">
Patrik Dufresne
committed
<!-- Avoid changing working directory -->
<arg value="-NOCD" />
<arg value="-Dincludedir=${basedir}/src/main/nsis/include" />
<arg value="-Dplugindir=${basedir}/src/main/nsis/plugin" />
<arg value="-DAppVersion=${AppVersion}" />
Patrik Dufresne
committed
<arg value="${basedir}/src/main/nsis/setup.nsi" />
</exec>
<move file="${project.build.directory}/package/setup.exe"
tofile="${project.build.directory}/planimod-${project.version}-install.exe" />
<!-- Sign exe installer -->
<signexe certs-file="${sign.certs.path}"
key-file="${sign.key.path}" passphrase="${sign.passphrase}"
name="Planimod Installer"
file="${project.build.directory}/planimod-${project.version}-install.exe"
if="sign.key.path" />
Patrik Dufresne
committed
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
<version>1.0b3</version>
<exclusions>
<exclusion>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-nodeps</artifactId>
<version>1.8.1</version>
</dependency>
</dependencies>
Patrik Dufresne
committed
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.patrikdufresne</groupId>
<artifactId>planimod</artifactId>
<version>${project.version}</version>
Patrik Dufresne
committed
</dependency>
</dependencies>
</project>