maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis Lundberg (JIRA)" <j...@codehaus.org>
Subject [jira] Created: (MPLUGIN-183) When setting useJava5 to true the generated code has warnings for Java 5 features
Date Sun, 01 May 2011 16:06:22 GMT
When setting useJava5 to true the generated code has warnings for Java 5 features
---------------------------------------------------------------------------------

                 Key: MPLUGIN-183
                 URL: http://jira.codehaus.org/browse/MPLUGIN-183
             Project: Maven 2.x Plugin Tools
          Issue Type: Improvement
          Components: API
    Affects Versions: 2.7
            Reporter: Dennis Lundberg


If you set the parameter useJava5 to true, the generated HelpMojo has some code in it that
is not Java 5 clean. If you turn on Xlint for maven-compiler-plugin you can see warnings when
the HelpMojo is compiled.

The configuration used:
{code}
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
          <compilerArgument>-Xlint:all</compilerArgument>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>2.7</version>
        <configuration>
          <useJava5>true</useJava5>
        </configuration>
      </plugin>
    </plugins>
  </build>
{code}

Here's what the warnings look like when used in Maven Changes Plugin:
{noformat}
[WARNING] \apache\maven\maven-changes-plugin\target\generated-sources\plugin\org\apache\maven\plugin\changes\HelpMojo.java:[697,29]
[unchecked] unchecked call to add(E) as a member of the raw type java.util.List
[WARNING] \apache\maven\maven-changes-plugin\target\generated-sources\plugin\org\apache\maven\plugin\changes\HelpMojo.java:[723,17]
[unchecked] unchecked call to add(E) as a member of the raw type java.util.List
{noformat}


-- 
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

        

Mime
View raw message