Skip to content

No Maven site structure (src/site/) for project documentation and site descriptor #199

@sfloess

Description

@sfloess

Problem

Project lacks Maven site structure (src/site/ directory) and site descriptor (site.xml). This prevents creating a professional project website with documentation, reports, and navigation.

Current State

ls src/site/
# No src/site directory

find . -name "site.xml"
# No site.xml descriptor

Impact

Cannot Customize Maven Site

  • Generated site uses default layout
  • No custom navigation
  • No project branding
  • No additional documentation pages

Missing Professional Website

Similar projects have:

  • Project overview page
  • Getting started guide
  • API documentation (JavaDoc)
  • Architecture documentation
  • Contributing guidelines
  • Change history

jcommons currently: Only default Maven-generated pages

No Central Documentation Hub

Documentation scattered:

No unified site bringing it all together

Recommended Solution

Create src/site Structure

src/site/
├── site.xml           # Site descriptor (navigation, skin)
├── markdown/          # Markdown pages (optional)
│   ├── index.md       # Home page
│   ├── getting-started.md
│   └── architecture.md
├── resources/         # Static resources
│   ├── css/
│   │   └── site.css   # Custom styling
│   └── images/
│       └── logo.png
└── apt/               # APT format pages (optional)

Example site.xml

<?xml version="1.0" encoding="UTF-8"?>
<project name="jcommons">
    <bannerLeft>
        <name>jcommons</name>
        <src>images/logo.png</src>
        <href>https://github.com/FlossWare/jcommons</href>
    </bannerLeft>

    <publishDate position="right"/>
    <version position="right"/>

    <body>
        <links>
            <item name="GitHub" href="https://github.com/FlossWare/jcommons"/>
            <item name="Issues" href="https://github.com/FlossWare/jcommons/issues"/>
            <item name="Solenopsis" href="https://github.com/solenopsis"/>
        </links>

        <menu name="Overview">
            <item name="Introduction" href="index.html"/>
            <item name="Getting Started" href="getting-started.html"/>
            <item name="Architecture" href="architecture.html"/>
        </menu>

        <menu name="Documentation">
            <item name="JavaDoc" href="apidocs/index.html"/>
            <item name="Source Xref" href="xref/index.html"/>
        </menu>

        <menu name="Quality Reports">
            <item name="Code Coverage" href="jacoco/index.html"/>
            <item name="SpotBugs" href="spotbugs.html"/>
            <item name="PMD" href="pmd.html"/>
            <item name="Checkstyle" href="checkstyle.html"/>
        </menu>

        <menu name="Project Info">
            <item name="Dependencies" href="dependencies.html"/>
            <item name="Team" href="team.html"/>
            <item name="License" href="license.html"/>
            <item name="SCM" href="scm.html"/>
        </menu>

        <menu ref="reports"/>
    </body>

    <skin>
        <groupId>org.apache.maven.skins</groupId>
        <artifactId>maven-fluido-skin</artifactId>
        <version>2.0.0-M10</version>
    </skin>
</project>

Example index.md (Home Page)

# jcommons

Foundation utilities for the [Solenopsis](https://github.com/solenopsis) 
Salesforce SOAP framework.

## Features

* **SOAP Utilities**: Configure Apache CXF clients for Salesforce
* **String Utilities**: Validation, encoding, concatenation
* **File Utilities**: Safe I/O operations
* **Array Utilities**: Validation and manipulation
* **Logging Utilities**: Enhanced logging with varargs

## Quality Standards

* 93% code coverage (JaCoCo enforced)
* Zero SpotBugs violations
* Google Java Style Guide (Checkstyle)
* PMD code quality rules
* 80% mutation coverage (PIT)

## Quick Start

[Getting Started Guide](getting-started.html)

## Project Information

* [JavaDoc](apidocs/index.html)
* [Code Coverage](jacoco/index.html)
* [Dependencies](dependencies.html)

Benefits

Professional Project Site

mvn site
# Generates: target/site/index.html
# Professional layout with navigation
# Custom branding
# Integrated reports

Centralized Documentation

  • All docs in one place
  • Consistent navigation
  • Cross-linked content
  • Professional appearance

Deployment to GitHub Pages

# .github/workflows/main.yml
- name: Generate Maven Site
  run: mvn site site:stage

- name: Deploy to GitHub Pages
  uses: peaceiris/actions-gh-pages@v4
  with:
    publish_dir: ./target/staging
    destination_dir: site

Result: https://flossware.github.io/jcommons/site/

Better Discoverability

  • Search engines index site
  • Users find documentation easily
  • Professional image
  • Showcases quality metrics

Comparison with Similar Projects

Apache Commons Lang

Google Guava

  • ✅ Maven site with navigation
  • ✅ Integrated JavaDoc and reports

jcommons (Current)

  • ❌ No src/site/ directory
  • ❌ No site descriptor
  • ❌ Default Maven layout only

Implementation Steps

Phase 1: Basic Structure

  1. Create src/site/site.xml with navigation
  2. Create src/site/markdown/index.md (home page)
  3. Test: mvn site
  4. Review: target/site/index.html

Phase 2: Additional Pages

  1. getting-started.md (installation, usage)
  2. architecture.md (design overview)
  3. migration-v2.md (v2.0 migration guide)

Phase 3: Integration

  1. Requires Missing <reporting> section in pom.xml - cannot generate unified Maven site reports #197 (reporting section) for quality reports
  2. Requires No JavaDoc plugin execution configured in pom.xml (only in pluginManagement) #151 (JavaDoc plugin) for API docs
  3. Link to GitHub (README, CONTRIBUTING, CHANGELOG)

Phase 4: Deployment (Optional)

  1. Configure GitHub Pages deployment
  2. Update README with site link
  3. Automated deployment on release

Minimal Implementation

If full site too much work, at minimum create:

src/site/
└── site.xml    # Just navigation for existing reports

This provides:

  • Custom navigation
  • Project branding
  • Links to GitHub
  • No additional pages needed

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions