我正在使用注释处理来生成一些类...我有两个模块,处理器本身和使用它的“客户端”模块。我想通过客户端将参数传递给处理器,这是我喜欢的
<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>
Run Code Online (Sandbox Code Playgroud)
以及如何在处理器端检索这个参数?