Building Weasis

These instructions guide you through building Weasis directly from its GitHub repository. For IDE-based builds, refer to the Weasis plugin development guidelines.

Prerequisites

  1. JDK 23 or higher
  2. Maven 3.6.3 or higher
    If your computer is behind a proxy server, refer to the Maven proxy configuration guide.
  3. Git

Getting the Source Code

In order to clone the repository, install Git and either use a graphical client or run the following command in a terminal:

git clone https://github.com/nroduit/Weasis.git

Building All Plugins

  • Navigate to the root directory of the cloned Weasis repository, compile and install all plugins into the local Maven repository:

    mvn clean install

  • Package weasis-native.zip (located in target/native-dist/), since Version4.0.0 :

    mvn -P compressXZ -f weasis-distributions clean package
    Tip

    -P compressXZ: Option for compressing the packages in xz, only from Weasis 3.6.0. The compression pack200 is not supported anymore (removed from Java 14), before 3.6.0 the profile was -P pack200.

    Tip

    -P purgeI18nPackage: Option to delete the translation package in the local maven repository (active by default). To disable this option, add - before the profile:

    mvn -P compressXZ,-purgeI18nPackage -f weasis-distributions clean package
    Warning

    For production, the version must not include SNAPSHOT (as packages with a SNAPSHOT are always downloaded, not cached). To remove SNAPASHOT or create your own release (use a specific name to prevent package conflicts in the cache), update the changelist property. From the Weasis root folder, execute:

    mvn -Dchangelist=-mybuild-beta clean install
    mvn -Dchangelist=-mybuild-beta -P compressXZ -f weasis-distributions clean package

Building native binaries and installers

Starting with Version4.0.0, the native installer has fully replaced the portable and Java WebStart distributions.

The official build process is executed via GitHub Actions using GitHub-hosted runners across Linux, macOS, and Windows.

However, you can also build the native binaries and installer locally using the package-weasis.sh script. This process is not guaranteed to work on all systems, as it requires proper configuration of multiple tools. Refer to the jpackage prerequisites for more details.

  • Obtain the weasis-native.zip file, extract the archive, and navigate to the root folder in a Bash prompt.
  • Run the following command to build the native binaries and installer:
    ./build/script/package-weasis.sh --jdk "/home/.jdks/openjdk-23"
Note
  • Replace --jdk with the path to your local JDK installation.
  • To generate only the native binaries (without creating an installer), include the --no-installer flag.
  • For additional command options, run:
    ./build/script/package-weasis.sh --help
Tip

On Windows the bash script must be executed with Git Bash or Cygwin. Avoid having spaces in the input and output paths.