【发布时间】:2015-05-29 05:56:49
【问题描述】:
我有一个 maven 多模块项目,我想使用 jrebel,这是我的 pom.xml 的一部分
<build>
...
<plugins>
...
<plugin>
<groupId>org.zeroturnaround</groupId>
<artifactId>jrebel-maven-plugin</artifactId>
<version>1.1.5</version>
<configuration>
<relativePath>../../</relativePath>
<rootPath>/Path/to/my/clear/case/view</rootPath>
<addResourcesDirToRebelXml>true</addResourcesDirToRebelXml>
<alwaysGenerate>true</alwaysGenerate>
</configuration>
<executions>
<execution>
<id>generate-rebel-xml</id>
<phase>process-resources</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
有了这个,如果我输入mvn jrebel:generate,插件会在../target/classes/ 中创建所有rebel.xml 文件,但正如Jrebel 页面中所解释的那样,我需要让我的jar modules 拥有rebel .xml 在根目录中,而不是在 ../target/classes/ 中。
有没有办法使用jrebel-maven-plugin在根目录下自动生成jar模块的rebel.xml文件?
提前致谢。
【问题讨论】:
-
如果 rebel.xml 文件在你的 module 的 target/classes 中,那么它最终会在对应 JAR. 的根目录
-
是的,你是对的@Tome。我的错,我尝试了很多事情,以至于我感到困惑。这工作正常。谢谢。
标签: java xml maven maven-plugin jrebel