adoroszlai opened a new pull request, #1123:
URL: https://github.com/apache/ratis/pull/1123

   ## 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 -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](https://maven.apache.org/plugins/maven-javadoc-plugin/jar-mojo.html#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
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@ratis.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to