These instructions describe how to build Weasis directly from the Git repository on any platform. For building Weasis from an IDE, see Weasis plug-in development guidelines.
- JDK 21 or higher
- Maven 3.5.3 or higher
If your computer is behind a proxy server, configure maven.
Getting the Source
In order to clone the repository, first install GIT and either clone using a graphical GIT client or directly from the command line using the command:
git clone https://github.com/nroduit/Weasis.git
Building all Plug-ins
Go in the Weasis directory, compile and install all the plug-ins in the local Maven repository:
mvn clean install
target/native-dist/) v4.0.0 :
mvn -P compressXZ -f weasis-distributions clean packageTip
-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 packageWarning
For production, version must not be SNAPSHOT (otherwise packages will not be kept in cache). So to remove SNAPASHOT or to make your own release (for avoiding package mix-up in cache), modify 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
Since v4.0.0 the native installer has completely replaced the portable and the Java Webstart distributions.
However, it is possible to run a local script
package-weasis.sh on most systems but without guarantee because the system must have a correct configuration of several tools (see jpackage prerequisites).
weasis-native.zip, unzip the archive and then go to the root folder with a bash prompt.
- Build the native binaries and the installer:
./build/script/package-weasis.sh --jdk "/home/.jdks/openjdk-21"
- In the commands above, adapt the
--jdkvalue to your local JDK path.
- For building only the native binaries (without installer), add the parameter
- In order to see the use of the script and its options, run:
On Windows the bash script must be executed with Git Bash or Cygwin. Avoid having spaces in the input and output paths.