我有一个 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 模块
,在根目录中有 rebel.xml,而不是在 ../target/classes/
中。
有什么方法可以使用 jrebel-maven-plugin 在根目录下自动生成 jar 模块的 rebel.xml 文件吗?
提前致谢。
最佳答案
rebel.xml 将在构建时从 target/classes 复制到 .jar 文件根目录。
关于java - 用jrebel-maven-plugin在jar模块根目录生成rebel.xml,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29257765/