Skip to main content

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:

ScriptDescriptionDetails
test.pyBuild and test helper scriptLearn more →
push.pyBuild, test, and push to repositoryLearn more →
release.pyComplete release automationLearn more →
prompt-pgp-passphrase.pyPrompt for PGP passphrase earlyLearn more →
current-release.pyGet current release versionLearn more →
maven-version.pyGet Maven versionLearn more →
apply-eclipse-prefs.pyApply Eclipse preferencesLearn more →
cleanup-whitespace.pyClean up whitespace in Java filesLearn more →
check-fluent-setter-overrides.pyCheck fluent setter overridesLearn more →
revert-staged.pyRevert staged git changesLearn more →
revert-unstaged.pyRevert unstaged git changesLearn more →
start-petstore-jetty.pyStart the petstore showcase under Jetty/MicroserviceLearn more →
start-petstore-springboot.pyStart the petstore showcase under Spring BootLearn more →
check-bom-completeness.pyVerifies the published juneau-bom lists all reactor modules—
check-container-tags.pyGuardrail that verifies container-backed tests are tagged correctly—
ci-perf-guard.pyCI wall-clock performance regression guard, per module/bucket—
coverage.pyGenerates and reports JaCoCo test coverage—
microbench.pyRuns JMH micro-benchmarks—
normalize-generic-commas.pyNormalizes comma spacing in generic type arguments—
push-timings.pyReports timing deltas from test.py's run history (the push.py Timing row)—
slack-notify.pySends build/release notifications to Slack—
surefire-rollup.pyRolls 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:

ScriptDescriptionDetails
verify-docs.pyDocs integrity checker - validates frontmatter, slugs, sidebar structure, and internal links; the primary "does the site check out?" gateSee check-topic-links.py for a related, narrower link-only check
release-docs-stage.pyStage documentation to asf-stagingLearn more →
release-docs.pyPromote documentation to productionLearn more →
build-docs.pyBuild complete documentationLearn more →
create-mvn-site.pyGenerate Maven site for testingLearn more →
start-docusaurus.pyStart Docusaurus dev serverLearn more →
check-topic-links.pyValidate documentation linksLearn more →
check-guide-snippets.pyChecks that every code block on a guide page matches its tested region in the Juneau checkout's juneau-examples-guides moduleSee AI Knowledge Authoring ("Guide Fences")
check-project-pages.pyChecks that the About pages under src/pages/about/ match src/data/projects.tsRun by build-docs.py in its Verify stage
check-entry-pages.pyChecks that the entry pages agree: one format count tied to the marshaller classes, one first resource, the documented ports, no unsupported comparison claimsRun by build-docs.py in its Verify stage
generate-ai-artifacts.py / check-ai-artifacts.pyGenerate and validate machine-consumable AI knowledge artifactsLearn more →
apply-renames.pyBulk URL/text substitution pass across pages/, driven by a rules table (--table, --dry-run)—
check-topic-template.pyAdvisory report of topic pages that drift from the topic page template: stubs, pages with no code fence, headings out of order—
renumber-topics.pyRenames 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.pyNormalizes Markdown heading structure under pages/topics/—

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.

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:

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.