Menu

#174 Building fails on JDK < 8 because of -Xdoclint:none flag to Maven Javadoc plugin

v2.30
closed-wont-fix
nobody
Build (1)
5
2023-06-20
2016-05-06
Bob Hogg
No

Building htmlcleaner 2.16 from source requires JDK 8 and fails on any earlier version. The reason is the presence of the -Xdoclint:none flag in the Maven Javadoc plugin.

With it, building with OpenJDK 7 fails like so:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 26.703 s
[INFO] Finished at: 2016-05-06T07:21:28-04:00
[INFO] Final Memory: 22M/125M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.9:jar (attach-javadocs) on project htmlcleaner: MavenReportException: Error while creating archive:
[ERROR] Exit code: 1 - javadoc: error - invalid flag: -Xdoclint:none

See https://stackoverflow.com/questions/27728733/javadoc-error-invalid-flag-xdoclintnone-when-i-use-java-7-but-it-works-i for more information. A suggested fix there is to check the JDK version using a Maven profile and either include that flag or not, depending on version.

Thanks!

Discussion

  • Scott Wilson

    Scott Wilson - 2016-08-17
    • Group: v2.16 --> v2.17
     
  • Scott Wilson

    Scott Wilson - 2016-10-19
    • Group: v2.17 --> v2.18
     
  • Scott Wilson

    Scott Wilson - 2017-02-06
    • Group: v2.18 --> v2.19
     
  • Scott Wilson

    Scott Wilson - 2017-02-07
    • Group: v2.19 --> v2.20
     
  • Scott Wilson

    Scott Wilson - 2017-05-02
    • Group: v2.20 --> v2.21
     
  • Scott Wilson

    Scott Wilson - 2017-05-11
    • Group: v2.21 --> v2.22
     
  • Scott Wilson

    Scott Wilson - 2018-04-24
    • Group: v2.22 --> v2.23
     
  • Scott Wilson

    Scott Wilson - 2019-09-04
    • Group: v2.23 --> v2.24
     
  • Scott Wilson

    Scott Wilson - 2020-04-29
    • Group: v2.24 --> v2.25
     
  • Scott Wilson

    Scott Wilson - 2021-09-24
    • Group: v2.25 --> v2.26
     
  • Scott Wilson

    Scott Wilson - 2023-04-29
    • Group: v2.26 --> v2.29
     
  • Scott Wilson

    Scott Wilson - 2023-06-19
    • Group: v2.29 --> v2.30
     
  • Scott Wilson

    Scott Wilson - 2023-06-20

    As Java 7 is no longer supported I guess this is no longer so important.

     
  • Scott Wilson

    Scott Wilson - 2023-06-20
    • status: open --> closed-wont-fix
     

Log in to post a comment.