aws / aws/aws-sdk-java-v2

Broken external links in Javadoc artifacts in Maven Central

Open
#2,241 4 comments 0 reactions 0 assignees View on GitHub
documentation needs-discussion p3
Dominant language
Java
Stars
2.6k
Forks
1k
Avg merge
2d 9h
Merged PRs (30d)
51

Description

The links from the per-module Javadoc provided in Maven Central into the centrally hosted API docs are broken.

## Description of bug

External Links from the Javadoc published in Maven Central point to `https://aws.amazon.com/sdkforjava/apidocs` but no Javadoc lives there.

## Expected Behavior

Correct link.

## Current Behavior

Reason for problem:
The [Maven Javadoc Plugin](https://maven.apache.org/plugins/maven-javadoc-plugin) by default uses `${project.url}` value but this value is `https://aws.amazon.com/sdkforjava`. The Plugin will by convention expect to find Javadoc at the subpath `/apidocs` of this URL.

## Possible Solution

Changing the project's URL, i.e. `....` value, in all POM files may not be the way to go solely to make the Maven Javadoc Plugin happy. Perhaps an URL redirect would be the easiest solution? Meaning having the aws.amazon.com website redirect requests for `https://aws.amazon.com/sdkforjava/apidocs` to `https://sdk.amazonaws.com/java/api/latest/`.

Another option might be to set [`links` configuration value](https://maven.apache.org/plugins/maven-javadoc-plugin/javadoc-mojo.html#links) explicitly for the Maven Javadoc Plugin.

## Context

Verified as a problem on v2.15.26, but I suspect the problem exist for any version.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.