blob: 607389c79cc7a6f5b13e169107c2a0abdddadc1a [file] [view]
---
title: "Scripts"
slug: Scripts
---
Apache Juneau includes a collection of Python scripts in the `scripts/` directory that automate various development, build, test, and release tasks. These scripts help maintain code quality, streamline workflows, and ensure consistency across the project.
## Available Scripts
Scripts are organized into two categories based on which branch/repo checkout they're located in. This index covers the most commonly-used developer scripts; a handful of narrowly-scoped or CI-internal scripts are listed without dedicated pages.
### 4.2. Code Scripts (master branch)
These scripts are located in the `master` branch (the `juneau` repository/checkout) and are used for code development, testing, and releases:
| Script | Description | Details |
|--------|-------------|---------|
| [test.py](/docs/developer-info/ScriptTest) | Build and test helper script | [Learn more →](/docs/developer-info/ScriptTest) |
| [push.py](/docs/developer-info/ScriptPush) | Build, test, and push to repository | [Learn more →](/docs/developer-info/ScriptPush) |
| [release.py](/docs/developer-info/ScriptRelease) | Complete release automation | [Learn more →](/docs/developer-info/ScriptRelease) |
| [prompt-pgp-passphrase.py](/docs/developer-info/ScriptPromptPgpPassphrase) | Prompt for PGP passphrase early | [Learn more →](/docs/developer-info/ScriptPromptPgpPassphrase) |
| [current-release.py](/docs/developer-info/ScriptCurrentRelease) | Get current release version | [Learn more →](/docs/developer-info/ScriptCurrentRelease) |
| [maven-version.py](/docs/developer-info/ScriptMavenVersion) | Get Maven version | [Learn more →](/docs/developer-info/ScriptMavenVersion) |
| [apply-eclipse-prefs.py](/docs/developer-info/ScriptApplyEclipsePrefs) | Apply Eclipse preferences | [Learn more →](/docs/developer-info/ScriptApplyEclipsePrefs) |
| [cleanup-whitespace.py](/docs/developer-info/ScriptCleanupWhitespace) | Clean up whitespace in Java files | [Learn more →](/docs/developer-info/ScriptCleanupWhitespace) |
| [check-fluent-setter-overrides.py](/docs/developer-info/ScriptCheckFluentSetterOverrides) | Check fluent setter overrides | [Learn more →](/docs/developer-info/ScriptCheckFluentSetterOverrides) |
| [revert-staged.py](/docs/developer-info/ScriptRevertStaged) | Revert staged git changes | [Learn more →](/docs/developer-info/ScriptRevertStaged) |
| [revert-unstaged.py](/docs/developer-info/ScriptRevertUnstaged) | Revert unstaged git changes | [Learn more →](/docs/developer-info/ScriptRevertUnstaged) |
| [start-petstore-jetty.py](/docs/developer-info/ScriptStartPetstoreJetty) | Start the petstore showcase under Jetty/Microservice | [Learn more →](/docs/developer-info/ScriptStartPetstoreJetty) |
| [start-petstore-springboot.py](/docs/developer-info/ScriptStartPetstoreSpringboot) | Start the petstore showcase under Spring Boot | [Learn more →](/docs/developer-info/ScriptStartPetstoreSpringboot) |
| `check-bom-completeness.py` | Verifies the published `juneau-bom` lists all reactor modules | — |
| `check-container-tags.py` | Guardrail that verifies container-backed tests are tagged correctly | — |
| `ci-perf-guard.py` | CI wall-clock performance regression guard, per module/bucket | — |
| `coverage.py` | Generates and reports JaCoCo test coverage | — |
| `microbench.py` | Runs JMH micro-benchmarks | — |
| `normalize-generic-commas.py` | Normalizes comma spacing in generic type arguments | — |
| `push-timings.py` | Reports timing deltas from `test.py`'s run history (the `push.py` Timing row) | — |
| `slack-notify.py` | Sends build/release notifications to Slack | — |
| `surefire-rollup.py` | Rolls up Surefire XML results into per-module/bucket timing summaries | — |
### 4.3. Doc Scripts (docs branch)
These scripts are located in the `docs` branch (the `juneau-docs` repository/checkout) and are used for documentation building, validation, and deployment:
| Script | Description | Details |
|--------|-------------|---------|
| `verify-docs.py` | **Docs integrity checker** - validates frontmatter, slugs, sidebar structure, and internal links; the primary "does the site check out?" gate | See [check-topic-links.py](/docs/developer-info/ScriptCheckTopicLinks) for a related, narrower link-only check |
| [release-docs-stage.py](/docs/developer-info/ScriptReleaseDocsStage) | Stage documentation to asf-staging | [Learn more →](/docs/developer-info/ScriptReleaseDocsStage) |
| [release-docs.py](/docs/developer-info/ScriptReleaseDocs) | Promote documentation to production | [Learn more →](/docs/developer-info/ScriptReleaseDocs) |
| [build-docs.py](/docs/developer-info/ScriptBuildDocs) | Build complete documentation | [Learn more →](/docs/developer-info/ScriptBuildDocs) |
| [create-mvn-site.py](/docs/developer-info/ScriptCreateMvnSite) | Generate Maven site for testing | [Learn more →](/docs/developer-info/ScriptCreateMvnSite) |
| [start-docusaurus.py](/docs/developer-info/ScriptStartDocusaurus) | Start Docusaurus dev server | [Learn more →](/docs/developer-info/ScriptStartDocusaurus) |
| [check-topic-links.py](/docs/developer-info/ScriptCheckTopicLinks) | Validate documentation links | [Learn more →](/docs/developer-info/ScriptCheckTopicLinks) |
| `check-guide-snippets.py` | Checks that every code block on a guide page matches its tested region in the Juneau checkout's `juneau-examples-guides` module | See [AI Knowledge Authoring](/docs/developer-info/AiKnowledgeAuthoring) ("Guide Fences") |
| `check-project-pages.py` | Checks that the About pages under `src/pages/about/` match `src/data/projects.ts` | Run by `build-docs.py` in its Verify stage |
| `check-entry-pages.py` | Checks that the entry pages agree: one format count tied to the marshaller classes, one first resource, the documented ports, no unsupported comparison claims | Run by `build-docs.py` in its Verify stage |
| [generate-ai-artifacts.py / check-ai-artifacts.py](/docs/developer-info/ScriptAiArtifacts) | Generate and validate machine-consumable AI knowledge artifacts | [Learn more →](/docs/developer-info/ScriptAiArtifacts) |
| `apply-renames.py` | Bulk URL/text substitution pass across `pages/`, driven by a rules table (`--table`, `--dry-run`) | — |
| `check-topic-template.py` | Advisory report of topic pages that drift from the [topic page template](/docs/developer-info/TopicPageTemplate): stubs, pages with no code fence, headings out of order | — |
| `renumber-topics.py` | Renames `pages/topics` files gap-free in sidebar order, rewriting front-matter ids, `sidebars.ts` ids and references to match (dry run unless `--apply`); sidebar numbers are generated and untouched | — |
| `normalize-headings.py` | Normalizes Markdown heading structure under `pages/topics/` | — |
<div class="info">
**Note:** `verify-docs.py` is the primary docs-integrity gate - run `python3 scripts/verify-docs.py --strict --anchors` from the `juneau-docs` repository root before publishing any documentation change. See the script's `--help` output for the full list of checks and flags.
</div>
## Common Features
All scripts share the following characteristics:
- **Python 3.6+** - Written in Python using only the standard library
- **No External Dependencies** - All scripts use only Python standard library modules
- **Cross-Platform** - Work on macOS, Linux, and Windows
- **Error Handling** - Provide clear error messages and exit codes
- **Documentation** - Each script has detailed documentation in the Docusaurus topics
## Getting Help
Each script supports a `--help` flag to display usage information:
```bash
python3 scripts/<script-name>.py --help
```
For detailed documentation, see the individual script topic pages linked above.
## Requirements
Most scripts require:
- **Python 3.6 or higher**
- **Maven** (for build/test/release scripts)
- **Git** (for version control scripts)
- **Node.js and npm** (for documentation scripts)
Specific requirements are documented in each script's topic page.