Maven Compiler Plugin
  1. Maven Compiler Plugin
  2. MCOMPILER-100

Can compile a very simple java program in Chinese platform when turn "<showDeprecation>true</showDeprecation>" on

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0, 2.0.1, 2.0.2
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Chinese Windows XP + sun JDK 1.5 + maven 2.10
    • Number of attachments :
      2

      Description

      Use the attached project, note there is a Deprecated class DefaultTextUI . I put that in code on purpose because only when there's Deprecated class in use.

      And I turn on "<showDeprecation>true</showDeprecation>" in compiler plugin. The compile fails. This is not another platform problem because as you can see. There's no non-ASCII characters in the code. And I can use javac to compile it without any problem.

      It's a defect of compiler plugin when outputing the globalization Deprecation warning message.

      D:\testCompile>g10 compile -X
      + Error stacktraces are turned on.
      Apache Maven 2.1.0 (r755702; 2009-03-19 03:10:27+0800)
      Java version: 1.5.0_15
      Java home: D:\dev\JDKs\sun_jdk5\jre
      Default locale: zh_CN, platform encoding: GBK
      OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"

      ..........................

      [DEBUG] Classpath:
      [DEBUG] D:\testCompile\target\classes
      [DEBUG] Source roots:
      [DEBUG] D:\testCompile\src\main\java
      [INFO] Compiling 1 source file to D:\testCompile\target\classes
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Compilation failure

      D:\testCompile\src\main\java\org\apache\App.java:[3,24] 警告:[deprecation] javax.swing.text 中的 javax.swing.te

      D:\testCompile\src\main\java\org\apache\App.java:[12,1] 警告:[deprecation] javax.swing.text 中的 javax.swing.te

      D:\testCompile\src\main\java\org\apache\App.java:[15,8] 警告:[deprecation] javax.swing.text 中的 javax.swing.te

      D:\testCompile\src\main\java\org\apache\App.java:[15,4] javax.swing.text.DefaultTextUI 是抽象的;无法对其进行实例

      [INFO] ------------------------------------------------------------------------
      [DEBUG] Trace
      org.apache.maven.BuildFailureException: Compilation failure
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:699)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:519)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExec
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:356)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
      at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:516)
      at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678)
      ... 16 more
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 5 seconds
      [INFO] Finished at: Thu Jun 25 14:28:57 CST 2009
      [INFO] Final Memory: 5M/10M
      [INFO] ------------------------------------------------------------------------

        Activity

        Hide
        Shawn Jiang added a comment -

        This is the test project.

        Show
        Shawn Jiang added a comment - This is the test project.
        Hide
        Shawn Jiang added a comment -

        Please use this updated one to recreate the problem. The error will be:

        D:\testCompile>mvn clean compile
        [INFO] Scanning for projects...
        [INFO] ------------------------------------------------------------------------
        [INFO] Building testCompile
        [INFO]    task-segment: [clean, compile]
        [INFO] ------------------------------------------------------------------------
        [INFO] [clean:clean]
        [INFO] Deleting directory D:\testCompile\target
        [INFO] [resources:resources]
        [WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent!
        [INFO] skip non existing resourceDirectory D:\testCompile\src\main\resources
        [INFO] [compiler:compile]
        [INFO] Compiling 1 source file to D:\testCompile\target\classes
        [INFO] ------------------------------------------------------------------------
        [ERROR] BUILD FAILURE
        [INFO] ------------------------------------------------------------------------
        [INFO] Compilation failure
        D:\testCompile\src\main\java\org\apache\App.java:[15,5] &#35686;&#21578;&#65306;[deprecation] java.util.Date &#20013;&#30340; Date(int,int,int) &#24050;&#36807;&#26102;
        
        
        [INFO] ------------------------------------------------------------------------
        [INFO] For more information, run Maven with the -e switch
        [INFO] ------------------------------------------------------------------------
        [INFO] Total time: 3 seconds
        [INFO] Finished at: Thu Jun 25 14:58:04 CST 2009
        [INFO] Final Memory: 7M/15M
        [INFO] ------------------------------------------------------------------------
        
        Show
        Shawn Jiang added a comment - Please use this updated one to recreate the problem. The error will be: D:\testCompile>mvn clean compile [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building testCompile [INFO] task-segment: [clean, compile] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean] [INFO] Deleting directory D:\testCompile\target [INFO] [resources:resources] [WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory D:\testCompile\src\main\resources [INFO] [compiler:compile] [INFO] Compiling 1 source file to D:\testCompile\target\classes [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Compilation failure D:\testCompile\src\main\java\org\apache\App.java:[15,5] &#35686;&#21578;&#65306;[deprecation] java.util.Date &#20013;&#30340; Date(int,int,int) &#24050;&#36807;&#26102; [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3 seconds [INFO] Finished at: Thu Jun 25 14:58:04 CST 2009 [INFO] Final Memory: 7M/15M [INFO] ------------------------------------------------------------------------

          People

          • Assignee:
            Unassigned
            Reporter:
            Shawn Jiang
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: