| name | javadoc |
| description | Best practices and version-correct Javadoc comment generation for percussioncms. Use when the user asks for "Javadoc", "Java documentation", "doc comments", "doc", "documentation", or related terms. |
Javadoc Best Practices for percussioncms
Use this skill when generating or updating Javadoc comments in the percussioncms project.
Quick Start
- Check JDK version — Look at
pom.xml for <source>/<target>/<release> (likely 21)
- Use the checklist — See
reference/javadoc-checklist.md for per-file guidance
- Run generation scripts — Use
scripts/generate-javadoc-stubs.sh for initial stubs
JDK Version Detection
| Version | Comment Style | HTML Allowed | Markdown Allowed |
|---|
| JDK 8 | /** ... */ | Yes | No |
| JDK 21 | /** ... */ | Yes | No |
| JDK 25+ | /** ... */ OR /// | Deprecated | Yes |
For percussioncms: JDK 21 — use traditional /** ... */ only.
Key Rules
Structure
Common Mistakes
- ❌
@returns → ✅ @return
- ❌ "This method does..." → ✅ "Returns..."
- ❌ Implementation details → ✅ Observable behavior
- ❌ Missing
@throws for checked exceptions
Inline Tags
{@link ClassName#method} — Cross-reference
{@code expression} — Inline code
{@literal text} — Escape HTML in JDK 25+
Scripts
scripts/generate-javadoc-stubs.sh — Bash script to generate stub comments
scripts/generate-javadoc-stubs.ps1 — PowerShell equivalent
Maven Integration
The maven-javadoc-plugin is configured in ai-shared-develop/pom.xml:
mvn javadoc:javadoc
mvn javadoc:jar
References