Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ project exists is in the [manifesto](manifesto.md).
| [GitHub Releases](https://github.com/openjavaformat/open-java-format/releases/latest) | native binaries, the runnable jar, the Gradle, IntelliJ IDEA and Eclipse plugins |
| [Homebrew tap](https://github.com/openjavaformat/homebrew-tap) | `openjavaformat/tap/open-java-format`, the native binary for macOS and Linux |
| [Scoop bucket](https://github.com/openjavaformat/scoop-bucket) | `openjavaformat/open-java-format`, the native binary for Windows |
| [apt repository](https://github.com/openjavaformat/apt) | `open-java-format` from `https://apt.openjavaformat.dev`, the native binary for Ubuntu and Debian |

The Maven Central artifacts, the Gradle plugins and the files of a GitHub release are built by the
[release workflow](https://github.com/openjavaformat/open-java-format/blob/main/.github/workflows/release.yml)
from the tag of the version. The Maven plugin has a repository and a release workflow of its own,
[openjavaformat/fmt-maven-plugin](https://github.com/openjavaformat/fmt-maven-plugin). The Homebrew
formula and the Scoop manifest install the native binaries of the GitHub release. A workflow in the
tap and one in the bucket move them to each new release within the hour, once they have installed
and tested that release on every platform.
formula, the Scoop manifest and the apt packages install the native binaries of the GitHub release.
A workflow in the tap, one in the bucket and one in the apt repository move them to each new release
within the hour, once they have installed and tested that release on every platform.

## Versions

Expand Down
26 changes: 24 additions & 2 deletions docs/get-started/command-line.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Command line

The formatter comes as a native binary that needs no Java, and as a runnable jar for every platform
the binaries do not cover. Homebrew on macOS and Linux and Scoop on Windows install the binary and
keep it current; mise installs it on all three and pins its version per project.
the binaries do not cover. Homebrew on macOS and Linux, apt on Ubuntu and Debian and Scoop on
Windows install the binary and keep it current; mise installs it on all three and pins its version
per project.

## Homebrew

Expand All @@ -21,6 +22,27 @@ file with `curl`, so macOS does not quarantine it.
version can change the output (see [Versions](../about.md#versions)): `brew pin open-java-format`
holds the installed one.

## apt

``` sh
sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://apt.openjavaformat.dev/key.asc | sudo tee /etc/apt/keyrings/open-java-format.asc > /dev/null
echo "deb [signed-by=/etc/apt/keyrings/open-java-format.asc] https://apt.openjavaformat.dev stable main" \
| sudo tee /etc/apt/sources.list.d/open-java-format.list
sudo apt update
sudo apt install open-java-format
```

The lines add our apt repository, [openjavaformat/apt](https://github.com/openjavaformat/apt), with
the key that signs it, and install the native binary of the latest release as
`/usr/bin/open-java-format`. The package is there for amd64 and arm64 and needs glibc 2.34 or later:
Ubuntu 22.04 or Debian 12 and newer.

`sudo apt upgrade` takes each new release, at the latest an hour after it is published. A new minor
version can change the output (see [Versions](../about.md#versions)):
`sudo apt-mark hold open-java-format` holds the installed one. The repository carries the latest
version only; older versions are binaries to download, as below.

## Scoop

``` powershell
Expand Down
3 changes: 2 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ on the [Maven plugin](get-started/maven.md) page.

Every [release](https://github.com/openjavaformat/open-java-format/releases/latest) carries native
binaries for Linux, macOS and Windows, and a runnable jar for Java 21 or later. Homebrew installs
the binary on macOS and Linux, and Scoop on Windows.
the binary on macOS and Linux, [apt](get-started/command-line.md#apt) on Ubuntu and Debian, and
Scoop on Windows.

``` sh title="Install with Homebrew"
brew install openjavaformat/tap/open-java-format
Expand Down