wrends
wrends copied to clipboard
`opendj-doc-generated-ref` plug-in fails in `opendj-server-legacy` on Windows machines with JDK8
Summary
It's currently not possible to build master
on Windows machines, even if all dependencies are satisfied and PGP verification is being skipped, because the opendj-doc-generated-ref
plug-in fails to generate documentation.
Affects Version
4.0.0-SNAPSHOT (at 4678646
)
Environment
- Windows 10.0.17134 Build 17134
- Apache Maven 3.3.9
- Java 1.8.0_172-b11
Steps
Within the wrends
folder checked out to master
, run the following command:
mvn clean install -DskipTests -Denforcer.skip=true -DignoreArtifactSigs -DskipTests
Expected
The build succeeds without any failures.
Actual
The build fails during the opendj-doc-generated-ref
plug-in execution:
[INFO]
[INFO] --- opendj-doc-maven-plugin:4.0.0-SNAPSHOT:generate-config-ref (generate-configuration-reference-doc) @ opendj-doc-generated-ref ---
[INFO]
[INFO] --- opendj-doc-maven-plugin:4.0.0-SNAPSHOT:generate-global-acis-table (generate-global-acis-table-and-ref-for-doc) @ opendj-doc-generated-ref ---
[INFO]
[INFO] --- opendj-doc-maven-plugin:4.0.0-SNAPSHOT:generate-schema-ref (generate-global-acis-table-and-ref-for-doc) @ opendj-doc-generated-ref ---
[INFO]
[INFO] --- opendj-doc-maven-plugin:4.0.0-SNAPSHOT:generate-xml-messages-doc (generate-log-reference-doc) @ opendj-doc-generated-ref ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Wren:DS Doc Helper Maven Plugin .................... SUCCESS [ 14.641 s]
[INFO] Wren:DS Doc Generated References ................... FAILURE [ 35.501 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 56.519 s
[INFO] Finished at: 2018-08-23T00:59:02-04:00
[INFO] Final Memory: 46M/556M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.forgerock.opendj:opendj-doc-maven-plugin:4.0.0-SNAPSHOT:generate-xml-messages-doc (generate-log-reference-doc) on project opendj-doc-generated-ref: NullPointerException: entry -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :opendj-doc-generated-ref
Root Cause
It looks like the issue is that the plug-in is using Paths.get()
within loadPropertiesFromJar()
to assemble the path that's passed-in to the JAR file. On Windows machines, this is problematic because the method generates a path with backslashes instead of forward slashes, and the ZIP spec requires forward slashes.