[ 
http://jira.codehaus.org/browse/MCOMPILER-135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=235204#action_235204
 ] 

Per Hedman commented on MCOMPILER-135:
--------------------------------------

Sean Patrick: I understand what you mean, but I was thinking of 
{code}
javac -X
{code}

{code}
-Xlint                     Enable recommended warnings
  
-Xlint:{all,deprecation,unchecked,fallthrough,path,serial,finally,-deprecation,-unchecked,-fallthrough,-path,-serial,-finally}Enable
 or disable specific warnings
  -Xbootclasspath/p:<path>   Prepend to the bootstrap class path
  -Xbootclasspath/a:<path>   Append to the bootstrap class path
  -Xbootclasspath:<path>     Override location of bootstrap class files
  -Djava.ext.dirs=<dirs>     Override location of installed extensions
  -Djava.endorsed.dirs=<dirs>Override location of endorsed standards path
  -Xmaxerrs <number>         Set the maximum number of errors to print
  -Xmaxwarns <number>        Set the maximum number of warnings to print
  -Xstdout <filename>        Redirect standard output
{code}
And then you could get support for more exotic arguments for the compiler, and 
not just the javac compiler arguments. 

> Passing multiple parameters to Java 6 annotation processors with javac does 
> not work
> ------------------------------------------------------------------------------------
>
>                 Key: MCOMPILER-135
>                 URL: http://jira.codehaus.org/browse/MCOMPILER-135
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: Bug
>    Affects Versions: 2.3.1
>         Environment: JDK 1.6, Maven 2.2.1, Maven-Compiler-Plugin 2.3.1, 
> Windows
>            Reporter: Sean Patrick Floyd
>         Attachments: AbstractCompilerMojo.java.2.patch, 
> AbstractCompilerMojo.java.patch
>
>
> I have an annotation processor that supports multiple parameters and I have 
> found that there is no way to set more than one of them at any given time 
> from the Maven Compiler Plugin,
> Here's my setup.
> {code:xml} 
> <plugin>
>     <inherited>true</inherited>
>     <groupId>org.apache.maven.plugins</groupId>
>     <artifactId>maven-compiler-plugin</artifactId>
>     <version>2.3.1</version>
>     <configuration>
>         <source>1.6</source>
>         <target>1.6</target>
>         <compilerArgument>-AaddResDir=src/main/webapp 
> -Averbose=true</compilerArgument>
>     </configuration>
> </plugin>
> {code} 
> Javac needs the parameters added as separate Strings
> {code}[ ... , "-AaddResDir=src/main/webapp", "-Averbose=true"]{code}
> but the Compiler Plugin generates this code:
> {code}[ ... , "-AaddResDir=src/main/webapp -Averbose=true"]{code}
> which Javac will parse as
> {code}key:"addResDir" value="src/main/webapp -Averbose=true"{code}
> The map version "<compilerArguments>" is of no help either, because this
> {code}<Averbose>true</Averbose>
> <AaddResDir>src/main/webapp</AResDir>{code}
> will generate the output
> {code}[... , "-Averbose", "true", "-AaddResDir", "src/main/webapp"]{code}
> while this
> {code}<Averbose=true />
> <AaddResDir=src/main/webapp />{code}
> is not well-formed XML.
> Stepping through the compiler argument generation with the debugger I have 
> not found a way to post-process the arguments, so please add a way to support 
> multiple APT parameters because this is a major show-stopper.

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

        

Reply via email to