-
Notifications
You must be signed in to change notification settings - Fork 1
How to create izpack installer with gradle
Before you create the IzPack installer file, ensure that you have followed the preconditions in the DEPLOYMENT-INFO.
- Set the property
createIzPackInstaller
totrue
in the projectgradle.properties
file. - Execute the
clean
task to delete themystic-crypt-ui/build
directory. - Run the
withAllDependenciesJar
task to create the jar with the suffix*-all.jar
. - Execute the
jar
task using Gradle. This process generates the jar files in themystic-crypt-ui/build/libs
directory and the signed jar files in themystic-crypt-ui/build/signed
directory. - Run the
izPackCreateInstaller
task. This automatically retrieves the signed jar file and generates the installation jar file in the project's distributions directorymystic-crypt-ui/build/distributions
. The signed installation jar file can now be deployed to any OS.
There is a new Gradle task, createIzPackInstallerFromSignedJar
, located in the mystic-crypt-ui/gradle/packaging.gradle
file, that reproduces the above behavior. If the flag createIzPackInstaller
is set to true
, an installer jar will automatically be created in the mystic-crypt-ui/build/distributions
directory.
For more details, refer to the IzPack task in the build.gradle
file or visit the Gradle IzPack Plugin page.
Since version 6, the build.gradle
file is split into several sections. One of them is the izpack.gradle
file, which contains the IzPack task. In the packaging.gradle
file, tasks for generating the jar, signed jar, and withAllDependenciesJar
are located.
If no installation jar file is generated, ensure that the createIzPackInstaller
property is set to true
.
If you encounter the following error:
Execution failed for task ':jar'.
> Could not get unknown property 'release.mystic-crypt.key.alias' for root project 'mystic-crypt-ui' of type org.gradle.api.Project.
This error means that the property release.mystic-crypt.key.alias
for the keystore is not set. In the project gradle.properties
, the following properties for the keystore should be defined:
##############################
# Keystore Properties Keys #
##############################
mysticCryptStoreFile=release.mystic-crypt.store.file
mysticCryptStoreType=release.mystic-crypt.store.type
mysticCryptStorePassword=release.mystic-crypt.store.password
mysticCryptKeyPassword=release.mystic-crypt.key.password
mysticCryptKeyAlias=release.mystic-crypt.key.alias
Follow the same pattern as described in this article.
Additionally, you may encounter the error:
> jarsigner returned: 1
This can occur if the path to the keystore is not properly set in the ~/.gradle/gradle.properties
.
The project has migrated to the new major version, IzPack 5.x.
Versions before 6.x used the old IzPack 4.x.