[ http://jira.codehaus.org/browse/MNG-689?page=comments#action_44095 ]
Kenney Westerhof commented on MNG-689: -------------------------------------- I really cannot reproduce this. Seeing your output tells me you probably didn't upgrade correctly. I also use java 5, and your testcase compiles fine (see below). Btw, i had to hand-download a lot of sun jars, next time please try to isolate the compiler error and attach a smaller testcase. Can you retry this with a new bootstrapped m2? [~/work/mng-689/t/spring-support] [EMAIL PROTECTED]> m2 clean:clean compiler:compile [INFO] Using local copy of plugins.xml (plugin mappings) for group: 'org.apache. maven.plugins' from: /home/forge/.m2/repository/org/apache/maven/plugins/plugins .xml [INFO] maven-clean-plugin: using locally installed snapshot [INFO] maven-plugin-parent: using locally installed snapshot [INFO] maven-compiler-plugin: using locally installed snapshot [INFO] ------------------------------------------------------------------------- --- [INFO] Building springframework:spring-support:jar:1.2.2 [INFO] task-segment: [clean:clean, compiler:compile] [INFO] ------------------------------------------------------------------------- --- [INFO] [clean:clean] [INFO] plexus-compiler-api: resolved to version 1.5-20050806.131214-2 from local repository [INFO] plexus-compiler: resolved to version 1.5-20050806.131214-4 from local rep ository [INFO] plexus-components: resolved to version 1.1.1-20050803.041918-2 from local repository [INFO] plexus-compiler-javac: resolved to version 1.5-20050807.112638-3 from loc al repository [INFO] plexus-compilers: resolved to version 1.5-20050806.131214-3 from local re pository [INFO] [compiler:compile] Compiling 96 source files to /mnt/a/home/forge/work/mng-689/t/spring-support/tar get/classes [INFO] ------------------------------------------------------------------------- --- [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------- --- [INFO] Total time: 3 seconds [INFO] Finished at: Mon Aug 08 09:49:55 CEST 2005 [INFO] Final Memory: 2M/18M [INFO] ------------------------------------------------------------------------- --- > build fails on compiler warning > ------------------------------- > > Key: MNG-689 > URL: http://jira.codehaus.org/browse/MNG-689 > Project: Maven 2 > Type: Bug > Components: maven-plugins > Versions: 2.0-beta-1, 2.0-alpha-3 > Environment: Linux u-235 2.6.10-gentoo-r4 #1 SMP Mon Jan 10 14:53:56 EST > 2005 i686 AMD Athlon(tm) MP 2400+ AuthenticAMD GNU/Linux > java version "1.4.2_08" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_08-b03) > Java HotSpot(TM) Client VM (build 1.4.2_08-b03, mixed mode) > Reporter: Andrew Moore > Assignee: Kenney Westerhof > Fix For: 2.0-beta-1 > Attachments: spring-support.zip > > > I'm attempting to compile a class that contains the now reserved word > 'assert' as a identifier. > This compiles fine, with the requisite warnings, outside of m2. > Under m2, the compiler:compile goal produces the warnings and actually > compiles the class BUT the build fails [Listing 1]. > I would expect the build to pass in this case. > Previously on this list I have seen it suggested that setting the source > compatibility to 1.4 may fix this. In my case, setting this [Listing 2] > results in no warning, no class file and a failed build [Listing 3]. > Any suggestions on how I can get around this? > Even if I do away with the assert, will m2 fail the build on any > compiler warning? > Cheers, > ...andrew > Listing 1 > $ m2 clean:clean compiler:compile > [INFO] Using local copy of plugins.xml (plugin mappings) for group: > 'org.apache.maven.plugins' from: > /home/amm/.m2/repository/org/apache/maven/plugins/plugins.xml > [INFO] maven-clean-plugin: resolved to version 2.0-alpha-3 from local > repository > [INFO] maven-compiler-plugin: resolved to version 2.0-alpha-3 from local > repository > [INFO] > ---------------------------------------------------------------------------- > [INFO] Building distra - numpty > [INFO] task-segment: [clean:clean, compiler:compile] > [INFO] > ---------------------------------------------------------------------------- > [INFO] [clean:clean] > [INFO] Deleting directory > /secure/home/amm/prj/bt3/distra/numpty/numpty/target > [INFO] [compiler:compile] > Compiling 1 source file to > /secure/home/amm/prj/bt3/distra/numpty/numpty/target/classes > [INFO] > ---------------------------------------------------------------------------- > [INFO] BUILD FAILURE > [INFO] > ---------------------------------------------------------------------------- > [INFO] Reason: Compilation failure > [INFO] > ---------------------------------------------------------------------------- > [INFO] no more tokens - could not parse error message: > /secure/home/amm/prj/bt3/distra/numpty/numpty/src/main/java/Numpty.java:4: > warning: as of release 1.4, assert is a keyword, and may not be used as > an identifier > private static String assert = "Hello assert!"; // should trigger > compiler warning > ^ > no more tokens - could not parse error message: > /secure/home/amm/prj/bt3/distra/numpty/numpty/src/main/java/Numpty.java:6: > warning: as of release 1.4, assert is a keyword, and may not be used as > an identifier > System.out.println(assert); // should trigger > compiler warning > ^ > [INFO] > ---------------------------------------------------------------------------- > [INFO] Total time: < 1 second > [INFO] Finished at: Wed Aug 03 13:08:26 EST 2005 > [INFO] Final Memory: 2M/5M > [INFO] > ---------------------------------------------------------------------------- > Listing 2 > <build> > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-compiler-plugin</artifactId> > <version>2.0-alpha-3</version> > <goals> > <goal> > <id>compile</id> > <configuration> > <source>1.4</source> > </configuration> > </goal> > </goals> > </plugin> > </plugins> > </build> > Listing 3 > $ m2 clean:clean compiler:compile > [INFO] Using local copy of plugins.xml (plugin mappings) for group: > 'org.apache.maven.plugins' from: > /home/amm/.m2/repository/org/apache/maven/plugins/plugins.xml > [INFO] maven-clean-plugin: resolved to version 2.0-alpha-3 from local > repository > [INFO] > ---------------------------------------------------------------------------- > [INFO] Building distra - numpty > [INFO] task-segment: [clean:clean, compiler:compile] > [INFO] > ---------------------------------------------------------------------------- > [INFO] [clean:clean] > [INFO] Deleting directory > /secure/home/amm/prj/bt3/distra/numpty/numpty/target > [INFO] [compiler:compile] > Compiling 1 source file to > /secure/home/amm/prj/bt3/distra/numpty/numpty/target/classes > [INFO] > ---------------------------------------------------------------------------- > [INFO] BUILD FAILURE > [INFO] > ---------------------------------------------------------------------------- > [INFO] Reason: Compilation failure > [INFO] > ---------------------------------------------------------------------------- > [INFO] Failure executing javac, but could not parse the error: > [INFO] > ---------------------------------------------------------------------------- > [INFO] Total time: < 1 second > [INFO] Finished at: Wed Aug 03 13:09:50 EST 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]
