OSGeo / PROJ-JNI

Java Native Interface for PROJ
https://osgeo.github.io/PROJ-JNI/
MIT License
23 stars 15 forks source link

Fix 'out of sequence' javadoc error #23

Closed kbevers closed 4 years ago

kbevers commented 4 years ago

Running mvn package I get the following error:

$ mvn package
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< org.kortforsyningen:proj >----------------------
[INFO] Building PROJ bindings 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ proj ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ proj ---
[INFO] Compiling 3 source files to /Users/kevers/dev/PROJ-JNI/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/kevers/dev/PROJ-JNI/src/main/java/org/kortforsyningen/proj/Proj.java:[353,8] header used out of sequence: <H4>
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.642 s
[INFO] Finished at: 2019-12-09T19:58:10+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project proj: Compilation failure
[ERROR] /Users/kevers/dev/PROJ-JNI/src/main/java/org/kortforsyningen/proj/Proj.java:[353,8] header used out of sequence: <H4>
[ERROR]
[ERROR] -> [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/MojoFailureException

This PR fixes the problem by changing to <h3> headers

desruisseaux commented 4 years ago

Thanks for the patch. But maybe you are using Java 11? The header sequence has changed in Java 13, and the one used in the current source code is for Java 13. Note that even if compiling with Java 13, the code is still executable on Java 11.

Alternatively we could disable completely the sequence check. Actually this check is disabled by default and explicitly activated in this project; we could just remove that activation. Please let me know which approach you prefer (if you prefer to disable the check, just delete line 105 (<arg>-Xdoclint:all</arg>) in the pom.xml file.)

kbevers commented 4 years ago

My java version seem to be 11:

$ java --version
openjdk 11.0.1 2018-10-16 LTS
OpenJDK Runtime Environment Zulu11.2+3 (build 11.0.1+13-LTS)
OpenJDK 64-Bit Server VM Zulu11.2+3 (build 11.0.1+13-LTS, mixed mode)

If this change causes problems in java 13 builds then I think the sequence check should be turned of. If it doesn't, then this patch should be applied.

desruisseaux commented 4 years ago

It is not possible to have the checks enabled for both Java 11 and Java 13 as they conflict. I propose to keep master as-is so the development stay strict with latest Java version, and remove all explicit "turn on" in the release. So the release would use default setting, which work fine with all supported versions.

If okay, I will created a 1.0-RC3 after we fixed other issues, and create a wiki page with release instructions in order to remember that.

kbevers commented 4 years ago

Sounds good

kbevers commented 4 years ago

I disabled the doclinting in pom.xml in #25