我有一个从
AbstractProcessor
.
addResDir
和
verbose
,我试着这样设置它们:
-AaddResDir=src/main/webapp -Averbose=true
-AaddResDir=src/main/webapp,verbose=true
当单个参数起作用时,例如。
-AaddResDir=src/main/webapp
我无法让多个参数工作,也找不到任何相关文档。我需要在APT中手动解析参数吗?
我唯一拥有的就是
javac -help
-Akey[=value] Options to pass to annotation processors
毕竟,这是一个专业的问题。这是我的maven配置:
<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>
<optimize>true</optimize>
<debug>true</debug>
<compilerArgument>-AaddResDir=src/main/webapp -Averbose=true</compilerArgument>
</configuration>
</plugin>
<compilerAguments>
也无济于事,因为
<Averbose>true</Averbose>
<AaddResDir>src/main/webapp</AResDir>
[... , -Averbose, true, -AaddResDir, src/main/webapp]
而javac需要语法
[... , -Averbose=true, -AaddResDir=src/main/webapp ]
和
<Averbose=true />
<AaddResDir=src/main/webapp />
是无效的XML。
(见
Mapping Maps
Guide to Configuring Maven Plugins
恐怕没有办法改变这个,啊。
我现在有了
filed a bug report
.