Select Maven Profile Based on JDK Update Release

A Maven profile can be included based on a JDK release, such as 1.7 or 1.8. But I can’t find a way to activate the profile based on the release of the JDK update.

In particular, I want to have an active profile if using JDK 1.8.0_u121 or later. For example, this does not work:

<profiles> <profile> <activation> <jdk>[1.8.0_u121,]</jdk> <activation> </profile> <additionalparam>--allow-script-in-comments</additionalparam> </profiles> 

Any alternative to profiles that achieve the same effect (allowing to pass the property when using 1.8.0_u121 or later will be gladly accepted).

+5
source share

All Articles