Skip to content
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

RATIS-2125. javadoc jars should not include non-doc items #1123

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

adoroszlai
Copy link
Contributor

@adoroszlai adoroszlai commented Jul 13, 2024

What changes were proposed in this pull request?

Ratis build generates javadoc when using -Prelease. The javadoc jars have unexpected content, e.g. other jars, classes dir (with all .class files), etc.

Steps to reproduce:

mvn -DskipTests -Prelease clean package
unzip -d before ratis-server-api/target/ratis-server-api-3.2.0-SNAPSHOT-javadoc.jar
ls -1sh before

The problem happens because outputDirectory is set to project.build.directory, which is target/. This directory is also where Maven build puts other items, which then get included in the javadoc jar.

The default location in maven-javadoc-plugin is target/apidocs, we can use that.

https://issues.apache.org/jira/browse/RATIS-2125

How was this patch tested?

Steps described in repro, but using after as directory.

Result:

$ diff -r before/ after/
Only in before: classes
Only in before: generated-sources
Only in before: javadoc-bundle-options
Only in before: maven-archiver
Only in before: maven-javadoc-plugin-stale-data.txt
Only in before: maven-shared-archive-resources
Only in before: .plxarc
Only in before: ratis-server-api-3.2.0-SNAPSHOT.jar
Only in before: ratis-server-api-3.2.0-SNAPSHOT-sources.jar
Only in before: ratis-server-api-3.2.0-SNAPSHOT-tests.jar
Only in before: rat.txt
Only in before: test-classes

@adoroszlai adoroszlai self-assigned this Jul 13, 2024
@adoroszlai
Copy link
Contributor Author

Reproducibility check for javadoc works on Java 8, but fails with newer Java. The problem is in the search index JSON files. So it's reverted for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant