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-0.7.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.


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

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.


toolName

Type

String

Default value

<none>

Property

jreleaser.tool.name

Required

true

Description

The name of the tool.


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-assemble

Assemble all distributions.

configFile

Type

File

Default value

<none>

Property

jreleaser.config.file

Required

true

Description

The config file.


distributionName

Type

String

Default value

<none>

Property

jreleaser.distribution.name

Required

false

Description

The name of the distribution to be assembled.


assemblerName

Type

String

Default value

<none>

Property

jreleaser.assembler.name

Required

false

Description

The name of the assembler to run.


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-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.


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

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.


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

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.


distributionName

Type

String

Default value

<none>

Property

jreleaser.uploader.type

Required

false

Description

The type of the uploader to use.


toolName

Type

String

Default value

<none>

Property

jreleaser.uploader.name

Required

false

Description

The name of the uploader to use.


dryrun

Type

boolean

Default value

false

Property

jreleaser.dryrun

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

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-release

Create or update a release.

configFile

Type

File

Default value

<none>

Property

jreleaser.config.file

Required

true

Description

The config file.


dryrun

Type

boolean

Default value

false

Property

jreleaser.dryrun

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

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-prepare

Prepare all distributions.

configFile

Type

File

Default value

<none>

Property

jreleaser.config.file

Required

true

Description

The config file.


distributionName

Type

String

Default value

<none

Property

jreleaser.distribution.name

Required

false

Description

The name of the distribution to be prepared.


toolName

Type

String

Default value

<none>

Property

jreleaser.tool.name

Required

false

Description

The name of the tool for preparing distributions.


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

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.


distributionName

Type

String

Default value

<none>

Property

jreleaser.distribution.name

Required

false

Description

The name of the distribution to be packaged.


toolName

Type

String

Default value

<none>

Property

jreleaser.tool.name

Required

false

Description

The name of the tool for packaging distributions.


dryrun

Type

boolean

Default value

false

Property

jreleaser.dryrun

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

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.


distributionName

Type

String

Default value

<none>

Property

jreleaser.distribution.name

Required

false

Description

The name of the distribution to be published.


toolName

Type

String

Default value

<none>

Property

jreleaser.tool.name

Required

false

Description

The name of the tool for publishing distributions.


dryrun

Type

boolean

Default value

false

Property

jreleaser.dryrun

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

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.

configFile

Type

File

Default value

<none>

Property

jreleaser.config.file

Required

true

Description

The config file.


announcerName

Type

String

Default value

<none>

Property

jreleaser.announcer.name

Required

false

Description

The name of the announcer to be used.


dryrun

Type

boolean

Default value

false

Property

jreleaser.dryrun

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

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.

configFile

Type

File

Default value

<none>

Property

jreleaser.config.file

Required

true

Description

The config file.


dryrun

Type

boolean

Default value

false

Property

jreleaser.dryrun

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

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.