我正在使用apt-maven-plugin在发动战争之前处理一些Beehive Netui注释。
apt处理的输出是_pageflow目录,其中包含struts配置文件(xml文本)等。问题是它在我运行maven的任何目录中输出,而不是在我想要的$ {project.build.directory} / classes目录中输出。我尝试设置outputDirectory
和resourceTargetPath
属性,但都没有改变这种行为。
是否还有其他参数要设置我缺少?
这是我当前的插件配置。
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>apt-maven-plugin</artifactId>
<version>1.0-alpha-3</version>
<inherited>false</inherited>
<configuration>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
<options>
<option>web.content.root=${project.build.directory}/classes</option>
</options>
</configuration>
<executions>
<execution>
<goals>
<goal>process</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>weblogic</groupId>
<artifactId>beehive-netui-compiler</artifactId>
<version>${weblogic-version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
答案 0 :(得分:2)
您的问题看起来真的像MOJO-1478(您使用的是Mac)吗?也许看看补丁(并重新打开问题或创建一个新的补丁)。
PS:你不需要配置工厂吗?我不知道如何使用beehive-netui-compiler依赖项。那个工厂是否因为你指定它而神奇地从那个依赖中被选中了?
答案 1 :(得分:0)
我和apt-maven-plugin有同样的问题 在我的maven项目中忽略 outputDirectory 默认值(插件文档)($ {project.build.directory} / classes)也被忽略。 source是在我的项目的根目录中生成的,而不是请求的outputDirectory ...
为你的PS:
如果插件配置中未指定factory,则使用标准sun功能,在src / main / resources文件夹中创建以下文本文件:
META-INF /服务/ com.sun.mirror.apt.AnnotationProcessorFactory
此文件必须包含工厂的完整类名,apt命令使用它
问候