saker.jar Documentation TaskDoc JavaDoc Packages
  1. saker.jar
  2. JAR creation
  3. Basics

Basics

You can create Java archives using the saker.jar.create() task with the saker.build system. The task will create the archive based on the input parameters, and will put it in the build directory of the build execution.

The task is based on saker.zip.create() and extends its functionality with additional parameters:

  • Allows specifying manifest attributes.
  • Allows specifying service declarations.
  • Helps injecting main class and version attributes into the module-info.class entry.
  • Allows specifying multi-release contents.

Output

The output location of the task will be always in the build directory of the build execution. For the saker.jar.create() task, it will be placed to the {build-dir}/saker.jar.create/{Output-parameter} location.

If you'd like to place it somewhere else than the build directory, we recommend that you copy it after the task completes.

The task ensures that an archive will be created only once for a given output location. Multiple archive creation tasks won't overwrite each others results.