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
45 changes: 38 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
[![Javadoc](https://javadoc.io/badge2/se.alipsa.nexus-release-plugin/se.alipsa.nexus-release-plugin.gradle.plugin/javadoc.svg)](https://javadoc.io/doc/se.alipsa.nexus-release-plugin/se.alipsa.nexus-release-plugin.gradle.plugin)

Automates the release process to Sonatype Central.
See the [release history](release.md) for changes and upgrade notes.

Assumptions are:
1. It assumes you use the maven publish plugin to define your artifacts
Expand Down Expand Up @@ -243,6 +244,9 @@ nexusReleasePlugin {
Run `./gradlew releaseAllPlan` first and review the selection, then `./gradlew bundleAll`
to check, sign, and bundle it, and `./gradlew releaseAll` to upload. The ZIP defaults to
`build/releaseAll/<root project name>-mega-bundle.zip` (e.g. `build/releaseAll/jmlx-mega-bundle.zip`). Dependencies on omitted siblings must already be released.
The default ZIP name changed in 2.6.0. Rerun `bundleAll` after upgrading; the old
`build/releaseAll/bundle.zip` is no longer used and can be deleted. Override the path
with `combinedRelease { bundleFile = ... }` when needed.
No BOM, Maven settings helper, candidate JSON, or custom staging tasks are needed.
Embedded or compile-only internal projects can be declared explicitly with
`unpublishedProjectDependencies`; see the guide for its publication-metadata requirements.
Expand All @@ -263,18 +267,17 @@ proxy endpoints. Configure both explicitly when needed.

## Building the Plugin

The build uses the Gradle 9.8.1 wrapper and compiles for Java 17.
The build uses the Gradle 9.8.1 wrapper and requires an installed JDK 17 toolchain.
Tests run on JDK 17 by default; compilation targets Java 17. The published plugin
supports the verified Gradle 8.13/9.8.1 and JDK 17/21 runtime matrix. CI runs that
compatibility matrix on Linux and the combined-release tests on Windows with JDK 17.

```bash
./gradlew build # Build and test
./gradlew publishToMavenLocal # Publish to local Maven repo
```

## License

MIT License - see [LICENSE](LICENSE) for details.

### Release deadlines and bundle contents
## Release deadlines and bundle contents

`httpConnectTimeoutSeconds` defaults to 30 and `httpRequestTimeoutSeconds` to 1800. Both accept 1–86400 seconds. Set them in `nexusReleasePlugin`; overrides apply to `release`. Uploads use the full request deadline. Deployment status checks and other small calls through `CentralPortalClient` use the shorter of 60 seconds and the configured deadline. The caller stops waiting even if an upload or response body stalls. Cancellation closed stalled connections in the verified runtime matrix; no stronger guarantee is made for arbitrary network implementations.

Expand All @@ -290,7 +293,7 @@ The selected publication's module metadata and adjacent signature are cleared be

The publishing-script harness runs as part of `check` when Bash is available. Local builds without Bash skip it with a reason; CI requires it with `-PrequireShellHarness=true`.

### Upload a verified combined bundle (2.6.0+)
## Upload a verified combined bundle (2.6.0+)

Run planning and `bundleAll` separately from the upload invocation. After testing and
reviewing the saved ZIP, configure the upload task with the ZIP and manifest SHA-256 values
Expand Down Expand Up @@ -341,3 +344,31 @@ including through task dependencies. `useExistingBundle` defaults to false, incl
when assigned a provider with no value. When `resumeId` is set, resume takes priority:
`useExistingBundle`, `expectedBundleSha256` and `expectedManifestSha256` are ignored.
Resume remains status-only and does not require current build outputs.

## Releasing the Plugin

Set `version` in `gradle.properties` to the release version without `-SNAPSHOT`,
update every plugin-version example in this README and `combined-releases.md`,
and date the matching entry in [release.md](release.md). The build applies published
plugin version 2.3.0 to release itself; that bootstrap dependency is independent of
this project's release version.

With JDK 17 available, verify the release before publishing:

```bash
./gradlew clean build -PrequireShellHarness=true
./gradlew publishPlugins --validate-only
```

Configure Central Portal credentials, Gradle signing properties and Plugin Portal
credentials before publication. Commit the release preparation so the working tree
is clean, then run `./publish.sh`. The script builds and tests, validates Plugin Portal
publication, releases to Maven Central, then publishes to the Plugin Portal, stopping
on the first failure. If Plugin Portal publication fails after Central has accepted
the release, retry only `./gradlew publishPlugins` after resolving the Portal failure.
The script requires a clean working tree; version and documentation consistency are
maintainer checks performed before invoking it.

## License

MIT License - see [LICENSE](LICENSE) for details.
9 changes: 8 additions & 1 deletion combined-releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,11 +354,18 @@ before another upload. An initial connection failure usually means no upload was
The client does not distinguish these cases, so it conservatively retains the record.
Never automatically retry an unknown upload outcome. Resume only the saved ID, without
source checks, builds or signing. Polling defaults to 60 attempts at 10-second intervals;
Transient I/O errors are recorded and polling continues within that bound. Availability probes use HEAD.
transient I/O errors are recorded and polling continues within that bound. Availability probes use HEAD.
Central propagation remains separate from Portal publication. A failed record reports all
component coordinates. Archive an `AVAILABLE` record before a new deployment; manually
reconcile every unresolved record rather than deleting it to retry.

On Windows, atomic journal replacement retries filesystem failures with 1.27 seconds
of total backoff, independently of localized error text. A persistent failure
propagates while preserving the previous journal. This retry applies to
local journal replacement; upload requests remain single-attempt. Git paths and
journal JSON are decoded as UTF-8, including when running on JDK 17 with a non-UTF-8
default charset.

Parent `httpConnectTimeoutSeconds` and `httpRequestTimeoutSeconds` are not inherited
by combined tasks. CentralPortalClient retains 30 s connect, 1800 s upload and 60 s
small-call defaults. PublicationStatus availability probes in `releaseAllPlan` and
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group=se.alipsa.gradle
version=2.6.0-SNAPSHOT
version=2.6.0
org.gradle.configuration-cache=true
org.gradle.parallel=true
org.gradle.caching=true
2 changes: 1 addition & 1 deletion release.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release history

## Ver 2.6.0 (in progress)
## Ver 2.6.0, 2026-11-15
- Add verified existing-bundle uploads: configure `releaseAll { useExistingBundle = true }`
with required `expectedBundleSha256` and `expectedManifestSha256` values from retained,
reviewed evidence. Upload without rebuilding, signing or staging. Before upload, validate
Expand Down
Loading