Javadoc API Documentationο
Full Javadoc is generated by maven-javadoc-plugin during mvn site.
Important
Why Javadoc was missing β and the fixο
Javadoc is only generated when maven-javadoc-plugin is declared inside the
<reporting><plugins> section of pom.xml. Without it, mvn site silently skips
Javadoc and site/apidocs/ is never created.
The plugin has been added to pom.xml in this project. The critical block is:
<reporting>
<plugins>
<!-- This block was missing β without it mvn site skips Javadoc -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.6.3</version>
<reportSets>
<reportSet>
<reports>
<report>javadoc</report>
</reports>
</reportSet>
</reportSets>
<configuration>
<doclint>none</doclint>
</configuration>
</plugin>
<!-- ... other reporting plugins ... -->
</plugins>
</reporting>
The <doclint>none</doclint> flag is important β without it, any comment that doesnβt
conform strictly to Javadoc syntax causes the build to fail.
Key Documented Classesο
Class |
Package |
Description |
|---|---|---|
|
|
REST endpoints for borrowing β includes |
|
|
Business logic for book inventory management |
|
|
JPA entity modelling a borrowing transaction |
|
|
Spring Data JPA repository with custom query methods |
|
|
User management operations |
Generating Javadoc Locallyο
# As part of the full Maven site (recommended β also runs all other reports)
mvn site
# Open: target/site/apidocs/index.html
# Standalone
mvn javadoc:javadoc
# Open: target/site/apidocs/index.html
Javadoc vs Doxygenο
Tool |
Output |
Strength |
|---|---|---|
Javadoc |
|
Standard Java API reference; IDE integration |
Doxygen |
|
Cross-referenced call graphs, class diagrams, richer navigation |