Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.3.1
-
None
-
JDK 1.6, Maven 2.2.1, Maven-Compiler-Plugin 2.3.1, Windows
Description
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.
<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>
Javac needs the parameters added as separate Strings
[ ... , "-AaddResDir=src/main/webapp", "-Averbose=true"]
but the Compiler Plugin generates this code:
[ ... , "-AaddResDir=src/main/webapp -Averbose=true"]
which Javac will parse as
key:"addResDir" value="src/main/webapp -Averbose=true"
The map version "<compilerArguments>" is of no help either, because this
<Averbose>true</Averbose>
<AaddResDir>src/main/webapp</AResDir>
will generate the output
[... , "-Averbose", "true", "-AaddResDir", "src/main/webapp"]
while this
<Averbose=true />
<AaddResDir=src/main/webapp />
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.
Attachments
Attachments
Issue Links
- relates to
-
MCOMPILER-62 Allow multiple options to be passed to compiler for options not supported by the compiler mojo
- Closed