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
12 changes: 12 additions & 0 deletions java/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.1.0] - 2026-10-26

### Changed

- First non-prerelease release of River for Java.
- Publish the parent POM, library, and CLI as complete GitHub release assets served anonymously through `https://riverqueue.com/maven`. Maven Central supplies third-party dependencies. [PR #1543](https://github.com/riverqueue/river/pull/1543).
- **Breaking:** Replace the shaded CLI `-all.jar` with a thin JAR. Install `river-java` with JBang or use Maven to download the CLI and its runtime dependencies; both paths support Postgres and SQLite. Existing published alpha.1 standalone JARs remain available. See the [CLI installation instructions](https://github.com/riverqueue/river/blob/java/v0.1.0/java/README.md#migration-cli). [PR #1543](https://github.com/riverqueue/river/pull/1543).

### Fixed

- The thin CLI JAR now reports its release version and supports `java -jar` when the runtime JARs are in a sibling `dependency/` directory, as produced by a source build. [PR #1543](https://github.com/riverqueue/river/pull/1543).

## [0.1.0-alpha.1] - 2026-10-24

### Added
Expand Down
10 changes: 5 additions & 5 deletions java/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# River for Java

Prerelease Java 21 client and worker runtime for River's Postgres and SQLite
Java 21 client and worker runtime for River's Postgres and SQLite
schemas. Jobs are ordinary River jobs: another language can insert, cancel,
retry, or work them using the same database.

## Installation

Java 21 or newer is required. Add `com.riverqueue:river:0.1.0-alpha.1` and a JDBC driver to your application's dependencies. Jackson 3 is included transitively.
Java 21 or newer is required. Add `com.riverqueue:river:0.1.0` and a JDBC driver to your application's dependencies. Jackson 3 is included transitively.

```xml
<repositories>
Expand All @@ -21,7 +21,7 @@ Java 21 or newer is required. Add `com.riverqueue:river:0.1.0-alpha.1` and a JDB
<dependency>
<groupId>com.riverqueue</groupId>
<artifactId>river</artifactId>
<version>0.1.0-alpha.1</version>
<version>0.1.0</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
Expand Down Expand Up @@ -97,7 +97,7 @@ jbang app install --name river-java --java 21 \
--java-options=--enable-native-access=ALL-UNNAMED \
--repos https://riverqueue.com/maven --repos central \
--main com.riverqueue.cli.MigrationCli \
com.riverqueue:river-cli:0.1.0-alpha.1
com.riverqueue:river-cli:0.1.0
export PATH="$HOME/.jbang/bin:$PATH"
export DATABASE_URL=postgres://localhost/myapp
# For SQLite: export DATABASE_URL=jdbc:sqlite:/absolute/path/myapp.db
Expand Down Expand Up @@ -163,7 +163,7 @@ cat > pom.xml <<'EOF'
<modelVersion>4.0.0</modelVersion>
<groupId>local</groupId><artifactId>river-cli-install</artifactId><version>1</version>
<repositories><repository><id>river</id><url>https://riverqueue.com/maven</url></repository></repositories>
<dependencies><dependency><groupId>com.riverqueue</groupId><artifactId>river-cli</artifactId><version>0.1.0-alpha.1</version></dependency></dependencies>
<dependencies><dependency><groupId>com.riverqueue</groupId><artifactId>river-cli</artifactId><version>0.1.0</version></dependency></dependencies>
</project>
EOF
mvn --batch-mode --no-transfer-progress \
Expand Down
6 changes: 3 additions & 3 deletions java/cli/pom.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent><groupId>com.riverqueue</groupId><artifactId>river-java</artifactId><version>0.1.0-alpha.1</version><relativePath>../pom.xml</relativePath></parent>
<artifactId>river-cli</artifactId><version>0.1.0-alpha.1</version>
<parent><groupId>com.riverqueue</groupId><artifactId>river-java</artifactId><version>0.1.0</version><relativePath>../pom.xml</relativePath></parent>
<artifactId>river-cli</artifactId><version>0.1.0</version>
<name>River Java migration CLI</name>
<description>Executable database migration tool for River on Postgres and SQLite</description>
<dependencies>
<dependency><groupId>com.riverqueue</groupId><artifactId>river</artifactId><version>0.1.0-alpha.1</version></dependency>
<dependency><groupId>com.riverqueue</groupId><artifactId>river</artifactId><version>0.1.0</version></dependency>
<dependency><groupId>org.postgresql</groupId><artifactId>postgresql</artifactId></dependency>
<dependency><groupId>org.xerial</groupId><artifactId>sqlite-jdbc</artifactId></dependency>
<dependency><groupId>org.junit.jupiter</groupId><artifactId>junit-jupiter</artifactId><scope>test</scope></dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ private String command(boolean executableJar, String... args) throws Exception {
@ParameterizedTest
@ValueSource(booleans = {false, true})
void thinJarRunsWithRuntimeDependencies(boolean executableJar) throws Exception {
assertEquals("river 0.1.0-alpha.1", command(executableJar, "--version").strip());
assertEquals("river 0.1.0", command(executableJar, "--version").strip());
assertTrue(command(executableJar, "migrate-up").contains("008 [up]"));
assertTrue(command(executableJar, "migrate-list").contains("applied"));
assertTrue(
Expand Down
4 changes: 2 additions & 2 deletions java/conformance/bin/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
with (artifacts.parent / "build.lock").open("w") as lock:
fcntl.flock(lock, fcntl.LOCK_EX)
subprocess.run(["mvn", "-q", "-f", str(root / "pom.xml"), "package", "-DskipTests"], check=True)
jar = root / "conformance/target/river-conformance-0.1.0-alpha.1.jar"
jar = root / "conformance/target/river-conformance-0.1.0.jar"
# A stale shaded jar can otherwise silently retain an older dependency's classes.
with zipfile.ZipFile(root / "river/target/river-0.1.0-alpha.1.jar") as library, zipfile.ZipFile(jar) as bundled:
with zipfile.ZipFile(root / "river/target/river-0.1.0.jar") as library, zipfile.ZipFile(jar) as bundled:
for entry in library.namelist():
if entry.startswith("com/riverqueue/") and not entry.endswith("/"):
if library.read(entry) != bundled.read(entry):
Expand Down
2 changes: 1 addition & 1 deletion java/conformance/bin/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def main():
manifest_path = reference / "conformance/manifest.json"
manifest = json.loads(manifest_path.read_text())
manifest["implementations"]["java"] = {
"package": "com.riverqueue:river", "registry": "maven", "version": "0.1.0-alpha.1"
"package": "com.riverqueue:river", "registry": "maven", "version": "0.1.0"
}
manifest_path.write_text(json.dumps(manifest, indent=2) + "\n")
environment = os.environ | {
Expand Down
2 changes: 1 addition & 1 deletion java/conformance/candidate.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"postgres-full-v1",
"sqlite-runtime-v1"
],
"version": "0.1.0-alpha.1",
"version": "0.1.0",
"start_options": [
"elect_interval_ms",
"rescuer_interval_ms",
Expand Down
2 changes: 1 addition & 1 deletion java/conformance/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent><groupId>com.riverqueue</groupId><artifactId>river-java</artifactId><version>0.1.0-alpha.1</version></parent>
<parent><groupId>com.riverqueue</groupId><artifactId>river-java</artifactId><version>0.1.0</version></parent>
<artifactId>river-conformance</artifactId>
<!-- This is a development adapter, not a publishable River artifact. -->
<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ private JsonNode handle(String method, JsonNode params, String rawParams) throws
database.dialect() == Database.Dialect.POSTGRES ? "postgres" : "sqlite"),
Map.entry("capabilities", capabilities),
Map.entry("implementation", "java"),
Map.entry("implementation_version", "0.1.0-alpha.1"),
Map.entry("implementation_version", "0.1.0"),
Map.entry("methods", methods),
Map.entry("migration_lines", Map.of("main", 8)),
Map.entry("profile", profile),
Expand Down
2 changes: 1 addition & 1 deletion java/conformance/src/main/resources/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"java": {
"package": "com.riverqueue:river",
"registry": "maven",
"version": "0.1.0-alpha.1"
"version": "0.1.0"
}
},
"migration": {
Expand Down
2 changes: 1 addition & 1 deletion java/docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ needed. Stop if a command fails. Versions omit `v`; tags use `java/vVERSION`.
```sh
git checkout master && git pull --rebase
git fetch --tags
export VERSION=0.1.0-alpha.2
export VERSION=0.1.1
git checkout -b "$USER-java-$VERSION"
```

Expand Down
2 changes: 1 addition & 1 deletion java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.riverqueue</groupId>
<artifactId>river-java</artifactId>
<version>0.1.0-alpha.1</version>
<version>0.1.0</version>
<packaging>pom</packaging>
<name>River for Java</name>
<description>Transactional jobs on Postgres and SQLite, interoperable with River clients in other languages</description>
Expand Down
2 changes: 1 addition & 1 deletion java/river/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent><groupId>com.riverqueue</groupId><artifactId>river-java</artifactId><version>0.1.0-alpha.1</version></parent>
<parent><groupId>com.riverqueue</groupId><artifactId>river-java</artifactId><version>0.1.0</version></parent>
<artifactId>river</artifactId>
<name>River for Java library</name>
<description>Transactional jobs interoperable with River clients in other languages</description>
Expand Down
Loading