[ https://issues.apache.org/jira/browse/MNG-7566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17617795#comment-17617795 ]
ASF GitHub Bot commented on MNG-7566: ------------------------------------- kwin commented on PR #827: URL: https://github.com/apache/maven/pull/827#issuecomment-1279137428 > Stupid question: Does not prevent Invalid class version exception? I mean when the classes are already loaded then this is too late, no? Which classes are loaded already before prerequisites are checked? IMHO this happens before the plugin classloader is even created. Not sure about extensions which are part of plugins, though. > Allow a Maven plugin to require a Java version through its plugin descriptor > ---------------------------------------------------------------------------- > > Key: MNG-7566 > URL: https://issues.apache.org/jira/browse/MNG-7566 > Project: Maven > Issue Type: Improvement > Reporter: Konrad Windszus > Assignee: Konrad Windszus > Priority: Major > > Currently a Maven plugin can only require a minimum Maven version via pom's > prerequisites (https://maven.apache.org/pom.html#Prerequisites). There is > currently no means to require a minimum Java version. > I would suggest to slightly expand the plugin descriptor to include a > minimumJavaVersion element there as well and evaluate that before executing a > plugin goal and emit a good error message. The default Java version could be > determined by the target class file version. -- This message was sent by Atlassian Jira (v8.20.10#820010)