Javadoc API Documentation

Full Javadoc is generated by maven-javadoc-plugin during mvn site.

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

BorrowingController

controller

REST endpoints for borrowing β€” includes @Operation (OpenAPI) annotations

BookService

service

Business logic for book inventory management

Borrowing

model

JPA entity modelling a borrowing transaction

BookRepository

repository

Spring Data JPA repository with custom query methods

UserService

service

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

site/apidocs/

Standard Java API reference; IDE integration

Doxygen

doxygen/html/

Cross-referenced call graphs, class diagrams, richer navigation