/**
* Location of the IzPack installation file
*
* @parameter default-value="${basedir}/src/main/izpack/install.xml"
*/
private String installFile;
/**
* Base directory of compilation process
*
* @parameter default-value="${project.build.directory}/staging"
*/
private String baseDir;
It is possible to override these parameters when building the
installer with maven?
In my pom I have tried:
<plugin>
<groupId>org.codehaus.izpack</groupId>
<artifactId>izpack-maven-plugin</artifactId>
<version>5.0.0-beta8</version>
<configuration>
<descriptor>${basedir}/myizpack/install.xml</descriptor>
<descriptorEncoding>${project.build.sourceEncoding}</descriptorEncoding>
<izpackBasedir>${project.build.directory}/myout</izpackBasedir>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>izpack</goal>
</goals>
</execution>
</executions>
</plugin>
but it has no effect. I still get:
[ERROR] Failed to execute goal
org.codehaus.izpack:izpack-maven-plugin:5.0.0-beta8:izpack (default)
on project my-installer: Execution default of goal
org.codehaus.izpack:iz
pack-maven-plugin:5.0.0-beta8:izpack failed:
java.lang.reflect.InvocationTargetException:
C:\...\my-installer\src\main\izpack\install.xml (
The system cannot find the path specified) -> [Help 1]
[ERROR]
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
here is an example where my configuration is working
<plugin>
<groupId>org.codehaus.izpack</groupId>
<artifactId>izpack-maven-plugin</artifactId>
<version>${izpack.version}</version>
<executions>
<execution>
<id>build-installer</id>
<phase>package</phase>
<goals>
<goal>izpack</goal>
</goals>
<configuration>
<installFile>${staging.dir}/install.xml</installFile>
<baseDir>${staging.dir}</baseDir>
<output>${project.build.directory}/${project.build.finalName}.jar</output>
</configuration>
</execution>
</executions>
</plugin>
where staging dir is defined in the properties section
<properties>
<izpack.version>your izpack version</izpack.version>
<staging.dir>${project.build.directory}/staging</staging.dir>
</properties>
am copying the install descriptor in the staging dir with maven
resources plugin since I need to apply some filter (project version etc).
the configuration for resources plugin is
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-izpack-resources</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${staging.dir}</outputDirectory>
<escapeString>\</escapeString>
<resources>
<resource>
<directory>${project.basedir}/src/main/izpack</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>${project.basedir}/src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
Hope this helps.
Good luck with the new version. I tried it but it is very unstable and
unpredictable for my needs. For example there is no way to use
conditions without deleting the defaults for OS) so you have to add them
yourself.
so I switched to 4.3.4 and calling the ant task from maven.
--
Vlado