【问题标题】:Generate rebel.xml in the root of jar module with jrebel-maven-plugin使用 jrebel-maven-plugin 在 jar 模块的根目录下生成 rebel.xml
【发布时间】: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 文件在你的 moduletarget/classes 中,那么它最终会在对应 JAR. 的根目录
  • 是的,你是对的@Tome。我的错,我尝试了很多事情,以至于我感到困惑。这工作正常。谢谢。

标签: java xml maven maven-plugin jrebel


【解决方案1】:

rebel.xml 将在构建时从目标/类复制到 .jar 文件根目录。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-12-25
    • 1970-01-01
    • 1970-01-01
    • 2021-08-02
    • 2012-07-11
    • 2011-02-22
    相关资源
    最近更新 更多