Apache Ant

Your Ant build must be configured to create binary distributions (Zips and Tars). Review the Ant documentation to find out how to do that. Follow the instructions in the Install section to download and install the JReleaser Ant tasks. Once configured you can bootstrap a configuration file

$ ant jreleaser-init -Djreleaser.format=yml
Buildfile: /Home/duke/app/build.xml

Writing file /Home/duke/app/jreleaser.yml
JReleaser initialized at /Home/duke/app

Total time: 0 seconds
JReleaser supports the following formats: yml, toml, json.

This generates a jreleaser.yml file with the following configuration

  name: app
  version: 1.0.0-SNAPSHOT
  description: Awesome App
  longDescription: Awesome App
  website: https://acme.com/app
    - Duke
  license: Apache-2
    groupId: com.acme
    version: 8
    inceptionYear: 2021

    owner: duke

      - path: path/to/{{distributionName}}-{{projectVersion}}.zip

Edit the file to suite your needs. You may use the Archive assembler to create a binary distribution, or any other existing Ant tasks you may already have to create such files. Once you have edited the file you may verify its configuration by invoking

$ ant jreleaser-config

At any time you may invoke any of the other commands, but when it’s time to make a release you have to invoke

$ ant jreleaser-full-release
Buildfile: /Home/duke/app/build.xml

JReleaser 0.9.1-SNAPSHOT
Configuring with jreleaser.yml
 - basedir set to /Home/duke/app
Reading configuration
Loading properties from /Home/duke/.jreleaser/config.properties
Validating configuration
Project version set to 1.0.0
Release is not snapshot
Timestamp is 2021-03-28T12:25:16.219+02:00
HEAD is at c3e39f1
Platform is osx-x86_64
dryrun set to false
Generating changelog: out/jreleaser/release/CHANGELOG.md
Calculating checksums
  [checksum] target/distributions/app/app-1.0.0.zip
Signing files
Signing is not enabled. Skipping
Uploading is not enabled. Skipping.
Releasing to https://github.com/duke/app
 - Uploading app-1.0.0.zip
 - Uploading checksums.txt
Preparing distributions
  - Preparing app distribution
Packaging distributions
  - Packaging app distribution
Publishing distributions
  - Publishing app distribution
Announcing release
Announcing is not enabled. Skipping.
JReleaser succeeded after 0.894s
Writing output properties to out/jreleaser/output.properties

Total time: 4 seconds

This command performs the following actions:

  • checksums all artifacts.

  • signs all files (if signing is enabled).

  • creates a release at the chosen Git repository.

  • prepares, packages, and uploads configured packagers (brew, jbang, etc).

  • announces the release.