mirror of
https://github.com/jlengrand/jreleaser.github.io.git
synced 2026-03-10 08:31:25 +00:00
163 lines
3.4 KiB
Plaintext
163 lines
3.4 KiB
Plaintext
= Install
|
|
|
|
There are multiple choices depending on your preference.
|
|
|
|
== CLI
|
|
The xref:tools:cli.adoc[CLI] can be installed in the following ways:
|
|
|
|
[tabs]
|
|
====
|
|
Windows::
|
|
+
|
|
--
|
|
*sdkman*
|
|
[source]
|
|
----
|
|
sdk install jreleaser
|
|
----
|
|
|
|
*jbang*
|
|
[source]
|
|
.stable
|
|
----
|
|
// Download, cache, and run
|
|
jbang jreleaser@jreleaser <command> [<args>]
|
|
----
|
|
[source]
|
|
.early-access
|
|
----
|
|
// Download, cache, and run
|
|
jbang jreleaser_snapshot@jreleaser <command> [<args>]
|
|
----
|
|
|
|
*manually*
|
|
|
|
Download the pre-compiled binary from the link:https://github.com/jreleaser/jreleaser/releases[releases page],
|
|
uncompress and copy to the desired location.
|
|
--
|
|
Linux::
|
|
+
|
|
--
|
|
*sdkman*
|
|
[source]
|
|
----
|
|
sdk install jreleaser
|
|
----
|
|
|
|
*jbang*
|
|
[source]
|
|
.stable
|
|
----
|
|
// Download, cache, and run
|
|
jbang jreleaser@jreleaser <command> [<args>]
|
|
----
|
|
[source]
|
|
.early-access
|
|
----
|
|
// Download, cache, and run
|
|
jbang jreleaser_snapshot@jreleaser <command> [<args>]
|
|
----
|
|
|
|
*manually*
|
|
|
|
Download the pre-compiled binary from the link:https://github.com/jreleaser/jreleaser/releases[releases page],
|
|
uncompress and copy to the desired location.
|
|
--
|
|
Mac::
|
|
+
|
|
--
|
|
*homebrew tap*
|
|
[source]
|
|
----
|
|
brew install jreleaser/tap/jreleaser
|
|
----
|
|
|
|
*sdkman*
|
|
[source]
|
|
----
|
|
sdk install jreleaser
|
|
----
|
|
|
|
*jbang*
|
|
[source]
|
|
.stable
|
|
----
|
|
// Download, cache, and run
|
|
jbang jreleaser@jreleaser <command> [<args>]
|
|
----
|
|
[source]
|
|
.early-access
|
|
----
|
|
// Download, cache, and run
|
|
jbang jreleaser_snapshot@jreleaser <command> [<args>]
|
|
----
|
|
|
|
*manually*
|
|
|
|
Download the pre-compiled binary from the link:https://github.com/jreleaser/jreleaser/releases[releases page],
|
|
uncompress and copy to the desired location.
|
|
--
|
|
====
|
|
|
|
== 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:
|
|
|
|
[source]
|
|
----
|
|
$ docker run -it --rm -v `(pwd)`:/workspace jreleaser/jreleaser-slim:<tag> <command> [<args>]
|
|
----
|
|
|
|
NOTE: The `--basedir` argument will be automatically set to `--basedir=/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 xref:configuration:index.adoc[] pages.
|
|
|
|
== Maven
|
|
Configure the xref:tools:maven.adoc[jreleaser-maven-plugin] in your POM file
|
|
|
|
[source,xml]
|
|
[subs="verbatim,attributes"]
|
|
.pom.xml
|
|
----
|
|
<plugin>
|
|
<groupId>org.jreleaser</groupId>
|
|
<artifactId>jreleaser-maven-plugin</artifactId>
|
|
<version>{jreleaser-version}</version>
|
|
</plugin>
|
|
----
|
|
|
|
== Gradle
|
|
Configure the xref:tools:gradle.adoc[jreleaser-gradle-plugin] in your `build.gradle` file
|
|
|
|
[source,groovy]
|
|
[subs="attributes"]
|
|
.build.gradle
|
|
----
|
|
plugins {
|
|
id 'org.jreleaser' version '{jreleaser-version}'
|
|
}
|
|
----
|
|
|
|
== Ant
|
|
Download the xref:tools:ant.adoc[jreleaser-ant-tasks] ZIP bundle from the
|
|
link:https://github.com/jreleaser/jreleaser/releases[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
|
|
|
|
[source,xml]
|
|
[subs="verbatim,attributes"]
|
|
.build.xml
|
|
----
|
|
<path id="jreleaser.classpath">
|
|
<fileset dir="lib">
|
|
<include name="jreleaser-ant-tasks-{jreleaser-version}/*.jar"/>
|
|
</fileset>
|
|
</path>
|
|
|
|
<import>
|
|
<javaresource name="org/jreleaser/ant/targets.xml"
|
|
classpathref="jreleaser.classpath"/>
|
|
</import>
|
|
----
|
|
|