JReleaser
Install
There are multiple choices depending on your preference.
CLI
The CLI can be installed in the following ways:
homebrew tap (only on OSX for now):
Requires Java 8
brew install jreleaser/tap/jreleaser
scoop:
Requires Java 8
scoop bucket add jreleaser https://github.com/jreleaser/scoop-jreleaser.git
scoop install jreleaser
sdkman:
Requires Java 8
sdk install jreleaser
jbang
Requires Java 8
// Download, cache, and run
jbang jreleaser@jreleaser <command> [<args>]
// Download, cache, and run
jbang jreleaser-snapshot@jreleaser <command> [<args>]
curl
Requires Java 11
// Get the jreleaser downloader
curl -sL https://git.io/get-jreleaser > get_jreleaser.java
// Download JReleaser with version = <version>
// Change <version> to a tagged JReleaser release
// or leave it out to pull `latest`.
java get_jreleaser.java <version>
// Execute a JReleaser
java -jar jreleaser-cli.jar <command> [<args>]
manually:
Download the pre-compiled binary from the releases page, uncompress and copy to the desired location.
Be mindful that jreleaser-0.3.0.zip
requires Java 8 to be installed while jreleaser-standalone-0.3.0-[linux|osx|windows].zip
can be used without a previous installation of Java as it includes its own Java Runtime.
Docker
You can run JReleaser as a docker image, skipping the need to have a pre-installed Java runtime. You must mount the working directory at the /workspace
volume, for example assuming the current directory is the starting point:
$ docker run -it --rm -v `(pwd)`:/workspace \
jreleaser/<image>:<tag> <command> [<args>]
Where image may be jreleaser-slim
, jreleaser-alpine
.
Note
|
The jreleaser command will be automatically executed inside /workspace . |
You may also need to map environment variables to the container, such as JRELEASER_PROJECT_VERSION
, JRELEASER_GITHUB_TOKEN
, or others depending on your setup. Refer to the configuration pages.
You can find the tag listing here.
Maven
Configure the jreleaser-maven-plugin in your POM file
<plugin>
<groupId>org.jreleaser</groupId>
<artifactId>jreleaser-maven-plugin</artifactId>
<version>0.3.0</version>
</plugin>
Gradle
Configure the jreleaser-gradle-plugin in your build.gradle
or settings.gradle
file
plugins {
id 'org.jreleaser' version '0.3.0'
}
Ant
Download the 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
<path id="jreleaser.classpath">
<fileset dir="lib">
<include name="jreleaser-ant-tasks-0.3.0/*.jar"/>
</fileset>
</path>
<import>
<javaresource name="org/jreleaser/ant/targets.xml"
classpathref="jreleaser.classpath"/>
</import>