-
-
Notifications
You must be signed in to change notification settings - Fork 683
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generating Javadoc in a Maven project using <detectLinks> does not work #3476
Comments
I wouldn't point the project URL to We might deploy the Javadoc following the However, I checked how some other projects behave and none of them seems to follow the Maven convention: |
@scordio You are right. Many other projects do not follow the convention, but none of them has broken my build so far. In other projects, the Maven plugin detects the 'invalid' links and doesn't forward them to the javadoc tool. Maybe the Maven plugin should interpret the Currently, my workaround seems to be the way to go. |
We will rework our docs to support v3 and v4 in parallel (and maybe relocate them somewhere else in our GitHub org) so I'm leaving this open for further thoughts. |
Just FYI, we use a slightly shorter config in Lines 168 to 171 in 4f072c9
And I just realized we have a cosmetic bug 🙂 (#3478) |
You have to use The |
The
maven-javadoc-plugin
has an option detectLinks which enables detection of Javadoc links of dependent projects. The detection works only if the dependent project follows the default Maven conventions (javadoc must be located under${project.url}/apidocs
).The project URL of assertj-core is
https://assertj.github.io/doc/#assertj-core
. The Maven plugin first checks if the URLhttps://assertj.github.io/doc/#assertj-core/apidocs/element-list
is accessible and then forwards the URL'https://assertj.github.io/doc/#assertj-core/apidocs'
to the javadoc tool.But the javadoc tool interprets the
#
character, reads the URLhttps://assertj.github.io/doc/package-list
and obviously fails:I can workaround this by defining in my project:
Maybe the project URL of assertj-core should be
https://www.javadoc.io/doc/org.assertj/assertj-core/${assertj.version}
instead ofhttps://assertj.github.io/doc/#assertj-core
. But then the javadoc must be located underhttps://www.javadoc.io/doc/org.assertj/assertj-core/${assertj.version}/apidocs
.The text was updated successfully, but these errors were encountered: