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

MPOM-260 configure javadoc for reproducible builds #31

Conversation

kwin
Copy link
Member

@kwin kwin commented Jan 3, 2021

No description provided.

Copy link
Member

@michael-o michael-o left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incomplete:

  • Version not set in reporting
  • Configuration missing in <build />

@kwin
Copy link
Member Author

kwin commented Jan 3, 2021

Under which circumstances would I need to configure in build? According to https://maven.apache.org/guides/mini/guide-configuring-plugins.html#using-the-reporting-tag-vs-build-tag configuration for all reporting goals is leveraging reporting->plugins! And according to https://maven.apache.org/plugins/maven-javadoc-plugin/plugin-info.html all relevant goals are reporting goals.

@michael-o
Copy link
Member

michael-o commented Jan 3, 2021

Interesting, this never worked for me...I need to check.

@kwin
Copy link
Member Author

kwin commented Jan 3, 2021

Also the comments in https://issues.apache.org/jira/browse/MSITE-443 are highly confusing. So are versions from pluginManagement taken into account for reporting plugins or not?

@michael-o
Copy link
Member

I have just tried this on my own projects with MJAVADOC removed from plugin management:

mosipov@bsd1srv:/usr/home/mosipov/var/Projekte/dirctxsrc
$ mvn javadoc:javadoc
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for net.sf.michael-o.dirctxsrc:dircontextsource:jar:2.2.1-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing. @ line 181, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------< net.sf.michael-o.dirctxsrc:dircontextsource >-------------
[INFO] Building JNDI DirContextSource 2.2.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] >>> maven-javadoc-plugin:3.2.0:javadoc (default-cli) > generate-sources @ dircontextsource >>>
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M3:enforce (enforce-maven) @ dircontextsource ---
[INFO]
[INFO] <<< maven-javadoc-plugin:3.2.0:javadoc (default-cli) < generate-sources @ dircontextsource <<<
[INFO]
[INFO]
[INFO] --- maven-javadoc-plugin:3.2.0:javadoc (default-cli) @ dircontextsource ---
[INFO] No previous run data found, generating javadoc.
[INFO]
Loading source files for package net.sf.michaelo.dirctxsrc...
Loading source files for package net.sf.michaelo.dirctxsrc.spring...
Constructing Javadoc information...
Standard Doclet version 1.8.0_275
Building tree for all the packages and classes...
Generating /var/mosipov/Projekte/dirctxsrc/target/site/apidocs/net/sf/michaelo/dirctxsrc/DirContextSource.html...
Generating /var/mosipov/Projekte/dirctxsrc/target/site/apidocs/net/sf/michaelo/dirctxsrc/DirContextSource.Auth.html...
Generating /var/mosipov/Projekte/dirctxsrc/target/site/apidocs/net/sf/michaelo/dirctxsrc/DirContextSource.Builder.html...
Generating /var/mosipov/Projekte/dirctxsrc/target/site/apidocs/net/sf/michaelo/dirctxsrc/DirContextSourceFactory.html...
Generating /var/mosipov/Projekte/dirctxsrc/target/site/apidocs/net/sf/michaelo/dirctxsrc/spring/DirContextSource.html...
Generating /var/mosipov/Projekte/dirctxsrc/target/site/apidocs/overview-frame.html...
Generating /var/mosipov/Projekte/dirctxsrc/target/site/apidocs/net/sf/michaelo/dirctxsrc/package-frame.html...
Generating /var/mosipov/Projekte/dirctxsrc/target/site/apidocs/net/sf/michaelo/dirctxsrc/package-summary.html...
Generating /var/mosipov/Projekte/dirctxsrc/target/site/apidocs/net/sf/michaelo/dirctxsrc/package-tree.html...
Generating /var/mosipov/Projekte/dirctxsrc/target/site/apidocs/net/sf/michaelo/dirctxsrc/spring/package-frame.html...
Generating /var/mosipov/Projekte/dirctxsrc/target/site/apidocs/net/sf/michaelo/dirctxsrc/spring/package-summary.html...
Generating /var/mosipov/Projekte/dirctxsrc/target/site/apidocs/net/sf/michaelo/dirctxsrc/spring/package-tree.html...
Generating /var/mosipov/Projekte/dirctxsrc/target/site/apidocs/constant-values.html...
Generating /var/mosipov/Projekte/dirctxsrc/target/site/apidocs/net/sf/michaelo/dirctxsrc/class-use/DirContextSource.html...
Generating /var/mosipov/Projekte/dirctxsrc/target/site/apidocs/net/sf/michaelo/dirctxsrc/class-use/DirContextSource.Auth.html...
Generating /var/mosipov/Projekte/dirctxsrc/target/site/apidocs/net/sf/michaelo/dirctxsrc/class-use/DirContextSource.Builder.html...
Generating /var/mosipov/Projekte/dirctxsrc/target/site/apidocs/net/sf/michaelo/dirctxsrc/class-use/DirContextSourceFactory.html...
Generating /var/mosipov/Projekte/dirctxsrc/target/site/apidocs/net/sf/michaelo/dirctxsrc/spring/class-use/DirContextSource.html...
Generating /var/mosipov/Projekte/dirctxsrc/target/site/apidocs/net/sf/michaelo/dirctxsrc/package-use.html...
Generating /var/mosipov/Projekte/dirctxsrc/target/site/apidocs/net/sf/michaelo/dirctxsrc/spring/package-use.html...
Building index for all the packages and classes...
Generating /var/mosipov/Projekte/dirctxsrc/target/site/apidocs/overview-tree.html...
Generating /var/mosipov/Projekte/dirctxsrc/target/site/apidocs/index-all.html...
Generating /var/mosipov/Projekte/dirctxsrc/target/site/apidocs/deprecated-list.html...
Building index for all classes...
Generating /var/mosipov/Projekte/dirctxsrc/target/site/apidocs/allclasses-frame.html...
Generating /var/mosipov/Projekte/dirctxsrc/target/site/apidocs/allclasses-noframe.html...
Generating /var/mosipov/Projekte/dirctxsrc/target/site/apidocs/index.html...
Generating /var/mosipov/Projekte/dirctxsrc/target/site/apidocs/overview-summary.html...
Generating /var/mosipov/Projekte/dirctxsrc/target/site/apidocs/help-doc.html...
12 warnings
[WARNING] Javadoc Warnings
[WARNING] /var/mosipov/Projekte/dirctxsrc/src/main/java/net/sf/michaelo/dirctxsrc/spring/DirContextSource.java:97: warning: no @param for contextFactory
[WARNING] public void setContextFactory(String contextFactory) {
[WARNING] ^
[WARNING] /var/mosipov/Projekte/dirctxsrc/src/main/java/net/sf/michaelo/dirctxsrc/spring/DirContextSource.java:104: warning: no @param for auth
[WARNING] public void setAuth(Auth auth) {
[WARNING] ^
[WARNING] /var/mosipov/Projekte/dirctxsrc/src/main/java/net/sf/michaelo/dirctxsrc/spring/DirContextSource.java:104: warning - Tag @see: can't find auth(Auth) in net.sf.michaelo.dirctxsrc.DirContextSource.Builder
[WARNING] /var/mosipov/Projekte/dirctxsrc/src/main/java/net/sf/michaelo/dirctxsrc/spring/DirContextSource.java:111: warning: no @param for loginEntryName
[WARNING] public void setLoginEntryName(String loginEntryName) {
[WARNING] ^
[WARNING] /var/mosipov/Projekte/dirctxsrc/src/main/java/net/sf/michaelo/dirctxsrc/spring/DirContextSource.java:118: warning: no @param for debug
[WARNING] public void setDebug(boolean debug) {
[WARNING] ^
[WARNING] /var/mosipov/Projekte/dirctxsrc/src/main/java/net/sf/michaelo/dirctxsrc/spring/DirContextSource.java:125: warning: no @param for qop
[WARNING] public void setQop(String... qop) {
[WARNING] ^
[WARNING] /var/mosipov/Projekte/dirctxsrc/src/main/java/net/sf/michaelo/dirctxsrc/spring/DirContextSource.java:132: warning: no @param for mutualAuth
[WARNING] public void setMutualAuth(boolean mutualAuth) {
[WARNING] ^
[WARNING] /var/mosipov/Projekte/dirctxsrc/src/main/java/net/sf/michaelo/dirctxsrc/spring/DirContextSource.java:139: warning: no @param for retries
[WARNING] public void setRetries(int retries) {
[WARNING] ^
[WARNING] /var/mosipov/Projekte/dirctxsrc/src/main/java/net/sf/michaelo/dirctxsrc/spring/DirContextSource.java:146: warning: no @param for retryWait
[WARNING] public void setRetryWait(int retryWait) {
[WARNING] ^
[WARNING] /var/mosipov/Projekte/dirctxsrc/src/main/java/net/sf/michaelo/dirctxsrc/spring/DirContextSource.java:153: warning: no @param for binaryAttributes
[WARNING] public void setBinaryAttributes(String... binaryAttributes) {
[WARNING] ^
[WARNING] /var/mosipov/Projekte/dirctxsrc/src/main/java/net/sf/michaelo/dirctxsrc/spring/DirContextSource.java:160: warning: no @param for referral
[WARNING] public void setReferral(String referral) {
[WARNING] ^
[WARNING] /var/mosipov/Projekte/dirctxsrc/src/main/java/net/sf/michaelo/dirctxsrc/spring/DirContextSource.java:167: warning: no @param for additionalProperties
[WARNING] public void setAdditionalProperties(Map<String, Object> additionalProperties) {
[WARNING] ^
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  7.356 s
[INFO] Finished at: 2021-01-04T21:41:33+01:00
[INFO] ------------------------------------------------------------------------

as well as

mosipov@bsd1srv:/usr/home/mosipov/var/Projekte/dirctxsrc
$ mvn site
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for net.sf.michael-o.dirctxsrc:dircontextsource:jar:2.2.1-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing. @ line 181, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------< net.sf.michael-o.dirctxsrc:dircontextsource >-------------
[INFO] Building JNDI DirContextSource 2.2.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:3.1.2:unpack (unpack-site-resources) @ dircontextsource ---
[INFO] Configured Artifact: net.sf.michael-o:michael-o-parent:site-resources:15-SNAPSHOT:zip
[INFO] Unpacking /home/mosipov/.m2/repository/net/sf/michael-o/michael-o-parent/15-SNAPSHOT/michael-o-parent-15-SNAPSHOT-site-resources.zip to /var/mosipov/Projekte/dirctxsrc/target/site with includes "" and excludes ""
[INFO]
[INFO] --- maven-site-plugin:3.9.1:site (default-site) @ dircontextsource ---
[INFO] configuring report plugin org.apache.maven.plugins:maven-project-info-reports-plugin:3.1.1
[INFO] 8 reports configured for maven-project-info-reports-plugin:3.1.1: summary, team, licenses, scm, mailing-lists, issue-management, dependencies, dependency-info
[INFO] configuring report plugin org.apache.maven.plugins:maven-jxr-plugin:3.0.0
[INFO] preparing maven-jxr-plugin:jxr report requires 'generate-sources' forked phase execution
[INFO]
[INFO] >>> maven-jxr-plugin:3.0.0:jxr > generate-sources @ dircontextsource >>>
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M3:enforce (enforce-maven) @ dircontextsource ---
[INFO]
[INFO] <<< maven-jxr-plugin:3.0.0:jxr < generate-sources @ dircontextsource <<<
[INFO]
[INFO] 'generate-sources' forked phase execution for maven-jxr-plugin:jxr report preparation done
[INFO] preparing maven-jxr-plugin:test-jxr report requires 'generate-test-sources' forked phase execution
[INFO]
[INFO] >>> maven-jxr-plugin:3.0.0:test-jxr > generate-test-sources @ dircontextsource >>>
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M3:enforce (enforce-maven) @ dircontextsource ---
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ dircontextsource ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] skip non existing resourceDirectory /var/mosipov/Projekte/dirctxsrc/src/main/resources
[INFO] Copying 1 resource to META-INF
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ dircontextsource ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 5 source files to /var/mosipov/Projekte/dirctxsrc/target/classes
[INFO]
[INFO] <<< maven-jxr-plugin:3.0.0:test-jxr < generate-test-sources @ dircontextsource <<<
[INFO]
[INFO] 'generate-test-sources' forked phase execution for maven-jxr-plugin:test-jxr report preparation done
[INFO] 2 reports detected for maven-jxr-plugin:3.0.0: jxr, test-jxr
[INFO] configuring report plugin org.apache.maven.plugins:maven-javadoc-plugin:3.2.0
[INFO] preparing maven-javadoc-plugin:javadoc report requires 'generate-sources' forked phase execution
[INFO]
[INFO] >>> maven-javadoc-plugin:3.2.0:javadoc > generate-sources @ dircontextsource >>>
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M3:enforce (enforce-maven) @ dircontextsource ---
[INFO]
[INFO] <<< maven-javadoc-plugin:3.2.0:javadoc < generate-sources @ dircontextsource <<<
[INFO]
[INFO] 'generate-sources' forked phase execution for maven-javadoc-plugin:javadoc report preparation done
[INFO] preparing maven-javadoc-plugin:test-javadoc report requires 'generate-test-sources' forked phase execution
[INFO]
[INFO] >>> maven-javadoc-plugin:3.2.0:test-javadoc > generate-test-sources @ dircontextsource >>>
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M3:enforce (enforce-maven) @ dircontextsource ---
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ dircontextsource ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] skip non existing resourceDirectory /var/mosipov/Projekte/dirctxsrc/src/main/resources
[INFO] Copying 1 resource to META-INF
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ dircontextsource ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 5 source files to /var/mosipov/Projekte/dirctxsrc/target/classes
[INFO]
[INFO] <<< maven-javadoc-plugin:3.2.0:test-javadoc < generate-test-sources @ dircontextsource <<<
[INFO]
[INFO] 'generate-test-sources' forked phase execution for maven-javadoc-plugin:test-javadoc report preparation done
[INFO] 6 reports detected for maven-javadoc-plugin:3.2.0: aggregate-no-fork, javadoc, javadoc-no-fork, test-aggregate-no-fork, test-javadoc, test-javadoc-no-fork
[INFO] configuring report plugin org.apache.maven.plugins:maven-pmd-plugin:3.14.0
[INFO] 2 reports detected for maven-pmd-plugin:3.14.0: cpd, pmd
[INFO] configuring report plugin com.github.spotbugs:spotbugs-maven-plugin:4.1.4
[INFO] 1 report detected for spotbugs-maven-plugin:4.1.4: spotbugs
[INFO] configuring report plugin org.apache.maven.plugins:maven-surefire-report-plugin:3.0.0-M5
[INFO] preparing maven-surefire-report-plugin:report report requires '[surefire]test' forked phase execution
[INFO]
[INFO] >>> maven-surefire-report-plugin:3.0.0-M5:report > [surefire]test @ dircontextsource >>>
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M3:enforce (enforce-maven) @ dircontextsource ---
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ dircontextsource ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] skip non existing resourceDirectory /var/mosipov/Projekte/dirctxsrc/src/main/resources
[INFO] Copying 1 resource to META-INF
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ dircontextsource ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 5 source files to /var/mosipov/Projekte/dirctxsrc/target/classes
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) @ dircontextsource ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ dircontextsource ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 4 source files to /var/mosipov/Projekte/dirctxsrc/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-test) @ dircontextsource ---
[INFO]
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running net.sf.michaelo.dirctxsrc.DirContextSourceGssApiAuthTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.081 s - in net.sf.michaelo.dirctxsrc.DirContextSourceGssApiAuthTest
[INFO] Running net.sf.michaelo.dirctxsrc.DirContextSourceBuilderCreationTest
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 s - in net.sf.michaelo.dirctxsrc.DirContextSourceBuilderCreationTest
[INFO] Running net.sf.michaelo.dirctxsrc.DirContextSourceBuilderTest
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 s - in net.sf.michaelo.dirctxsrc.DirContextSourceBuilderTest
[INFO] Running net.sf.michaelo.dirctxsrc.DirContextSourceBuilderConfigurationTest
[INFO] Tests run: 20, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in net.sf.michaelo.dirctxsrc.DirContextSourceBuilderConfigurationTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 32, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] <<< maven-surefire-report-plugin:3.0.0-M5:report < [surefire]test @ dircontextsource <<<
[INFO]
[INFO] '[surefire]test' forked phase execution for maven-surefire-report-plugin:report report preparation done
[INFO] 3 reports detected for maven-surefire-report-plugin:3.0.0-M5: failsafe-report-only, report, report-only
[INFO] configuring report plugin org.apache.maven.plugins:maven-changes-plugin:2.12.1
[INFO] 1 report configured for maven-changes-plugin:2.12.1: changes-report
[INFO] Fork Value is true
[INFO] Done SpotBugs Analysis....
[INFO] Rendering site with default locale English (en)
[INFO] Relativizing decoration links with respect to localized project URL: https://dirctxsrc.sourceforge.net
[INFO] Rendering content with org.apache.maven.skins:maven-fluido-skin:jar:1.9 skin.
[INFO] Skipped "Javadoc" report (maven-javadoc-plugin:3.2.0:javadoc), file "apidocs/index.html" already exists.
[INFO] Skipped "Javadoc" report (maven-javadoc-plugin:3.2.0:javadoc-no-fork), file "apidocs/index.html" already exists.
[INFO] Skipped "Test Javadoc" report (maven-javadoc-plugin:3.2.0:test-javadoc), file "testapidocs/index.html" already exists.
[INFO] Skipped "Test Javadoc" report (maven-javadoc-plugin:3.2.0:test-javadoc-no-fork), file "testapidocs/index.html" already exists.
[INFO] Skipped "Surefire Report" report (maven-surefire-report-plugin:3.0.0-M5:report-only), file "surefire-report.html" already exists.
[INFO] Rendering 6 Doxia documents: 6 apt
[INFO] Generating "Summary" report       --- maven-project-info-reports-plugin:3.1.1:summary
[INFO] Generating "Team" report          --- maven-project-info-reports-plugin:3.1.1:team
[INFO] Generating "Licenses" report      --- maven-project-info-reports-plugin:3.1.1:licenses
[INFO] Generating "Source Code Management" report --- maven-project-info-reports-plugin:3.1.1:scm
[INFO] Generating "Issue Management" report --- maven-project-info-reports-plugin:3.1.1:issue-management
[INFO] Generating "Dependencies" report  --- maven-project-info-reports-plugin:3.1.1:dependencies
[INFO] Generating "Dependency Information" report --- maven-project-info-reports-plugin:3.1.1:dependency-info
[INFO] Generating "Source Xref" report   --- maven-jxr-plugin:3.0.0:jxr
[INFO] Generating "Test Source Xref" report --- maven-jxr-plugin:3.0.0:test-jxr
[INFO] Generating "Javadoc" report       --- maven-javadoc-plugin:3.2.0:aggregate-no-fork
[INFO] No previous run data found, generating javadoc.
[INFO]
12 warnings
[WARNING] Javadoc Warnings
[WARNING] /var/mosipov/Projekte/dirctxsrc/src/main/java/net/sf/michaelo/dirctxsrc/spring/DirContextSource.java:97: warning: no @param for contextFactory
[WARNING] public void setContextFactory(String contextFactory) {
[WARNING] ^
[WARNING] /var/mosipov/Projekte/dirctxsrc/src/main/java/net/sf/michaelo/dirctxsrc/spring/DirContextSource.java:104: warning: no @param for auth
[WARNING] public void setAuth(Auth auth) {
[WARNING] ^
[WARNING] /var/mosipov/Projekte/dirctxsrc/src/main/java/net/sf/michaelo/dirctxsrc/spring/DirContextSource.java:104: warning - Tag @see: can't find auth(Auth) in net.sf.michaelo.dirctxsrc.DirContextSource.Builder
[WARNING] /var/mosipov/Projekte/dirctxsrc/src/main/java/net/sf/michaelo/dirctxsrc/spring/DirContextSource.java:111: warning: no @param for loginEntryName
[WARNING] public void setLoginEntryName(String loginEntryName) {
[WARNING] ^
[WARNING] /var/mosipov/Projekte/dirctxsrc/src/main/java/net/sf/michaelo/dirctxsrc/spring/DirContextSource.java:118: warning: no @param for debug
[WARNING] public void setDebug(boolean debug) {
[WARNING] ^
[WARNING] /var/mosipov/Projekte/dirctxsrc/src/main/java/net/sf/michaelo/dirctxsrc/spring/DirContextSource.java:125: warning: no @param for qop
[WARNING] public void setQop(String... qop) {
[WARNING] ^
[WARNING] /var/mosipov/Projekte/dirctxsrc/src/main/java/net/sf/michaelo/dirctxsrc/spring/DirContextSource.java:132: warning: no @param for mutualAuth
[WARNING] public void setMutualAuth(boolean mutualAuth) {
[WARNING] ^
[WARNING] /var/mosipov/Projekte/dirctxsrc/src/main/java/net/sf/michaelo/dirctxsrc/spring/DirContextSource.java:139: warning: no @param for retries
[WARNING] public void setRetries(int retries) {
[WARNING] ^
[WARNING] /var/mosipov/Projekte/dirctxsrc/src/main/java/net/sf/michaelo/dirctxsrc/spring/DirContextSource.java:146: warning: no @param for retryWait
[WARNING] public void setRetryWait(int retryWait) {
[WARNING] ^
[WARNING] /var/mosipov/Projekte/dirctxsrc/src/main/java/net/sf/michaelo/dirctxsrc/spring/DirContextSource.java:153: warning: no @param for binaryAttributes
[WARNING] public void setBinaryAttributes(String... binaryAttributes) {
[WARNING] ^
[WARNING] /var/mosipov/Projekte/dirctxsrc/src/main/java/net/sf/michaelo/dirctxsrc/spring/DirContextSource.java:160: warning: no @param for referral
[WARNING] public void setReferral(String referral) {
[WARNING] ^
[WARNING] /var/mosipov/Projekte/dirctxsrc/src/main/java/net/sf/michaelo/dirctxsrc/spring/DirContextSource.java:167: warning: no @param for additionalProperties
[WARNING] public void setAdditionalProperties(Map<String, Object> additionalProperties) {
[WARNING] ^
[INFO] Generating "Test Javadoc" report  --- maven-javadoc-plugin:3.2.0:test-aggregate-no-fork
[INFO] Configuration changed, re-generating javadoc.
[INFO] Generating "CPD" report           --- maven-pmd-plugin:3.14.0:cpd
[INFO] Generating "PMD" report           --- maven-pmd-plugin:3.14.0:pmd
[INFO] Generating "SpotBugs" report      --- spotbugs-maven-plugin:4.1.4:spotbugs
[INFO] Generating "Surefire Report" report --- maven-surefire-report-plugin:3.0.0-M5:report
[INFO] Generating "Changes" report       --- maven-changes-plugin:2.12.1:changes-report
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  27.810 s
[INFO] Finished at: 2021-01-04T21:44:53+01:00
[INFO] ------------------------------------------------------------------------

Do you see the difference? The first one is not quiet, it ignores reporting configuration. Maybe @hboutemy can clarify.

@kwin
Copy link
Member Author

kwin commented Jan 5, 2021

Ok, so basically the documentation at https://maven.apache.org/guides/mini/guide-configuring-plugins.html#using-the-reporting-tag-vs-build-tag is just plain wrong and reporting plugin configuration is not taken into account for reporting mojos called directly? How do you then configure javadoc correctly then? Duplicate the configuration?

@michael-o
Copy link
Member

michael-o commented Jan 5, 2021

@kwin I found with this over the years, but never found the time to dive deep into this. It also does not make sense. Plugin config should not depend on reporting. If at all, it should be the other way around. Have a look how I do it in my POM: https://search.maven.org/artifact/net.sf.michael-o/michael-o-parent/14/pom

Sometimes the docs, unfortunately, represent the to be situation, not as-is.

@kwin kwin force-pushed the feature/configure-javadoc-for-reproducible-build branch from 7d84c30 to 12f42b4 Compare January 5, 2021 19:13
@kwin kwin force-pushed the feature/configure-javadoc-for-reproducible-build branch from 12f42b4 to a3e6d37 Compare January 5, 2021 19:13
@kwin kwin requested a review from michael-o January 5, 2021 19:14
@asfgit asfgit closed this in 7ca2f06 Jan 5, 2021
@hboutemy
Copy link
Member

hboutemy commented Jan 5, 2021

this PR mixes many many different things:

  • create a property to define maven-javadoc-plugin version: no, please don't do that
  • remove one source of noise in generated javadoc: timestamp = a good idea
  • the hope that it will be sufficient to have reproducible javadoc: IMHO, you're dreaming, there are so many moving parts in javadoc generated html (with links to external components javadoc) that I personnally stopped dreaming about it
  • the question of configuring the reporting section in addition to configuring the plugin, which should not be necessary if pluginManagement is configured since maven-site-plugin 3.4: see https://maven.apache.org/plugins/maven-site-plugin/history.html (some documentation here and there should probably require some updates to explain how things evolved over time)

all in all, in this PR, I would only keep the timestamp removal in plugin configuration (and not advertise it as "configure javadoc for reproducible builds", because it's only a little part of what is needed for that)
anything else would require separate discussion

@michael-o
Copy link
Member

this PR mixes many many different things:

* create a property to define maven-javadoc-plugin version: no, please don't do that

Please explain.

* the hope that it will be sufficient to have reproducible javadoc: IMHO, you're dreaming, there are so many moving parts in javadoc generated html (with links to external components javadoc) that I personnally stopped dreaming about it

Likely, but this will at least spare wasteful commits to scmpubsub.

* the question of configuring the reporting section in addition to configuring the plugin, which should not be necessary if pluginManagement is configured since maven-site-plugin 3.4: see https://maven.apache.org/plugins/maven-site-plugin/history.html (some documentation here and there should probably require some updates to explain how things evolved over time)

It causes fuzz as you can see. What is your concrete recommendatoin.

all in all, in this PR, I would only keep the timestamp removal in plugin configuration (and not advertise it as "configure javadoc for reproducible builds", because it's only a little part of what is needed for that)
anything else would require separate discussion

I ran reword the issue title. Would you keep the Javadoc version or rather remove it?

@kwin
Copy link
Member Author

kwin commented Jan 6, 2021

the question of configuring the reporting section in addition to configuring the plugin, which should not be necessary if pluginManagement is configured since maven-site-plugin 3.4: see https://maven.apache.org/plugins/maven-site-plugin/history.html (some documentation here and there should probably require some updates to explain how things evolved over time)

On that page, I could not find hints, also the link https://maven.apache.org/plugins/maven-site-plugin/maven-3.html is dead on that page. The only references towards build plugin/reference plugin configuration is

  1. https://maven.apache.org/pom.html#reporting, stating

    And the subtler difference is that a plugin configuration under the reporting element works as build plugin configuration, although the opposite is not true (a build plugin configuration does not affect a reporting plugin).

    This information lead me to believe that also build plugin Management would not affect reporting plugins. This requires clarification.

  2. https://maven.apache.org/guides/mini/guide-configuring-plugins.html#using-the-reporting-tag-vs-build-tag, stating

    mvn site
    It uses only the parameters defined in the element of each reporting Plugin specified in the element, i.e. site always ignores the parameters defined in the element of each plugin specified in .

    This also indicates that plugin management is not relevant for reporting plugins, as the only is in printed in bold

There is also the related bug report about Maven not behaving as documented: https://issues.apache.org/jira/browse/MNG-7006.
Please clarify first what is the intended behaviour, because right now I am totally lost with what is desired behaviour vs. what is actually a bug.

@hboutemy
Copy link
Member

hboutemy commented Jan 7, 2021

@michael-o I proposed PR #34 for the way I see MPOM-260 to be solved: review welcome before I merge to master

@kwin thanks for the pointers to many locations in the site that should be updated/enhanced: I did much work on this in the past, but I missed some

FYI, I finally remembered where I wrote the reference documentation of how reporting management evolves over time: it's in reporting-exec, given it's where the direct evolution was coded https://maven.apache.org/shared/maven-reporting-exec/
This component documentation is really the reference documentation for that aspect, because that's where code is, then is documented when it evolves.
The history page on maven-site-plugin was an addition I did later to have a chance to see from a user point of view, who knows only about maven-site-plugin version, what is in each version (be it from evolution coded in Doxia, Doxia Site Tools or Maven Reporting Executor)

And I did not fight against removing maven-3.html page from 3.9.1 in apache/maven-site-plugin#20 , because I knew this page was too complex (and I can't fight against every time people try to do cleanup, even if I'm convinced that I'll be hit like here...), but this is where in the past evolution was described in detail: https://maven.apache.org/plugins-archives/maven-site-plugin-3.9.0/maven-3.html

I moved MNG-7006 to https://issues.apache.org/jira/browse/MNGSITE-440 because that's a better Jira project: let's track in this Jira issue the documentation improvement

@kwin
Copy link
Member Author

kwin commented Jan 7, 2021

@hboutemy Thanks for the comments, but even https://maven.apache.org/shared/maven-reporting-exec/ only talks about inheriting versions(!) but not configuration in general.
If it is also inheriting configuration this should be explicitly mentioned.

@hboutemy
Copy link
Member

hboutemy commented Jan 7, 2021

@kwin it is mentioned

Since maven-reporting-exec 1.2 (which is used by maven-site-plugin 3.4), plugin configuration in build/pluginManagement is also injected into reports.

but I agree that you need to read with attention

perhaps just inverting the 2 topics ("since 1.4" and "since 1.2") could probably be an easy way to disambiguate: WDYT?

@kwin
Copy link
Member Author

kwin commented Jan 7, 2021

@hboutemy Indeed, I have overlooked it. Reversing the order will definitely help. An additional sentence on how this is merged with configuration in reporting->plugins would be valuable as well. Does it work the same as merging of build->pluginMgmt with build->plugins?

@hboutemy
Copy link
Member

hboutemy commented Jan 8, 2021

@kwin here is a proposed update https://maven.apache.org/shared-archives/maven-reporting-exec-LATEST/

Does it work the same as merging of build->pluginMgmt with build->plugins?

yes: I'm happy that you immediately guessed the intent :)
we just need to let everybody know that this has been added in Maven Site Plugin 3.4 (July 2014)

@kwin
Copy link
Member Author

kwin commented Jan 8, 2021

Looks much better, but I would still add an explicit sentence about merging

plugin configuration from build/pluginManagement is also injected into reports

is a bit too vague for me.

@hboutemy
Copy link
Member

hboutemy commented Jan 8, 2021

ok, fair: any proposal?

@kwin
Copy link
Member Author

kwin commented Jan 9, 2021

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

Successfully merging this pull request may close these issues.

None yet

3 participants