JReleaser Maven Plugin
Executes a JReleaser workflow as a Maven plugin.
Install
<plugin>
<groupId>org.jreleaser</groupId>
<artifactId>jreleaser-maven-plugin</artifactId>
<version>1.1.0-SNAPSHOT</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 packager/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
-
packagerName
The name of the packager.
Type: String
User property:jreleaser.template.packager.name
-
skip
Skip execution.
Type: boolean
User property:jreleaser.template.skip
-
snapshot
Use snapshot templates.
Type: boolean
User property:jreleaser.template.snapshot
jreleaser:download
Downloads assets.
Available parameters:
-
configFile
External configuration file.
Type: File
User property:jreleaser.config.file
-
dryrun
Skips remote operations.
Type: boolean
User property:jreleaser.dry.run
-
excludedDownloaderNames
Exclude an downloader by name.
Type: String[]
User property: jreleaser.excluded.downloader.names -
excludedDownloaders
Exclude an downloader by type.
Type: String[]
User property: jreleaser.excluded.downloaders -
gitRootSearch
Searches for the Git root.
Type: boolean
User property:jreleaser.git.root.search
-
includedDownloaderNames
Include an downloader by name.
Type: String[]
User property: jreleaser.downloader.names -
includedDownloaders
Include an downloader by type.
Type: String[]
User property: jreleaser.downloaders -
outputDirectory (Default: ${project.build.directory}/jreleaser)
Type: File
User property:jreleaser.output.directory
-
skip
Skip execution.
Type: boolean
User property:jreleaser.download.skip
jreleaser:assemble
Assemble all distributions.
Available parameters:
-
configFile
External configuration file.
Type: File
User property:jreleaser.config.file
-
excludedAssemblers
Exclude an assembler.
Type: String[]
User property: jreleaser.excluded.assemblers -
excludedDistributions
Exclude a distribution.
Type: String[]
User property: jreleaser.excluded.distributions -
gitRootSearch
Searches for the Git root.
Type: boolean
User property:jreleaser.git.root.search
-
includedAssemblers
Include an assembler.
Type: String[]
User property: jreleaser.assemblers -
includedDistributions
Include a distribution.
Type: String[]
User property: jreleaser.distributions -
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.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
-
excludedDistributions
Exclude a distribution.
Type: String[]
User property: jreleaser.excluded.distributions -
gitRootSearch
Searches for the Git root.
Type: boolean
User property:jreleaser.git.root.search
-
includedDistributions
Include a distribution.
Type: String[]
User property: jreleaser.distributions -
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
-
excludedDistributions
Exclude a distribution.
Type: String[]
User property: jreleaser.excluded.distributions -
gitRootSearch
Searches for the Git root.
Type: boolean
User property:jreleaser.git.root.search
-
includedDistributions
Include a distribution.
Type: String[]
User property: jreleaser.distributions -
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.dry.run
-
excludedDistributions
Exclude a distribution.
Type: String[]
User property: jreleaser.excluded.distributions -
excludedUploaderNames
Exclude an uploader by name.
Type: String[]
User property: jreleaser.excluded.uploader.names -
excludedUploaders
Exclude an uploader by type.
Type: String[]
User property: jreleaser.excluded.uploaders -
gitRootSearch
Searches for the Git root.
Type: boolean
User property:jreleaser.git.root.search
-
includedDistributions
Include a distribution.
Type: String[]
User property: jreleaser.distributions -
includedUploaderNames
Include an uploader by name.
Type: String[]
User property: jreleaser.uploader.names -
includedUploaders
Include an uploader by type.
Type: String[]
User property: jreleaser.uploaders -
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
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.dry.run
-
excludedDistributions
Exclude a distribution.
Type: String[]
User property: jreleaser.excluded.distributions -
excludedUploaderNames
Exclude an uploader by name.
Type: String[]
User property: jreleaser.excluded.uploader.names -
excludedUploaders
Exclude an uploader by type.
Type: String[]
User property: jreleaser.excluded.uploaders -
gitRootSearch
Searches for the Git root.
Type: boolean
User property:jreleaser.git.root.search
-
includedDistributions
Include a distribution.
Type: String[]
User property: jreleaser.distributions -
includedUploaderNames
Include an uploader by name.
Type: String[]
User property: jreleaser.uploader.names -
includedUploaders
Include an uploader by type.
Type: String[]
User property: jreleaser.uploaders -
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.dry.run
-
excludedDistributions
Exclude a distribution.
Type: String[]
User property: jreleaser.excluded.distributions -
excludedPackagers
Exclude a packager.
Type: String[]
User property: jreleaser.excluded.packagers -
gitRootSearch
Searches for the Git root.
Type: boolean
User property:jreleaser.git.root.search
-
includedDistributions
Include a distribution.
Type: String[]
User property: jreleaser.distributions -
includedPackagers
Include a packager.
Type: String[]
User property: jreleaser.packagers -
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.dry.run
-
excludedDistributions
Exclude a distribution.
Type: String[]
User property: jreleaser.excluded.distributions -
excludedPackagers
Exclude a packager.
Type: String[]
User property: jreleaser.excluded.packagers -
gitRootSearch
Searches for the Git root.
Type: boolean
User property:jreleaser.git.root.search
-
includedDistributions
Include a distribution.
Type: String[]
User property: jreleaser.distributions -
includedPackagers
Include a packager.
Type: String[]
User property: jreleaser.packagers -
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.dry.run
-
excludedDistributions
Exclude a distribution.
Type: String[]
User property: jreleaser.excluded.distributions -
excludedPackagers
Exclude a packager.
Type: String[]
User property: jreleaser.excluded.packagers -
gitRootSearch
Searches for the Git root.
Type: boolean
User property:jreleaser.git.root.search
-
includedDistributions
Include a distribution.
Type: String[]
User property: jreleaser.distributions -
includedPackagers
Include a packager.
Type: String[]
User property: jreleaser.packagers -
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:
-
configFile
External configuration file.
Type: File
User property:jreleaser.config.file
-
dryrun
Skips remote operations.
Type: boolean
User property:jreleaser.dry.run
-
gitRootSearch
Searches for the Git root.
Type: boolean
User property:jreleaser.git.root.search
-
includedAnnouncers
Include an announcer.
Type: String[]
User property:jreleaser.announcers
-
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.dry.run
-
excludedAnnouncers
Exclude an announcer.
Type: String[]
User property:jreleaser.excluded.announcers
-
excludedDistributions
Exclude a distribution.
Type: String[]
User property: jreleaser.excluded.distributions -
excludedPackagers
Exclude a packager.
Type: String[]
User property: jreleaser.excluded.packagers -
excludedUploaderNames
Exclude an uploader by name.
Type: String[]
User property: jreleaser.excluded.uploader.names -
excludedUploaders
Exclude an uploader by type.
Type: String[]
User property: jreleaser.excluded.uploaders -
gitRootSearch
Searches for the Git root.
Type: boolean
User property:jreleaser.git.root.search
-
includedAnnouncers
Include an announcer.
Type: String[]
User property:jreleaser.announcers
-
includedDistributions
Include a distribution.
Type: String[]
User property: jreleaser.distributions -
includedPackagers
Include a packager.
Type: String[]
User property: jreleaser.packagers -
includedUploaderNames
Include an uploader by name.
Type: String[]
User property: jreleaser.uploader.names -
includedUploaders
Include an uploader by type.
Type: String[]
User property: jreleaser.uploaders -
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.dry.run
-
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