Skip to content

Commit e75e2a1

Browse files
fvarruiclaude
andcommitted
Move the user documentation to a Docusaurus site
The docs in docs/ become a Docusaurus site (pages in docs/content/), published to GitHub Pages from main by .github/workflows/docs.yml and built on devel and pull requests to catch broken links. The README is reduced to a quick start that links to it. The content was checked against the code: every property with its real Maven and Gradle default, the startup scripts and launchers per platform, bundling a JRE (customized, existing, other platforms, JDK 24+), code signing, templates, runtime JVM options, file associations, samples and upgrading from 1.x. It fixes the errors in the old pages (wrong defaults, Gradle bundleJre, sample names and paths, a broken XML tag, old links) and documents properties that weren't (installationPath, customLauncher, customInfoPlist, provisionProfile, msiUpgradeCode, trademarks, signing fields, templates, duplicatesStrategy). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent d1c3475 commit e75e2a1

44 files changed

Lines changed: 20944 additions & 1150 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/docs.yml‎

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Docs
2+
3+
# The site documents the latest release: it's deployed from main (and by hand from main); devel and pull requests only build it, to catch broken links
4+
on:
5+
push:
6+
branches: [ devel, main ]
7+
paths: [ 'docs/**', '.github/workflows/docs.yml' ]
8+
pull_request:
9+
branches: [ devel, main ]
10+
paths: [ 'docs/**', '.github/workflows/docs.yml' ]
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
concurrency:
19+
group: pages
20+
cancel-in-progress: false
21+
22+
jobs:
23+
build:
24+
runs-on: ubuntu-latest
25+
defaults:
26+
run:
27+
working-directory: docs
28+
steps:
29+
- uses: actions/checkout@v5
30+
31+
- uses: actions/setup-node@v5
32+
with:
33+
node-version: 22
34+
cache: npm
35+
cache-dependency-path: docs/package-lock.json
36+
37+
- name: Install dependencies
38+
run: npm ci
39+
40+
- name: Build site
41+
run: npm run build
42+
43+
- name: Upload site
44+
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
45+
uses: actions/upload-pages-artifact@v4
46+
with:
47+
path: docs/build
48+
49+
deploy:
50+
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
51+
needs: build
52+
runs-on: ubuntu-latest
53+
environment:
54+
name: github-pages
55+
url: ${{ steps.deployment.outputs.page_url }}
56+
steps:
57+
- name: Deploy to GitHub Pages
58+
id: deployment
59+
uses: actions/deploy-pages@v4

‎.gitignore‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,7 @@ hs_err_pid*
3232

3333
## More
3434
.DS_Store
35+
36+
# Docusaurus (docs/)
37+
docs/node_modules/
38+
docs/.docusaurus/

‎.minispec/core/architecture.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ PackageMojo (Maven) | PackagePlugin + PackageTask (Gradle)
3838
- `src/main/java/.../javapackager/model/` — configuration model (`WindowsConfig`, `MacConfig`, `LinuxConfig`, `FileAssociation`, ...).
3939
- `src/main/java/.../javapackager/utils/` — helpers (files, commands, Velocity, JDK, icons, XML).
4040
- `src/main/resources/{linux,mac,windows}/` — Velocity templates, default icons and bundled native binaries (WinRun4J, `JavaLauncher.exe`, `rcedit-x64.exe`, `nativeJavaApplicationStub*`, `universalJavaApplicationStub.sh`).
41-
- `docs/` — user documentation for platform-specific properties and samples.
41+
- `docs/` — user documentation site (Docusaurus): pages in `docs/content/`, published to GitHub Pages from `main`.
4242
- `samples/hello-world/` — sample app packaged by the smoke tests, with the same settings in `pom.xml` and `build.gradle` (Maven writes to `target/`, Gradle to `build/`).
4343
- `.github/workflows/` and `.github/scripts/` — smoke tests, dependency submission and the per-platform checks.

‎.minispec/core/conventions.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- Build with the wrapper and a JDK 17+: `./gradlew build`. There are no unit tests: changes are verified by the smoke tests (`.github/workflows/smoke-tests.yml`), which package `samples/hello-world` on every platform.
66
- Any change must keep working in both Maven and Gradle. Build-tool-specific code goes only in `maven/` or `gradle/`, behind `Context`.
77
- The Gradle plugin uses no deprecated Gradle API, so it keeps working on the next Gradle major: `Boolean` task properties use `getX()`, not `isX()`; no `Task.getProject()` at execution time; `register()`, not `create()`. Check with `./gradlew -p samples/hello-world package --warning-mode all`.
8-
- A new configuration property is wired in: `PackagerSettings` (field + fluent setter + getter), `PackageMojo` (`@Parameter` + fluent call in `execute()`), `PackageTask` (annotated field + fluent call in `createPackager()` with `defaultIfNull(taskValue, extension.getX())`), and documented in `README.md` or `docs/*-specific-properties.md`.
8+
- A new configuration property is wired in: `PackagerSettings` (field + fluent setter + getter), `PackageMojo` (`@Parameter` + fluent call in `execute()`), `PackageTask` (annotated field + fluent call in `createPackager()` with `defaultIfNull(taskValue, extension.getX())`), and documented in the docs site: `docs/content/configuration/` (the common page or the platform one), with its real default for Maven and Gradle.
99
- Platform-specific options go in `WindowsConfig`, `MacConfig` or `LinuxConfig`, not in `PackagerSettings`.
1010
- New artifacts are `ArtifactGenerator` subclasses. Platform and external-tool checks go in `skip()`, not in `doApply()`.
1111
- Template names and the variables they use are public API: users override them from `assetsDir`. Renaming a template or changing its variables is a breaking change.

‎.minispec/core/project.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ JavaPackager is a hybrid Maven/Gradle plugin, published as a single artifact (`i
1515
## For whom
1616

1717
- Java developers who want to distribute desktop apps without chaining several plugins.
18-
- Users configure it through `pom.xml` (goal `package`) or a Gradle `PackageTask`; see `README.md` and `docs/`.
18+
- Users configure it through `pom.xml` (goal `package`) or a Gradle `PackageTask`; see the docs site (`docs/content/`, published at https://javapackager.github.io/JavaPackager/).
1919

2020
## Goal
2121

‎.minispec/features/docs-site.md‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Documentation site
2+
3+
## Goal
4+
5+
Move the user documentation to a Docusaurus site in `docs/`, published on GitHub Pages, and keep `README.md` minimal.
6+
7+
## Context
8+
9+
- `README.md` (426 lines) holds the whole user guide: usage, artifacts, every property, assets, templates, runtime JVM options, snapshots, building and publishing.
10+
- `docs/` has per-platform property pages, Maven/Gradle samples, `manifest.md`, the Windows tools guide and a DMG image. Some content is outdated or wrong (old `fvarrui` links, bad Windows paths in samples, old bundle names, a broken XML closing tag) and some properties only link to the code (`fileAssociations`, `scripts`).
11+
- No GitHub Pages site yet. Node 26 and npm are available locally.
12+
- Decisions (user, 2026-10-11): publish from `main` (the site documents the latest release), no versioned docs.
13+
14+
## Changes
15+
16+
- Docusaurus (classic preset) project in `docs/`; pages in `docs/content/` (existing files moved with `git mv`; not Docusaurus' default `docs/docs`, user choice), images in `docs/static/img/`.
17+
- Site URL `https://javapackager.github.io/JavaPackager/`; workflow `.github/workflows/docs.yml` builds on push and pull requests to `devel`/`main` touching `docs/` and deploys on push to `main` (plus manual dispatch) with `actions/deploy-pages`.
18+
- Content, checked against the code (defaults, types, Maven and Gradle syntax):
19+
- Introduction, getting started (Maven, Gradle), generated artifacts.
20+
- Configuration reference: common properties, GNU/Linux, macOS, Windows, manifest, file associations, scripts.
21+
- Guides: bundling a JRE (customized, full, existing, `additionalJlinkArgs`, other platforms, JDK 24+), icons and assets, templates, runtime JVM options, multiple executions and platforms, code signing, Windows tools, snapshots, upgrading from 1.x.
22+
- Contributing: building the plugin, smoke tests, publishing.
23+
- `README.md`: what it is, quick start (Maven and Gradle), link to the site, maintainers wanted, apps packaged with it, license.
24+
- `CLAUDE.md` and conventions: documentation lives in `docs/content/` (new properties are documented there).
25+
26+
## Acceptance
27+
28+
- `npm run build` in `docs/` succeeds with no broken links.
29+
- The site is live at the URL above after a push to `main`.
30+
- Every property in `PackagerSettings` and the platform configs is documented with its real default.
31+
- `README.md` fits in one screen or two and links to the site.

‎CLAUDE.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@ Use the wrapper (`./gradlew` or `gradlew.bat` on Windows).
1919
| `./gradlew publishToMavenLocal` | Install the plugin into `~/.m2` to test it from a sample Maven/Gradle project |
2020
| `./gradlew updateNativeJavaApplicationStub` | Re-download the native macOS launchers (`nativeJavaApplicationStub*`) into `src/main/resources/mac` from a [javapackager/nativeJavaApplicationStub](https://github.com/javapackager/nativeJavaApplicationStub) release |
2121
| `./gradlew updateWhyJavaLauncher` | Re-download `JavaLauncher.exe` into `src/main/resources/windows` |
22+
| `cd docs && npm install && npm start` | Preview the user documentation site (Docusaurus, Node.js 20+); `npm run build` fails on broken links |
2223

2324
There are no unit tests, so there is no way to run a single test. Changes are verified by the smoke tests in `.github/workflows/smoke-tests.yml`, which run on every push to `devel`/`main`: they package `samples/hello-world` (one sample with both `pom.xml` and `build.gradle`) with Maven on GNU/Linux, Windows and macOS (each `macStartup`) and with Gradle on each platform, and run `.github/scripts/check-*-app.sh`. Build with a JDK 17+ (a JRE can't compile).
2425

26+
User documentation is a Docusaurus site: pages in `docs/content/`, sidebar in `docs/sidebars.js`. It is published to GitHub Pages (https://javapackager.github.io/JavaPackager/) by `.github/workflows/docs.yml` on push to `main`, so it documents the latest release. `README.md` is only a quick start that links to it.
27+
2528
`compileJava` triggers `generatePluginDescriptor`, which runs an embedded Maven against the generated POM to produce `META-INF/maven/plugin.xml` from the `@Mojo`/`@Parameter` annotations.
2629

2730
Publishing uses a Central Portal user token in the `ossrhUsername`/`ossrhPassword` properties (`~/.gradle/gradle.properties`). Snapshots: `./gradlew publish` (Central Portal snapshots repo). Releases: `./gradlew releaseToCentral` (Portal OSSRH Staging API, then manual Publish in the Portal). The version is set in `build.gradle`.

0 commit comments

Comments
 (0)