Skip to content

Commit fda7f3e

Browse files
author
Arturo
committed
Smart installer
1 parent 4aab732 commit fda7f3e

16 files changed

Lines changed: 1036 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/target/
22
/etc/rules/
33
/etc/task_tables/
4+
/dhus-smart-installer/target/

build.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
mvn clean package
2+
cd dhus-smart-installer
3+
mvn clean package
4+

dhus-smart-installer/pom.xml

Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
6+
<modelVersion>4.0.0</modelVersion>
7+
<!--
8+
<parent>
9+
<groupId>fr.gael.dhus</groupId>
10+
<artifactId>dhus-software</artifactId>
11+
<version>1.0</version>
12+
</parent>
13+
-->
14+
<artifactId>smart-installer</artifactId>
15+
<name>DHuS - Smart Installer</name>
16+
<groupId>fr.gael.dhus</groupId>
17+
<version>1.0-SNAPSHOT</version>
18+
19+
20+
<!-- seems like this needs to be "jar" to accomplish a build of java code too? a bit confused
21+
on the difference between putting "pom" and "jar" here. -->
22+
<packaging>jar</packaging>
23+
24+
<!-- maven repository where the izpack-maven-plugin and such live -->
25+
<repositories>
26+
<repository>
27+
<id>codehaus-releases</id>
28+
<url>https://nexus.codehaus.org/content/repositories/releases</url>
29+
</repository>
30+
</repositories>
31+
32+
<properties>
33+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
34+
<staging.dir>${project.build.directory}/staging</staging.dir>
35+
<izpack.version>5.0.6</izpack.version>
36+
<!-- <dhus_version>${project.parent.version}</dhus_version>-->
37+
<dhus_version>1.0</dhus_version>
38+
<installer-output-filename>dhus-smart-installer-${dhus_version}.jar</installer-output-filename>
39+
</properties>
40+
41+
<developers>
42+
<developer>
43+
<id>amontieri</id>
44+
<name>Arturo Montieri</name>
45+
<email>amontieri@serco.com</email>
46+
<timezone>+2</timezone>
47+
</developer>
48+
</developers>
49+
50+
51+
52+
<build>
53+
54+
<defaultGoal>package</defaultGoal>
55+
56+
<pluginManagement>
57+
<plugins>
58+
<plugin>
59+
<groupId>org.codehaus.izpack</groupId>
60+
<artifactId>izpack-maven-plugin</artifactId>
61+
<version>${izpack.version}</version>
62+
</plugin>
63+
<plugin>
64+
<groupId>org.apache.maven.plugins</groupId>
65+
<artifactId>maven-clean-plugin</artifactId>
66+
<version>2.4.1</version>
67+
</plugin>
68+
<plugin>
69+
<groupId>org.apache.maven.plugins</groupId>
70+
<artifactId>maven-deploy-plugin</artifactId>
71+
<version>2.6</version>
72+
</plugin>
73+
<plugin>
74+
<groupId>org.apache.maven.plugins</groupId>
75+
<artifactId>maven-install-plugin</artifactId>
76+
<version>2.3.1</version>
77+
</plugin>
78+
<plugin>
79+
<groupId>org.apache.maven.plugins</groupId>
80+
<artifactId>maven-site-plugin</artifactId>
81+
<version>2.3</version>
82+
</plugin>
83+
</plugins>
84+
</pluginManagement>
85+
86+
<plugins>
87+
88+
89+
<plugin>
90+
<artifactId>maven-resources-plugin</artifactId>
91+
<executions>
92+
<execution>
93+
<id>copy-appCtx</id>
94+
<phase>generate-resources</phase>
95+
<goals>
96+
<goal>copy-resources</goal>
97+
</goals>
98+
<configuration>
99+
<outputDirectory>${staging.dir}</outputDirectory>
100+
<overwrite>true</overwrite>
101+
<resources>
102+
<resource>
103+
<directory>../target/</directory>
104+
<includes>
105+
<include>dhus-software-${dhus_version}-distribution.zip</include>
106+
</includes>
107+
</resource>
108+
</resources>
109+
</configuration>
110+
</execution>
111+
</executions>
112+
</plugin>
113+
114+
<!-- copy all resources to the staging directory. -->
115+
<plugin>
116+
<artifactId>maven-resources-plugin</artifactId>
117+
<executions>
118+
<execution>
119+
<id>copy-resources</id>
120+
<!-- here the phase you need -->
121+
<phase>validate</phase>
122+
<goals>
123+
<goal>copy-resources</goal>
124+
</goals>
125+
<configuration>
126+
<outputDirectory>${staging.dir}</outputDirectory>
127+
128+
<!-- 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 -->
129+
<resources>
130+
<resource>
131+
<directory>src/main/dhus</directory>
132+
<includes>
133+
<include>**/*</include>
134+
</includes>
135+
<filtering>false</filtering>
136+
</resource>
137+
138+
</resources>
139+
</configuration>
140+
</execution>
141+
</executions>
142+
</plugin>
143+
144+
<!--
145+
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:
146+
-->
147+
<plugin>
148+
<groupId>org.codehaus.izpack</groupId>
149+
<artifactId>izpack-maven-plugin</artifactId>
150+
<version>${izpack.version}</version>
151+
<configuration>
152+
<descriptorEncoding>UTF-8</descriptorEncoding>
153+
</configuration>
154+
<executions>
155+
<execution>
156+
<phase>package</phase>
157+
<goals><goal>izpack</goal></goals>
158+
<configuration>
159+
<!-- base for relative paths in izpack descriptor -->
160+
<baseDir>${staging.dir}</baseDir>
161+
<installFile>${staging.dir}/install.xml</installFile>
162+
<output>${project.build.directory}/../../target/${installer-output-filename}</output>
163+
</configuration>
164+
</execution>
165+
</executions>
166+
<!-- must have a dependency here on any code used in the installer, otherwise the classloader
167+
will not find it. So in this case we need our panels and then the package that contains the base classes
168+
for the panels -->
169+
<dependencies>
170+
171+
<!-- https://mvnrepository.com/artifact/org.apache.ant/ant -->
172+
<dependency>
173+
<groupId>org.apache.ant</groupId>
174+
<artifactId>ant</artifactId>
175+
<version>1.8.2</version>
176+
</dependency>
177+
178+
</dependencies>
179+
</plugin>
180+
181+
182+
183+
184+
185+
</plugins>
186+
</build>
187+
188+
</project>

0 commit comments

Comments
 (0)