You\'ll quickly realize that JDK8 is a lot more strict (by default) when it comes to Javadoc. (link - see last bullet point)
If you never generate any Javadoc then o
I like @ThiagoPorciúncula's solution but it didn't quite go far enough for me.
I typically already have javadoc plugin additionalparam set which were not being overridden by the profile. Because of this I had to:
disableDoclint property to be empty by default.disableDoclint property to be -Xdoclint:none${disableDoclint} in theadditionalparamsection of themaven-javadoc-plugin`.This seems to work well albeit verbose.
disable-java8-doclint
[1.8,)
-Xdoclint:none
...
Then down below I could use the optional ${disableDoclint} variable in the additionalparam section that I had already defined.
org.apache.maven.plugins
maven-javadoc-plugin
jar
false
-tag inheritDoc:X ${disableDoclint}
false
This documentation content is licensed...
-tag inheritDoc:X ${disableDoclint}
This works under java 8 but doesn't cause syntax errors under java 7. Woo hoo!