You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by andrew <li...@pyroboy.com.au> on 2005/08/03 05:14:32 UTC
[m2] build fails on compiler warning
Maven version: 2.0-beta-1-SNAPSHOT, and
Maven version: 2.0-alpha-3
Hi,
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]
----------------------------------------------------------------------------
--
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: scm:update error
Posted by Jamie Bisotti <jb...@gmail.com>.
On 8/2/05, Mariano Stampella <ms...@gmail.com> wrote:
>
> Hi, I'm Mariano with the same old problem, I use the scm-plugin and when try
> to use the update goal occurs this
>
> [WARNING] Unknown status: '? '.
> [WARNING] Unknown status: 'M '.
>
> That's because when i execute the update goal really executed this:
>
> cvs -f -q update -d
>
> And the result is:
>
> ? .xdoclet
> ? bin
> ? example
> ? iaso.ear
> ? manga.jpg
> ? xdoclet-build.xml
> ? j2ee/jars/javax.servlet.jar
> M .classpath
> M maven.xml
> M project.properties
>
>
> For this reason the update process is truncated.
>
> Somebody can a solution for that?
>
> Thanks
>
> Mariano
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Are you using the latest SCM plugin?
--
Jamie Bisotti
Software Engineer
Lexmark International, Inc.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
scm:update error
Posted by Mariano Stampella <ms...@gmail.com>.
Hi, I'm Mariano with the same old problem, I use the scm-plugin and when try
to use the update goal occurs this
[WARNING] Unknown status: '? '.
[WARNING] Unknown status: 'M '.
That's because when i execute the update goal really executed this:
cvs -f -q update -d
And the result is:
? .xdoclet
? bin
? example
? iaso.ear
? manga.jpg
? xdoclet-build.xml
? j2ee/jars/javax.servlet.jar
M .classpath
M maven.xml
M project.properties
For this reason the update process is truncated.
Somebody can a solution for that?
Thanks
Mariano
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] build fails on compiler warning
Posted by Brett Porter <br...@gmail.com>.
This is a bug, that it cannot parse the warning as a warning. Please
file it and we'll get it fixed before the next release.
Thanks,
Brett
On 8/3/05, andrew <li...@pyroboy.com.au> wrote:
> Maven version: 2.0-beta-1-SNAPSHOT, and
> Maven version: 2.0-alpha-3
>
> Hi,
>
> 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]
> ----------------------------------------------------------------------------
>
> --
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org