You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Andrew Moore (JIRA)" <ji...@codehaus.org> on 2005/08/03 05:33:57 UTC

[jira] Created: (MNG-689) build fails on compiler warning

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


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


Re: [jira] Commented: (MNG-689) build fails on compiler warning

Posted by Kenney Westerhof <fo...@neonics.com>.
On Tue, 2 Aug 2005, Brett Porter (JIRA) wrote:

Yes, compiler message parsing is fixed. However, I don't know if those
warning messages get treated as warnings, not as errors. I'll look into
it.

>     [ http://jira.codehaus.org/browse/MNG-689?page=comments#action_43809 ]
>
> Brett Porter commented on MNG-689:
> ----------------------------------
>
> actually it appears no compiler output is correctly parsing under the beta - maybe recent changes to plexus-compiler
>
> > 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
> >      Fix For: 2.0-beta-1
>
> >
> >
> > 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
>

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

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


[jira] Commented: (MNG-689) build fails on compiler warning

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-689?page=comments#action_43809 ] 

Brett Porter commented on MNG-689:
----------------------------------

actually it appears no compiler output is correctly parsing under the beta - maybe recent changes to plexus-compiler

> 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
>      Fix For: 2.0-beta-1

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


[jira] Commented: (MNG-689) build fails on compiler warning

Posted by "Kenney Westerhof (JIRA)" <ji...@codehaus.org>.
    [ 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]                                               
[forge@fire]> 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MNG-689) build fails on compiler warning

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-689?page=all ]

Brett Porter updated MNG-689:
-----------------------------

    Fix Version: 2.0-beta-1

> 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
>      Fix For: 2.0-beta-1

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


[jira] Updated: (MNG-689) build fails on compiler warning

Posted by "Trygve Laugstol (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-689?page=all ]

Trygve Laugstol updated MNG-689:
--------------------------------

    Complexity: Novice

> 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


[jira] Commented: (MNG-689) build fails on compiler warning

Posted by "Carlos Sanchez (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-689?page=comments#action_44035 ] 

Carlos Sanchez commented on MNG-689:
------------------------------------

BTW I'm using Java 5

> 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


[jira] Closed: (MNG-689) build fails on compiler warning

Posted by "Carlos Sanchez (JIRA)" <ji...@codehaus.org>.
     [ 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


[jira] Resolved: (MNG-689) build fails on compiler warning

Posted by "Kenney Westerhof (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-689?page=all ]
     
Kenney Westerhof resolved MNG-689:
----------------------------------

    Resolution: Fixed

Just fixed the warning message handling in plexus,
and bumped the version of plexus-compiler-api and -javac to 1.5-SNAPSHOT used in maven-compiler-plugin.
As a side effect, the 'no more tokens - cannot parse ...' issue is resolved too.

> 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

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


[jira] Reopened: (MNG-689) build fails on compiler warning

Posted by "Carlos Sanchez (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-689?page=all ]
     
Carlos Sanchez reopened MNG-689:
--------------------------------


It still doesn't work for me

Compiling 97 source files to C:\apps\spring-framework-1.2.3\m2\spring-support\target\classes
[INFO] ----------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ----------------------------------------------------------------------------
[INFO] Reason: Compilation failure
[INFO] ----------------------------------------------------------------------------
[INFO] no more tokens - could not parse error message: C:\apps\spring-framework-1.2.3\m2\spring-support\src\main\java\org\springframework\jmx\support\WebLogicMBeanServerFactoryBean.java:109: warning: non-varargs call of varargs method with inexact argument type for last parameter;
cast to java.lang.Class for a varargs call
cast to java.lang.Class[] for a non-varargs call and to suppress this warning
                                        mbeanHome.getClass().getMethod(GET_MBEAN_SERVER_METHOD, null).invoke(mbeanHome, null);
                                                                                                ^

no more tokens - could not parse error message: C:\apps\spring-framework-1.2.3\m2\spring-support\src\main\java\org\springframework\jmx\support\WebLogicMBeanServerFactoryBean.java:109: warning: non-varargs call of varargs method with inexact argument type for last parameter;
cast to java.lang.Object for a varargs call
cast to java.lang.Object[] for a non-varargs call and to suppress this warning
                                        mbeanHome.getClass().getMethod(GET_MBEAN_SERVER_METHOD, null).invoke(mbeanHome, null);
                                                                                                                        ^


I have installed the latest plugin (m2 install under components\maven-plugins\maven-compiler-plugin) and I'm using latest m2 from SVN. Do I need to do any other step?


> 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

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


[jira] Updated: (MNG-689) build fails on compiler warning

Posted by "Carlos Sanchez (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-689?page=all ]

Carlos Sanchez updated MNG-689:
-------------------------------

    Attachment: spring-support.zip

Test case.

> 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