maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne (JIRA)" <>
Subject [jira] [Commented] (MJAVADOC-499) Ignore on earlier Java versions
Date Sun, 05 Nov 2017 21:44:00 GMT


Stephen Colebourne commented on MJAVADOC-499:

No. The use case is a project with code locked to Java 6 where the build needs to work on
Java 6, 7, 8 and 9. I don't think this is an uneasonable use case - its not fair or right
to force people to install and run Java 9, particularly as it is not a long-term support release.

If the user builds on Java 6, use the Javadoc tool from Java 6. If they build on Java 8, use
the Javadoc tool from Java 8. And if they build on Java 9, use the Javadoc tool from Java
9. A simple and straightforward goal.

The change that is needed is to make the plugin automatically exclude when
the version of Javadoc doesn't understand it. The Javadoc tool from Java 8 will never understand, so it should be excluded. The alternative is pretty horrible and pretty
tricky, because the profile has to exclude the file twice, once in the build and once in reporting: 

Note that Java 8 is going to last a long time as it is the last "normal" release. So, there
will be lots of projects wanting to have a Java 8 baseline, but also be able to add a module-info
for Java 9 and later. IMO, the compile plugin should also do the same - automatically exclude on versions prior to Java 9. Its too common a use case for just documentation.

> Ignore on earlier Java versions
> ------------------------------------------------
>                 Key: MJAVADOC-499
>                 URL:
>             Project: Maven Javadoc Plugin
>          Issue Type: Improvement
>    Affects Versions: 3.0.0-M1
>            Reporter: Stephen Colebourne
>            Assignee: Robert Scholte
>             Fix For: 3.0.0
> Versions of the javadoc tool prior to Java 9 cannot process ``. The plugin
should automatically detect and exclude `` if the javadoc tool is Java 8 or
earlier. The alternative (Java version specific profiles) does work, but is very verbose for
something that can never work (thus the plugin should deal with it)

This message was sent by Atlassian JIRA

View raw message