[ http://jira.codehaus.org/browse/MNG-2706?page=comments#action_83058 ] Kohsuke Kawaguchi commented on MNG-2706: ----------------------------------------
There's nothing non-portable about detecting the version of Java. See http://java.sun.com/j2se/1.3/docs/api/java/lang/System.html#getProperties() Every JRE needs to have the "java.version" property. Compatibility-wise, one is allowed to add more stuff into a certain JVM, but it is not OK to remove things that are required. That would not pass the JCK, so you can't call it JavaSE. The primary goal of this request is so that when people try to build my project (which requires JDK6) with earlier JDK, I want them to get nice friendly error message saying they'd need JDK6, as opposed to have Maven fail with some compilation errors. If that goal could be attained, I'd be happy to do this by declaring a dependency. > Add JDK version to <prerequisites> > ---------------------------------- > > Key: MNG-2706 > URL: http://jira.codehaus.org/browse/MNG-2706 > Project: Maven 2 > Issue Type: Improvement > Components: POM > Reporter: Kohsuke Kawaguchi > > Currently the only prerequsite one can specify is <maven/> according to > http://maven.apache.org/ref/2.0.4/maven-model/maven.html#class_prerequisites > It would be nice to be able to say that a project requires a certain version > of JDK, like, say, 1.5 or 1.6. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
