You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Emmanuel Venisse (JIRA)" <ji...@codehaus.org> on 2005/05/29 00:51:11 UTC

[jira] Closed: (MNG-434) Compilation failure while trying to compile code with 1.5 generics

     [ http://jira.codehaus.org/browse/MNG-434?page=all ]
     
Emmanuel Venisse closed MNG-434:
--------------------------------

    Resolution: Cannot Reproduce

You must define source and target parameter to 1.5

> Compilation failure while trying to compile code with 1.5 generics
> ------------------------------------------------------------------
>
>          Key: MNG-434
>          URL: http://jira.codehaus.org/browse/MNG-434
>      Project: Maven 2
>         Type: Bug
>   Components: maven-plugins
>     Versions: 2.0-alpha-2
>  Environment: Windows XP professional SP 2, Java Development Kit 1.5.0_02
>     Reporter: Trent Rosenbaum

>
>
> I have been working with a simple hibernate application.  I generated the example my-app layout from the using the following command:
> m2 archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app
> I then used the plugin maven-eclipse-plugin-2.0-alpha-1 to create the appropriate .classpath and .project files.  I am using eclipse 3.1.0 and the output directories are the same the defaults used by maven 2
> <APP_HOME>/target/classes
> <APP_HOME>/target/test-classes
> My eclipse envrionment is set to ensure that complied classes are compatible with 1.5.  While running eclipse and compiling within the same environment I was able to develop my application using generics.  I then exiting eclipse and used maven 2 to compile the project.  I ran the following command:
> m2 clean:clean
> I made sure any compiled class files from eclipse were removed from my project directories and then ran 
> m2 compile
> I then was given a build failure reporting that generics was not  supported under 1.3
> The build output is at the end of this description.  I then configured the maven-compiler-plugin witin my project pom.xml.  I set the source parameter to have values of 1.5, 5.  I then had build failure without any feedback from javac and the maven 2 plugin.  I even gave the parameter a value of 1.4 expecting the same output complaining of generics not being present within 1.4 but still was given no feedback.  I set the value to 1.3 and got the same feedback as below.  Becasue I was using eclipse with auto build on I did not notice this problem until now.
> D:\eclipse\workspace\my-app>m2 clean:clean
> [INFO] -------------------------------------------------------------------------
> ---
> [INFO] Building Maven Quick Start
> [INFO] -------------------------------------------------------------------------
> ---
> [INFO] maven-jar-plugin: resolved to version 2.0-alpha-2 from local repository
> [INFO] maven-clean-plugin: resolved to version 2.0-alpha-2 from local repository
> [INFO] [clean:clean]
> [INFO] Deleting directory D:\eclipse\workspace\my-app\target
> [INFO] -------------------------------------------------------------------------
> ---
> [INFO] BUILD SUCCESSFUL
> [INFO] -------------------------------------------------------------------------
> ---
> [INFO] Total time: < 1 second
> [INFO] Finished at: Sat May 28 23:06:53 BST 2005
> [INFO] Final Memory: 1M/2M
> [INFO] -------------------------------------------------------------------------
> ---
> D:\eclipse\workspace\my-app>m2 compile
> [INFO] -------------------------------------------------------------------------
> ---
> [INFO] Building Maven Quick Start
> [INFO] -------------------------------------------------------------------------
> ---
> [INFO] maven-jar-plugin: resolved to version 2.0-alpha-2 from local repository
> [INFO] maven-resources-plugin: resolved to version 2.0-alpha-2 from local reposi
> tory
> [INFO] maven-compiler-plugin: resolved to version 2.0-alpha-2 from local reposit
> ory
> [INFO] [resources:resources]
> [INFO] [compiler:compile]
> Compiling 2 source files to D:\eclipse\workspace\my-app\target\classes
> [INFO] -------------------------------------------------------------------------
> ---
> [INFO] BUILD FAILURE
> [INFO] -------------------------------------------------------------------------
> ---
> [INFO] Reason: Compilation failure
> [INFO] -------------------------------------------------------------------------
> ---
> [INFO] D:\eclipse\workspace\my-app\src\main\java\com\trentus\app\util\HibernateU
> til.java:[23,-1]  generics are not supported in -source 1.3
> [INFO] -------------------------------------------------------------------------
> ---
> [INFO] Total time: < 1 second
> [INFO] Finished at: Sat May 28 23:06:57 BST 2005
> [INFO] Final Memory: 1M/3M
> [INFO] -------------------------------------------------------------------------
> ---

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org