2
我使用注释处理来生成一些类......我有两个模块,处理器本身和使用它的“客户端”模块。我想通过客户端向处理器传递参数,我可以这样做将参数传递给注释处理器
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
<generatedSourcesDirectory>${project.build.directory}/generated-sources/</generatedSourcesDirectory>
<annotationProcessors>
<annotationProcessor>org.rapster.xxx.xxx.xxComponentProcessor</annotationProcessor>
</annotationProcessors>
<compilerArgs>
<arg>-Awidget=something</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
</build>
以及如何在处理器端检索此参数?