You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Carlos Sanchez (JIRA)" <ji...@codehaus.org> on 2005/08/10 20:45:57 UTC
[jira] Closed: (MNG-689) build fails on compiler warning
[ http://jira.codehaus.org/browse/MNG-689?page=all ]
Carlos Sanchez closed MNG-689:
------------------------------
Resolution: Fixed
After bootstrapping it worked. Seems that I hadn't installed the plugin correctly
> 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org