JReleaser Ant Tasks

Executes a JReleaser workflow as Ant tasks.

Install

Download jreleaser-ant-tasks ZIP bundle from the releases page and unzip it in your project. Place all JARs inside the lib folder. Create this folder if there is none. Add the following elements to your build.xml file

build.xml
<path id="jreleaser.classpath">
    <fileset dir="lib">
        <include name="jreleaser-ant-tasks-1.1.0/*.jar"/>
    </fileset>
</path>

<import>
  <javaresource name="org/jreleaser/ant/targets.xml"
                classpathref="jreleaser.classpath"/>
</import>

Configuration

JReleaser must be configured using the YAML, TOML, or JSON DSLs shown at Configuration.

Environment Variables

The following settings may also be specified via environment variables

Setting

Environment Variable

Default

outputDir

JRELEASER_OUTPUT_DIRECTORY

out

JRELEASER_DEFAULT_GIT_REMOTE

origin

Tasks

The following tasks are provided:

jreleaser-init

Create a jreleaser config file.

format

Type

String

Default value

<none>

Property

jreleaser.format

Required

true

Description

Configuration file format. Currently supported formats are: yml, toml, json.

overwrite

Type

boolean

Default value

false

Property

jreleaser.overwrite

Required

false

Description

Overwrites existing template files.

jreleaser-config

Display current configuration.

configFile

Type

File

Default value

<none>

Property

jreleaser.config.file

Required

true

Description

The config file.


full

Type

boolean

Default value

false

Property

jreleaser.full

Required

false

Description

Display full configuration.


assembly

Type

boolean

Default value

false

Property

jreleaser.assembly

Required

false

Description

Display only assembly configuration.


download

Type

boolean

Default value

false

Property

jreleaser.download

Required

false

Description

Display only download configuration.


outputDir

Type

File

Default value

"build"

Property

jreleaser.outputdir

Required

false

Description

Overwrites existing template files.


selectCurrentPlatform

Type

boolean

Default value

false

Property

jreleaser.select.current.platform

Required

false

Description

Activates paths matching the current platform.


selectPlatforms

Type

List<String>

Default value

[]

Property
Required

false

Description

Activates paths matching the given platform.


skip

Type

boolean

Default value

false

Property

jreleaser.skip

Required

false

Description

Skips execution of this task.

jreleaser-template

Generate a tool/announcer template.

distributionName

Type

String

Default value

<none>

Property

jreleaser.distribution.name

Required

true

Description

The name of the distribution.


announcerName

Type

String

Default value

<none>

Property

jreleaser.announcer.name

Required

false

Description

The name of the announcer to be used.


distributionType

Type

String

Default value

JAVA_BINARY

Property

jreleaser.distribution.type

Required

false

Description

The name of the distribution.


packagerName

Type

String

Default value

<none>

Property

jreleaser.packager.name

Required

true

Description

The name of the packager.


outputDir

Type

File

Default value

"build"

Property

jreleaser.outputdir

Required

false

Description

Overwrites existing template files.


overwrite

Type

boolean

Default value

false

Property

jreleaser.overwrite

Required

false

Description

Overwrites existing template files.


snapshot

Type

boolean

Default value

false

Property

jreleaser.snapshot

Required

false

Description

Lookup snapshot specific template files.


skip

Type

boolean

Default value

false

Property

jreleaser.skip

Required

false

Description

Skips execution of this task.

jreleaser-download

Downloads assets.

configFile

Type

File

Default value

<none>

Property

jreleaser.config.file

Required

true

Description

The config file.


downloaderNames

Type

List<String>

Default value

<none>

Required

false

Description

Names of downloaders to include.


downloaderTypes

Type

List<String>

Default value

<none>

Required

false

Description

Types of downloaders to include.


dryrun

Type

boolean

Default value

false

Property

jreleaser.dry.run

Required

false Description: Skips remote operations.


excludedDownloaderNames

Type

List<String>

Default value

<none>

Required

false

Description

Types of downloaders to exclude.


excludedDownloaderTypes

Type

List<String>

Default value

<none>

Required

false

Description

Types of downloaders to exclude.


outputDir

Type

File

Default value

"build"

Property

jreleaser.outputdir

Required

false

Description

Overwrites existing template files.


skip

Type

boolean

Default value

false

Property

jreleaser.skip

Required

false

Description

Skips execution of this task.

jreleaser-assemble

Assemble all distributions.

assemblers

Type

List<String>

Default value

<none>

Required

false

Description

Names of assemblers to run.


configFile

Type

File

Default value

<none>

Property

jreleaser.config.file

Required

true

Description

The config file.


distributions

Type

List<String>

Default value

<none>

Required

false

Description

Name of the distributions to be assembled.


excludedAssemblers

Type

List<String>

Default value

<none>

Required

false

Description

Names of assemblers to exclude.


excludedDistributions

Type

List<String>

Default value

<none>

Required

false

Description

Names of distributions to exclude.


outputDir

Type

File

Default value

"build"

Property

jreleaser.outputdir

Required

false

Description

Overwrites existing template files.


selectCurrentPlatform

Type

boolean

Default value

false

Property

jreleaser.select.current.platform

Required

false

Description

Activates paths matching the current platform.


selectPlatforms

Type

List<String>

Default value

[]

Property
Required

false

Description

Activates paths matching the given platform.


skip

Type

boolean

Default value

false

Property

jreleaser.skip

Required

false

Description

Skips execution of this task.

jreleaser-changelog

Calculate the changelog.

configFile

Type

File

Default value

<none>

Property

jreleaser.config.file

Required

true

Description

The config file.


outputDir

Type

File

Default value

"build"

Property

jreleaser.outputdir

Required

false

Description

Overwrites existing template files.


skip

Type

boolean

Default value

false

Property

jreleaser.skip

Required

false

Description

Skips execution of this task.

jreleaser-checksum

Calculate checksums.

configFile

Type

File

Default value

<none>

Property

jreleaser.config.file

Required

true

Description

The config file.


distributions

Type

List<String>

Default value

<none>

Required

false

Description

Name of the distributions to include.


excludedDistributions

Type

List<String>

Default value

<none>

Required

false

Description

Names of distributions to exclude.


outputDir

Type

File

Default value

"build"

Property

jreleaser.outputdir

Required

false

Description

Overwrites existing template files.


selectCurrentPlatform

Type

boolean

Default value

false

Property

jreleaser.select.current.platform

Required

false

Description

Activates paths matching the current platform.


selectPlatforms

Type

List<String>

Default value

[]

Property
Required

false

Description

Activates paths matching the given platform.


skip

Type

boolean

Default value

false

Property

jreleaser.skip

Required

false

Description

Skips execution of this task.

jreleaser-sign

Sign release artifacts.

configFile

Type

File

Default value

<none>

Property

jreleaser.config.file

Required

true

Description

The config file.


distributions

Type

List<String>

Default value

<none>

Required

false

Description

Name of the distributions to include.


excludedDistributions

Type

List<String>

Default value

<none>

Required

false

Description

Names of distributions to exclude.


outputDir

Type

File

Default value

"build"

Property

jreleaser.outputdir

Required

false

Description

Overwrites existing template files.


selectCurrentPlatform

Type

boolean

Default value

false

Property

jreleaser.select.current.platform

Required

false

Description

Activates paths matching the current platform.


selectPlatforms

Type

List<String>

Default value

[]

Property
Required

false

Description

Activates paths matching the given platform.


skip

Type

boolean

Default value

false

Property

jreleaser.skip

Required

false

Description

Skips execution of this task.

jreleaser-upload

Uploads all files.

configFile

Type

File

Default value

<none>

Property

jreleaser.config.file

Required

true

Description

The config file.


distributions

Type

List<String>

Default value

<none>

Required

false

Description

Name of the distributions to include.


dryrun

Type

boolean

Default value

false

Property

jreleaser.dry.run

Required

false Description: Skips remote operations.


excludedDistributions

Type

List<String>

Default value

<none>

Required

false

Description

Names of distributions to exclude.


excludedUploaderNames

Type

List<String>

Default value

<none>

Required

false

Description

Types of uploaders to exclude.


excludedUploaderTypes

Type

List<String>

Default value

<none>

Required

false

Description

Types of uploaders to exclude.


outputDir

Type

File

Default value

"build"

Property

jreleaser.outputdir

Required

false

Description

Overwrites existing template files.


selectCurrentPlatform

Type

boolean

Default value

false

Property

jreleaser.select.current.platform

Required

false

Description

Activates paths matching the current platform.


selectPlatforms

Type

List<String>

Default value

[]

Property
Required

false

Description

Activates paths matching the given platform.


skip

Type

boolean

Default value

false

Property

jreleaser.skip

Required

false

Description

Skips execution of this task.


uploaderNames

Type

List<String>

Default value

<none>

Required

false

Description

Names of uploaders to include.


uploaderTypes

Type

List<String>

Default value

<none>

Required

false

Description

Types of uploaders to include.

jreleaser-release

Create or update a release.

configFile

Type

File

Default value

<none>

Property

jreleaser.config.file

Required

true

Description

The config file.


distributions

Type

List<String>

Default value

<none>

Required

false

Description

Name of the distributions to include.


excludedDistributions

Type

List<String>

Default value

<none>

Required

false

Description

Names of distributions to exclude.


excludedUploaderNames

Type

List<String>

Default value

<none>

Required

false

Description

Types of uploaders to exclude.


excludedUploaderTypes

Type

List<String>

Default value

<none>

Required

false

Description

Types of uploaders to exclude.


dryrun

Type

boolean

Default value

false

Property

jreleaser.dry.run

Required

false Description: Skips remote operations.


outputDir

Type

File

Default value

"build"

Property

jreleaser.outputdir

Required

false

Description

Overwrites existing template files.


selectCurrentPlatform

Type

boolean

Default value

false

Property

jreleaser.select.current.platform

Required

false

Description

Activates paths matching the current platform.


selectPlatforms

Type

List<String>

Default value

[]

Property
Required

false

Description

Activates paths matching the given platform.


skip

Type

boolean

Default value

false

Property

jreleaser.skip

Required

false

Description

Skips execution of this task.


uploaderNames

Type

List<String>

Default value

<none>

Required

false

Description

Names of uploaders to include.


uploaderTypes

Type

List<String>

Default value

<none>

Required

false

Description

Types of uploaders to include.

jreleaser-prepare

Prepare all distributions.

configFile

Type

File

Default value

<none>

Property

jreleaser.config.file

Required

true

Description

The config file.


distributions

Type

List<String>

Default value

<none>

Required

false

Description

Name of the distributions to include.


excludedDistributions

Type

List<String>

Default value

<none>

Required

false

Description

Names of distributions to exclude.


excludedPackagers

Type

List<String>

Default value

<none>

Required

false

Description

Names of packagers to exclude.


outputDir

Type

File

Default value

"build"

Property

jreleaser.outputdir

Required

false

Description

Overwrites existing template files.


packagers

Type

List<String>

Default value

<none>

Required

false

Description

Name of the packagers to include.


selectCurrentPlatform

Type

boolean

Default value

false

Property

jreleaser.select.current.platform

Required

false

Description

Activates paths matching the current platform.


selectPlatforms

Type

List<String>

Default value

[]

Property
Required

false

Description

Activates paths matching the given platform.


skip

Type

boolean

Default value

false

Property

jreleaser.skip

Required

false

Description

Skips execution of this task.

jreleaser-package

Package all distributions.

configFile

Type

File

Default value

<none>

Property

jreleaser.config.file

Required

true

Description

The config file.


distributions

Type

List<String>

Default value

<none>

Required

false

Description

Name of the distributions to include.


excludedDistributions

Type

List<String>

Default value

<none>

Required

false

Description

Names of distributions to exclude.


excludedPackagers

Type

List<String>

Default value

<none>

Required

false

Description

Names of packagers to exclude.


outputDir

Type

File

Default value

"build"

Property

jreleaser.outputdir

Required

false

Description

Overwrites existing template files.


packagers

Type

List<String>

Default value

<none>

Required

false

Description

Name of the packagers to include.


selectCurrentPlatform

Type

boolean

Default value

false

Property

jreleaser.select.current.platform

Required

false

Description

Activates paths matching the current platform.


selectPlatforms

Type

List<String>

Default value

[]

Property
Required

false

Description

Activates paths matching the given platform.


skip

Type

boolean

Default value

false

Property

jreleaser.skip

Required

false

Description

Skips execution of this task.

jreleaser-publish

Publish all distributions.

configFile

Type

File

Default value

<none>

Property

jreleaser.config.file

Required

true

Description

The config file.


distributions

Type

List<String>

Default value

<none>

Required

false

Description

Name of the distributions to include.


excludedDistributions

Type

List<String>

Default value

<none>

Required

false

Description

Names of distributions to exclude.


excludedPackagers

Type

List<String>

Default value

<none>

Required

false

Description

Names of packagers to exclude.


outputDir

Type

File

Default value

"build"

Property

jreleaser.outputdir

Required

false

Description

Overwrites existing template files.


packagers

Type

List<String>

Default value

<none>

Required

false

Description

Name of the packagers to include.


selectCurrentPlatform

Type

boolean

Default value

false

Property

jreleaser.select.current.platform

Required

false

Description

Activates paths matching the current platform.


selectPlatforms

Type

List<String>

Default value

[]

Property
Required

false

Description

Activates paths matching the given platform.


skip

Type

boolean

Default value

false

Property

jreleaser.skip

Required

false

Description

Skips execution of this task.

jreleaser-announce

Announce a release.

announcers

Type

List<String>

Default value

<none>

Required

false

Description

Name of the announcers to include.


configFile

Type

File

Default value

<none>

Property

jreleaser.config.file

Required

true

Description

The config file.


dryrun

Type

boolean

Default value

false

Property

jreleaser.dry.run

Required

false Description: Skips remote operations.


excludedAnnouncers

Type

List<String>

Default value

<none>

Required

false

Description

Names of announcers to exclude.


outputDir

Type

File

Default value

"build"

Property

jreleaser.outputdir

Required

false

Description

Overwrites existing template files.


selectCurrentPlatform

Type

boolean

Default value

false

Property

jreleaser.select.current.platform

Required

false

Description

Activates paths matching the current platform.


selectPlatforms

Type

List<String>

Default value

[]

Property
Required

false

Description

Activates paths matching the given platform.


skip

Type

boolean

Default value

false

Property

jreleaser.skip

Required

false

Description

Skips execution of this task.

jreleaser-full-release

Perform a full release.

announcers

Type

List<String>

Default value

<none>

Required

false

Description

Name of the announcers to include.


configFile

Type

File

Default value

<none>

Property

jreleaser.config.file

Required

true

Description

The config file.


distributions

Type

List<String>

Default value

<none>

Required

false

Description

Name of the distributions to include.


dryrun

Type

boolean

Default value

false

Property

jreleaser.dry.run

Required

false Description: Skips remote operations.


excludedAnnouncers

Type

List<String>

Default value

<none>

Required

false

Description

Names of announcers to exclude.


excludedDistributions

Type

List<String>

Default value

<none>

Required

false

Description

Names of distributions to exclude.


excludedPackagers

Type

List<String>

Default value

<none>

Required

false

Description

Names of packagers to exclude.


excludedUploaderNames

Type

List<String>

Default value

<none>

Required

false

Description

Types of uploaders to exclude.


excludedUploaderTypes

Type

List<String>

Default value

<none>

Required

false

Description

Types of uploaders to exclude.


outputDir

Type

File

Default value

"build"

Property

jreleaser.outputdir

Required

false

Description

Overwrites existing template files.


packagers

Type

List<String>

Default value

<none>

Required

false

Description

Name of the packagers to include.


selectCurrentPlatform

Type

boolean

Default value

false

Property

jreleaser.select.current.platform

Required

false

Description

Activates paths matching the current platform.


selectPlatforms

Type

List<String>

Default value

[]

Property
Required

false

Description

Activates paths matching the given platform.


skip

Type

boolean

Default value

false

Property

jreleaser.skip

Required

false

Description

Skips execution of this task.


uploaderNames

Type

List<String>

Default value

<none>

Required

false

Description

Names of uploaders to include.


uploaderTypes

Type

List<String>

Default value

<none>

Required

false

Description

Types of uploaders to include.