Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fixed app name in dependencies

Lifecycle Mappings

...

Configuration AttributeValue RangeDefault ValueDescription

baseDir

string
${project.build.directory}/staging
Base directory of compilation process

installFile

string
${basedir}/src/main/izpack/install.xml
Location of the IzPack installation file.

comprFormat

default | bzip2

default

Target compression format of the compiled installer jar

comprLevel

integer -1, 0..9

-1
Compression level of the compiled installer jar. Deactivated by default (-1)

outputDirectory

 
${project.build.directory}
Target directory containing the compiled installer jar

mkdirs

true | false
false
Whether to automatically create parent directories of the output file

finalName

  Name of the compiled installer jar
classifier Not setClassifier to add to the artifact generated. If given, the artifact is attachable. Furthermore, the output file name gets -classifier as suffix. If this is not given,it will merely be written to the output directory according to the finalName.
enableAttachArtifact
true | false
true
Whether to attach the generated installer jar to the project as artifact if a classifier is specified. This has no effect if no classifier was specified.

enableOverrideArtifact

true | false
false
Whether to override the artifact file by the generated installer jar, if no classifier is specified. This will set the artifact file to the given name based on outputDirectory + finalName or on output. This has no effect if a classifier is specified.

autoIncludeUrl

true | false
false

Whether to automatically include project.url from Maven into the IzPack info header

autoIncludeDevelopers

true | false
false

Whether to automatically include developer list from Maven into IzPack info header

kind

standard | web
standard

Resulting installer type

...

Code Block
titleDependency Definition for IzPack and application components
<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/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>
 
  ...

  <!-- Launch IzPack automatically -->
  <packaging>izpack-jar</packaging>

  <properties>
    <!-- Installer variables -->
    <staging.dir>${project.build.directory}/staging</staging.dir>
    <info.appName>My Killer Application</info.appName>
    <info.appsubpath>my-killer-app/standard</info.appsubpath>
    <izpack.dir.app>${basedir}/src/main/izpack</izpack.dir.app>
    <staging.dir.app>${staging.dir}/appfiles</staging.dir.app>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.codehaus.izpack</groupId>
      <artifactId>izpack-panel</artifactId>
      <version>${my.izpackplugin.version}</version>
    </dependency>


    <dependency>
      <groupId>com.example.myApp</groupId>
      <artifactId>main<<artifactId>my-killer-app-main</artifactId>
      <version>${project.parent.version}</version>
    </dependency>
    <dependency>
      <groupId>com.example.myApp</groupId>
      <artifactId>core<<artifactId>my-killer-app-core</artifactId>
      <version>${project.parent.version}</version>
    </dependency>
      .....
  </dependencies>
 
</project

...

To get the dependencies into the staging structure, the Maven copy dependency plugin can be invoked.

 

Code Block
titleDependency Definition for IzPack and Copy application components to the staging directory
<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/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>
 
  ...

  <!-- Launch IzPack automatically -->
  <packaging>izpack-jar</packaging>

  <properties>
    <!-- Installer variables -->
    <staging.dir>${project.build.directory}/staging</staging.dir>
    <info.appName>My Killer Application</info.appName>
    <info.appsubpath>my-killer-app/standard</info.appsubpath>
    <izpack.dir.app>${basedir}/src/main/izpack</izpack.dir.app>
    <staging.dir.app>${staging.dir}/appfiles</staging.dir.app>
  </properties>
  <build>
   <plugins>

   ...
 
    <plugin>
     <groupId>org.apache.maven.plugins</groupId>
     <artifactId>maven-dependency-plugin</artifactId>
     <version>2.10</version>
     <configuration>
       <outputDirectory>${staging.dir}/lib</outputDirectory>
       <excludeTransitive>true</excludeTransitive>
       <stripVersion>true</stripVersion>
       <overWriteReleases>true</overWriteReleases>
       <overWriteSnapshots>true</overWriteSnapshots>
       <overWriteIfNewer>true</overWriteIfNewer>
       <excludeScope>system</excludeScope>
     </configuration>
     <executions>
      <execution>
       <id>copy</id>
       <phase>process-resources</phase>
       <goals>
        <goal>copy-dependencies</goal>
       </goals>
      </execution>
     </executions>
    </plugin>
 
     ...

   </plugins>
  </build>

</project

...