[ http://jira.codehaus.org/browse/MJAVADOC-188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vincent Siveton updated MJAVADOC-188: ------------------------------------- Affects Version/s: 2.4 > -top command line argument is passed even when java version is <1.6, > generating a warning > ----------------------------------------------------------------------------------------- > > Key: MJAVADOC-188 > URL: http://jira.codehaus.org/browse/MJAVADOC-188 > Project: Maven 2.x Javadoc Plugin > Issue Type: Bug > Affects Versions: 2.4 > Environment: jdk 1.5 > Reporter: Cleber Zarate > Priority: Trivial > > The -top argument is being passed when we're using a version smaller than 1.6. > Then the following warning is generated: > {noformat} > "[WARNING] -top option is not supported on Java version < 1.6. Ignore this > option." > {noformat} > This warning shouldn't be thrown since we're not setting the -top parameter > in the POM, so there's no way to ignore it. > On AbstractJavadocMojo.java, line 1492, the following method is called: > {noformat} > addArgIfNotEmpty( arguments, "-top", JavadocUtil.quotedArgument( top ), > false, false, SINCE_JAVADOC_1_6 ); > {noformat} > however, this method checks the version first, and then checks if the > argument is null, like the following: > {noformat} > if ( isJavaDocVersionAtLeast( requiredJavaVersion ) ) > { > addArgIfNotEmpty( arguments, key, value, repeatKey, splitValue ); > } > else > { > if ( getLog().isWarnEnabled() ) > { > getLog().warn( key + " option is not supported on Java > version < " + requiredJavaVersion > + ". Ignore this option." ); > } > } > }} > {noformat} > Specifically for this command line argument, the method should check the > version before calling addArgIfNotEmpty, thus removing the warning if we're > not explicitly passing the argument in a jdk < 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