[ http://jira.codehaus.org/browse/MNG-434?page=comments#action_40175 ]
     
Trent Rosenbaum commented on MNG-434:
-------------------------------------

Emmanual your comment solved the problem on my machine, thanks for this.  Bug 
was raised because documentation explains that 1.5 used as default for options 
"source" and "target" with javac that is distributed with jdk 1.5.0_02.  From 
this does the plugin default to a 1.3 compilcation level and not allow the 
default to be used?

> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to