JReleaser Maven Plugin

Executes a JReleaser workflow as a Maven plugin.

Install

pom.xml
<plugin>
  <groupId>org.jreleaser</groupId>
  <artifactId>jreleaser-maven-plugin</artifactId>
  <version>0.7.0</version>
</plugin>

Configuration

JReleaser may be configured using the Maven DSL shown at Configuration. Alternatively, an external configuration file may be used if the <configFile> field or jreleaser.config.file property is set.

Defaults

The following values will be taken directly from the pom.xml file and added to JReleaser’s configuration when the matching JReleaser element has not been explicitly configured:

POM JReleaser

project.artifactId

project.name

project.version

project.version

project.description

project.description

project.url

project.website

project.organization.url

project.website

project.groupId

project.java.groupId

project.artifactId

project.java.artifactId

project.inceptionYear

project.extraProperties.inceptionYear

The value of project.java.multiProject will be set to true if the current Maven session has more than 1 project.

The value of project.authors will be resolved by matching all <developer> entries that have an author role. If no developer entries are found then all developers will be added as authors. The value of <developer><name> will be queried first, if not found then <developer><id> will be used as fallback.

The value of project.license will be resolved from <licenses> with the first <license> that defines <name>.

The value of project.java.version will be determined following these expressions in order:

  • ${maven.compiler.release}

  • ${maven.compiler.target}

  • ${maven.compiler.source}

  • System.getProperty("java.version")

Environment Variables

The following settings may also be specified via environment variables

Setting

Environment Variable

Default

JRELEASER_DEFAULT_GIT_REMOTE

origin

Goals

None of the exposed MOJOs are bound to a specific life-cycle phase, letting you decide when and how that should happen in your build.

The following MOJOs are provided:

jreleaser:config

Display current configuration.

Available parameters:

  • assembly
    Display assembly configuration.
    Type: boolean
    User property: jreleaser.config.assembly

  • configFile
    External configuration file.
    Type: File
    User property: jreleaser.config.file

  • full
    Display full configuration.
    Type: boolean
    User property: jreleaser.config.full

  • gitRootSearch
    Searches for the Git root.
    Type: boolean
    User property: jreleaser.git.root.search

  • selectCurrentPlatform
    Activates paths matching the current platform.
    Type: boolean
    User property: jreleaser.select.current.platform

  • selectPlatforms
    Activates paths matching the given platform.
    Type: String[]
    User property: jreleaser.select.platform

  • skip
    Skip execution.
    Type: boolean
    User property: jreleaser.config.skip

jreleaser:template

Generate a tool/announcer template.

Available parameters:

  • announcerName
    The name of the announcer
    Type: String
    User property: jreleaser.announcer.name

  • distributionName
    The name of the distribution
    Type: String
    User property: jreleaser.template.distribution.name

  • distributionType (Default: JAVA_BINARY)
    The type of the distribution
    Type: Distributio.DistributionType
    User property: jreleaser.template.distribution.type

  • outputDirectory (Default: ${project.build.directory}/jreleaser)
    Type: File
    User property: jreleaser.output.directory

  • overwrite
    Overwrite existing files.
    Type: boolean
    User property: jreleaser.template.overwrite

  • skip
    Skip execution.
    Type: boolean
    User property: jreleaser.template.skip

  • snapshot
    Use snapshot templates.
    Type: boolean
    User property: jreleaser.template.snapshot

  • toolName
    The name of the tool.
    Type: String
    User property: jreleaser.template.tool.name

jreleaser:assemble

Assemble all distributions.

Available parameters:

  • assemblerName
    The name of the assembler.
    Type: String
    User property: jreleaser.assembler.name

  • configFile
    External configuration file.
    Type: File
    User property: jreleaser.config.file

  • distributionName
    The name of the distribution.
    Type: String
    User property: jreleaser.distribution.name

  • gitRootSearch
    Searches for the Git root.
    Type: boolean
    User property: jreleaser.git.root.search

  • outputDirectory (Default: ${project.build.directory}/jreleaser)
    Type: File
    User property: jreleaser.output.directory

  • skip
    Skip execution.
    Type: boolean
    User property: jreleaser.assemble.skip

jreleaser:changelog

Calculate the changelog.

Available parameters:

  • configFile
    External configuration file.
    Type: File
    User property: jreleaser.config.file

  • gitRootSearch
    Searches for the Git root.
    Type: boolean
    User property: jreleaser.git.root.search

  • outputDirectory (Default: ${project.build.directory}/jreleaser)
    Type: File
    User property: jreleaser.output.directory

  • skip
    Skip execution.
    Type: boolean
    User property: jreleaser.changelog.skip

jreleaser:checksum

Calculate checksums.

Available parameters:

  • configFile
    External configuration file.
    Type: File
    User property: jreleaser.config.file

  • gitRootSearch
    Searches for the Git root.
    Type: boolean
    User property: jreleaser.git.root.search

  • outputDirectory (Default: ${project.build.directory}/jreleaser)
    Type: File
    User property: jreleaser.output.directory

  • selectCurrentPlatform
    Activates paths matching the current platform.
    Type: boolean
    User property: jreleaser.select.current.platform

  • selectPlatforms
    Activates paths matching the given platform.
    Type: String[]
    User property: jreleaser.select.platform

  • skip
    Skip execution.
    Type: boolean
    User property: jreleaser.checksum.skip

jreleaser:sign

Sign release artifacts.

Available parameters:

  • configFile
    External configuration file.
    Type: File
    User property: jreleaser.config.file

  • gitRootSearch
    Searches for the Git root.
    Type: boolean
    User property: jreleaser.git.root.search

  • outputDirectory (Default: ${project.build.directory}/jreleaser)
    Type: File
    User property: jreleaser.output.directory

  • selectCurrentPlatform
    Activates paths matching the current platform.
    Type: boolean
    User property: jreleaser.select.current.platform

  • selectPlatforms
    Activates paths matching the given platform.
    Type: String[]
    User property: jreleaser.select.platform

  • skip
    Skip execution.
    Type: boolean
    User property: jreleaser.sign.skip

jreleaser:upload

Uploads all artifacts.

Available parameters:

  • configFile
    External configuration file.
    Type: File
    User property: jreleaser.config.file

  • dryrun
    Skips remote operations.
    Type: boolean
    User property: jreleaser.dryrun

  • gitRootSearch
    Searches for the Git root.
    Type: boolean
    User property: jreleaser.git.root.search

  • outputDirectory (Default: ${project.build.directory}/jreleaser)
    Type: File
    User property: jreleaser.output.directory

  • selectCurrentPlatform
    Activates paths matching the current platform.
    Type: boolean
    User property: jreleaser.select.current.platform

  • selectPlatforms
    Activates paths matching the given platform.
    Type: String[]
    User property: jreleaser.select.platform

  • skip
    Skip execution.
    Type: boolean
    User property: jreleaser.upload.skip

  • uploaderName
    The name of the uploader.
    Type: String
    User property: jreleaser.uploader.name

  • uploaderType
    The type of the uploader.
    Type: String
    User property: jreleaser.uploader.type

jreleaser:release

Create or update a release.

Available parameters:

  • configFile
    External configuration file.
    Type: File
    User property: jreleaser.config.file

  • dryrun
    Skips remote operations.
    Type: boolean
    User property: jreleaser.dryrun

  • gitRootSearch
    Searches for the Git root.
    Type: boolean
    User property: jreleaser.git.root.search

  • outputDirectory (Default: ${project.build.directory}/jreleaser)
    Type: File
    User property: jreleaser.output.directory

  • selectCurrentPlatform
    Activates paths matching the current platform.
    Type: boolean
    User property: jreleaser.select.current.platform

  • selectPlatforms
    Activates paths matching the given platform.
    Type: String[]
    User property: jreleaser.select.platform

  • skip
    Skip execution.
    Type: boolean
    User property: jreleaser.release.skip

jreleaser:prepare

Prepare all distributions.

Available parameters:

  • configFile
    External configuration file.
    Type: File
    User property: jreleaser.config.file

  • distributionName
    The name of the distribution.
    Type: String
    User property: jreleaser.distribution.name

  • dryrun
    Skips remote operations.
    Type: boolean
    User property: jreleaser.dryrun

  • gitRootSearch
    Searches for the Git root.
    Type: boolean
    User property: jreleaser.git.root.search

  • outputDirectory (Default: ${project.build.directory}/jreleaser)
    Type: File
    User property: jreleaser.output.directory

  • selectCurrentPlatform
    Activates paths matching the current platform.
    Type: boolean
    User property: jreleaser.select.current.platform

  • selectPlatforms
    Activates paths matching the given platform.
    Type: String[]
    User property: jreleaser.select.platform

  • skip
    Skip execution.
    Type: boolean
    User property: jreleaser.prepare.skip

  • toolName
    The name of the tool.
    Type: String
    User property: jreleaser.tool.name

jreleaser:package

Package all distributions.

Available parameters:

  • configFile
    External configuration file.
    Type: File
    User property: jreleaser.config.file

  • distributionName
    The name of the distribution.
    Type: String
    User property: jreleaser.distribution.name

  • dryrun
    Skips remote operations.
    Type: boolean
    User property: jreleaser.dryrun

  • gitRootSearch
    Searches for the Git root.
    Type: boolean
    User property: jreleaser.git.root.search

  • outputDirectory (Default: ${project.build.directory}/jreleaser)
    Type: File
    User property: jreleaser.output.directory

  • selectCurrentPlatform
    Activates paths matching the current platform.
    Type: boolean
    User property: jreleaser.select.current.platform

  • selectPlatforms
    Activates paths matching the given platform.
    Type: String[]
    User property: jreleaser.select.platform

  • skip
    Skip execution.
    Type: boolean
    User property: jreleaser.package.skip

  • toolName
    The name of the tool.
    Type: String
    User property: jreleaser.tool.name

jreleaser:publish

Publish all distributions.

Available parameters:

  • configFile
    External configuration file.
    Type: File
    User property: jreleaser.config.file

  • distributionName
    The name of the distribution.
    Type: String
    User property: jreleaser.distribution.name

  • dryrun
    Skips remote operations.
    Type: boolean
    User property: jreleaser.dryrun

  • gitRootSearch
    Searches for the Git root.
    Type: boolean
    User property: jreleaser.git.root.search

  • outputDirectory (Default: ${project.build.directory}/jreleaser)
    Type: File
    User property: jreleaser.output.directory

  • selectCurrentPlatform
    Activates paths matching the current platform.
    Type: boolean
    User property: jreleaser.select.current.platform

  • selectPlatforms
    Activates paths matching the given platform.
    Type: String[]
    User property: jreleaser.select.platform

  • skip
    Skip execution.
    Type: boolean
    User property: jreleaser.publish.skip

  • toolName
    The name of the tool.
    Type: String
    User property: jreleaser.tool.name

jreleaser:announce

Announce a release.

Available parameters:

  • announcerName
    The name of the distribution.
    Type: String
    User property: jreleaser.announcer.name

  • configFile
    External configuration file.
    Type: File
    User property: jreleaser.config.file

  • dryrun
    Skips remote operations.
    Type: boolean
    User property: jreleaser.dryrun

  • gitRootSearch
    Searches for the Git root.
    Type: boolean
    User property: jreleaser.git.root.search

  • outputDirectory (Default: ${project.build.directory}/jreleaser)
    Type: File
    User property: jreleaser.output.directory

  • selectCurrentPlatform
    Activates paths matching the current platform.
    Type: boolean
    User property: jreleaser.select.current.platform

  • selectPlatforms
    Activates paths matching the given platform.
    Type: String[]
    User property: jreleaser.select.platform

  • skip
    Skip execution.
    Type: boolean
    User property: jreleaser.announce.skip

jreleaser:full-release

Perform a full release.

Available parameters:

  • configFile
    External configuration file.
    Type: File
    User property: jreleaser.config.file

  • dryrun
    Skips remote operations.
    Type: boolean
    User property: jreleaser.dryrun

  • gitRootSearch
    Searches for the Git root.
    Type: boolean
    User property: jreleaser.git.root.search

  • outputDirectory (Default: ${project.build.directory}/jreleaser)
    Type: File
    User property: jreleaser.output.directory

  • selectCurrentPlatform
    Activates paths matching the current platform.
    Type: boolean
    User property: jreleaser.select.current.platform

  • selectPlatforms
    Activates paths matching the given platform.
    Type: String[]
    User property: jreleaser.select.platform

  • skip
    Skip execution.
    Type: boolean
    User property: jreleaser.full.release.skip

jreleaser:auto-config-release

Create or update a release with auto-config enabled.

Available parameters:

  • armored
    Generate ascii armored signatures.
    Type: boolean
    User property: jreleaser.armored

  • branch
    The release branch.
    Type: String
    User property: jreleaser.release.branch

  • changelog
    Path to changelog file.
    Type: String
    User property: jreleaser.changelog

  • changelogFormatted
    Format generated changelog.
    Type: boolean
    User property: jreleaser.changelog.formatted

  • commitAuthorEmail
    Commit author e-mail.
    Type: String
    User property: jreleaser.commit.author.email

  • commitAuthorName
    Commit author name.
    Type: String
    User property: jreleaser.commit.author.name

  • draft
    If the release is a draft.
    Type: boolean
    User property: jreleaser.draft

  • dryrun
    Skips remote operations.
    Type: boolean
    User property: jreleaser.dryrun

  • files
    Input file(s) to be uploaded.
    Type: String[]
    User property: jreleaser.files

  • gitRootSearch
    Searches for the Git root.
    Type: boolean
    User property: jreleaser.git.root.search

  • globs
    Input file(s) to be uploaded (as globs).
    Type: String[]
    User property: jreleaser.globs

  • milestoneName
    The milestone name.
    Type: String
    User property: jreleaser.milestone.name

  • outputDirectory (Default: ${project.build.directory}/jreleaser)
    Type: File
    User property: jreleaser.output.directory

  • overwrite
    Overwrite an existing release.
    Type: boolean
    User property: jreleaser.overwrite

  • prerelease
    If the release is a prerelease.
    Type: boolean
    User property: jreleaser.prerelease

  • prereleasePattern
    The prerelease pattern.
    Type: String
    User property: jreleaser.prerelease.pattern

  • projectName (Default: ${project.artifactId})
    The project name.
    Type: String
    User property: jreleaser.project.name

  • projectSnapshotLabel
    The project snapshot label.
    Type: String
    User property: jreleaser.project.snapshot.label

  • projectSnapshotPattern (Default: .*-SNAPSHOT)
    The project snapshot pattern.
    Type: String
    User property: jreleaser.project.snapshot.pattern

  • projectSnapshotFullChangelog
    Calculate full changelog since last non-snapshot release.
    Type: boolean
    User property: jreleaser.project.snapshot.full.changelog

  • projectVersion (Default: ${project.version})
    The project version.
    Type: String
    User property: jreleaser.project.version

  • projectVersionPattern
    The project version pattern.
    Type: String
    User property: jreleaser.project.version.pattern

  • releaseName
    The release name.
    Type: String
    User property: jreleaser.release.name

  • selectCurrentPlatform
    Activates paths matching the current platform.
    Type: boolean
    User property: jreleaser.select.current.platform

  • selectPlatforms
    Activates paths matching the given platform.
    Type: String[]
    User property: jreleaser.select.platform

  • signing
    Sign files.
    Type: boolean
    User property: jreleaser.signing

  • skipRelease
    Skip creating a release.
    Type: boolean
    User property: jreleaser.skip.release

  • skipTag
    Skip tagging the release.
    Type: boolean
    User property: jreleaser.skip.tag

  • tagName
    The release tag.
    Type: boolean
    User property: jreleaser.tag.name

  • update
    Update an existing release.
    Type: boolean
    User property: jreleaser.update

  • updateSections
    Release section(s) to be updated.
    Type: UpdateSection
    User property: jreleaser.update.sections

  • username
    Git username.
    Type: String
    User property: jreleaser.username