maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Scholte (JIRA)" <j...@codehaus.org>
Subject [jira] (MCOMPILER-129) unable to pass in javac -J option
Date Thu, 02 Jan 2014 21:17:45 GMT

     [ https://jira.codehaus.org/browse/MCOMPILER-129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Robert Scholte closed MCOMPILER-129.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.4

Already fixed in 2.4, added an IT in [r1554921|http://svn.apache.org/r1554921]
                
> unable to pass in javac -J option
> ---------------------------------
>
>                 Key: MCOMPILER-129
>                 URL: https://jira.codehaus.org/browse/MCOMPILER-129
>             Project: Maven Compiler Plugin
>          Issue Type: Bug
>    Affects Versions: 2.3.1
>         Environment: jdk 1.6
> maven 3.0-beta-1
>            Reporter: Juven Xu
>            Assignee: Robert Scholte
>             Fix For: 2.4
>
>
> because of MCOMPILER-109, l10n-ed javac warning messages will be regarded as error, so
I want to pass user language configuration to javac, like this:
> {{javac ... -J-Duser.language=en_us}}
> this works well on pure javac command line, but when I configure this for maven-compiler-plugin:
> {code:xml}
> <plugin>
>   <artifactId>maven-compiler-plugin</artifactId>
>   <version>2.3.1</version>
>   <configuration>
>     <fork>true</fork>
>     <source>1.5</source>
>     <target>1.5</target>
>     <compilerArgument>-J-Duser.language=en_us</compilerArgument>
>   </configuration>
> </plugin>
> {code}
> I got&#65306;
> {noformat}
> [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-compiler-plugin:2.3.1:compile'
with basic configurator -->
> [DEBUG]   (f) basedir = D:\workspace\test
> [DEBUG]   (f) buildDirectory = D:\workspace\test\target
> [DEBUG]   (f) classpathElements = [D:\workspace\test\target\classes]
> [DEBUG]   (f) compileSourceRoots = [D:\workspace\test\src\main\java]
> [DEBUG]   (f) compilerArgument = -J-Duser.language=en_us
> [DEBUG]   (f) compilerId = javac
> [DEBUG]   (f) debug = true
> [DEBUG]   (f) failOnError = true
> [DEBUG]   (f) fork = true
> [DEBUG]   (f) generatedSourcesDirectory = D:\workspace\test\target\generated-sources\annotations
> [DEBUG]   (f) optimize = false
> [DEBUG]   (f) outputDirectory = D:\workspace\test\target\classes
> [DEBUG]   (f) outputFileName = test-0.0.1-SNAPSHOT
> [DEBUG]   (f) projectArtifact = com.juvenxu:test:jar:0.0.1-SNAPSHOT
> [DEBUG]   (f) session = org.apache.maven.execution.MavenSession@11d2572
> [DEBUG]   (f) showDeprecation = false
> [DEBUG]   (f) showWarnings = false
> [DEBUG]   (f) source = 1.5
> [DEBUG]   (f) staleMillis = 0
> [DEBUG]   (f) target = 1.5
> [DEBUG]   (f) verbose = false
> [DEBUG] -- end configuration --
> [DEBUG] Using compiler 'javac'.
> [DEBUG] Source directories: [D:\workspace\test\src\main\java]
> [DEBUG] Classpath: [D:\workspace\test\target\classes]
> [DEBUG] Output directory: D:\workspace\test\target\classes
> [DEBUG] Classpath:
> [DEBUG]  D:\workspace\test\target\classes
> [DEBUG] Source roots:
> [DEBUG]  D:\workspace\test\src\main\java
> [DEBUG] Command line options:
> [DEBUG] -d D:\workspace\test\target\classes -classpath D:\workspace\test\target\classes;
-sourcepath D:\workspace\test\src\main\java; D:\workspace\test\src\main\java\com\juvenxu\test\Test.java
-g -nowarn -target 1.5 -source 1.5 -J-Duser.language=en_us
> [WARNING] File encoding has not been set, using platform encoding GBK, i.e. build is
platform dependent!
> [INFO] Compiling 1 source file to D:\workspace\test\target\classes
> [INFO] -------------------------------------------------------------
> [ERROR] COMPILATION ERROR : 
> [INFO] -------------------------------------------------------------
> [ERROR] Failure executing javac,  but could not parse the error:
> javac: &#26080;&#25928;&#30340;&#26631;&#24535;&#65306; -J-Duser.language=en_us
> &#29992;&#27861;: javac <options> <source files>
> -help &#29992;&#20110;&#21015;&#20986;&#21487;&#33021;&#30340;&#36873;&#39033;
> [INFO] 1error
> [INFO] -------------------------------------------------------------
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 1.451s
> [INFO] Finished at: Wed May 26 17:29:06 CST 2010
> [INFO] Final Memory: 2M/5M
> [INFO] ------------------------------------------------------------------------
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.1:compile
(default-compile) on project test: Compilation failure
> Failure executing javac,  but could not parse the error:
> javac: &#26080;&#25928;&#30340;&#26631;&#24535;&#65306; -J-Duser.language=en_us
> &#29992;&#27861;: javac <options> <source files>
> -help &#29992;&#20110;&#21015;&#20986;&#21487;&#33021;&#30340;&#36873;&#39033;
> -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.1:compile
(default-compile) on project test: Compilation failure
> Failure executing javac,  but could not parse the error:
> javac: &#26080;&#25928;&#30340;&#26631;&#24535;&#65306; -J-Duser.language=en_us
> &#29992;&#27861;: javac <options> <source files>
> -help &#29992;&#20110;&#21015;&#20986;&#21487;&#33021;&#30340;&#36873;&#39033;
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:581)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:324)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:247)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:104)
> 	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:427)
> 	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:157)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:121)
> 	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:597)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
> Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
> Failure executing javac,  but could not parse the error:
> javac: &#26080;&#25928;&#30340;&#26631;&#24535;&#65306; -J-Duser.language=en_us
> &#29992;&#27861;: javac <options> <source files>
> -help &#29992;&#20110;&#21015;&#20986;&#21487;&#33021;&#30340;&#36873;&#39033;
> 	at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:656)
> 	at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
> 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:105)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:577)
> 	... 14 more
> [ERROR] 
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message