ZeroTurnaround Support Forum » JRebel Support

exclude not working, mvn defaults

(2 posts)
  • Started 7 months ago by cheradenine
  • Latest reply from lauri
  • 1 Members Subscribed To Topic

  1. Using the javarebel-maven-plugin results in output like:

    <classpath fallback="default">
    		<dir name=".. source ... l/src/main/resources">
    		</dir>
    		<dir name="...target ... /classes">
    		</dir>
    </classpath>

    In my case, I don't want the resources to appear *at all*; I have hibernate mapping files that appear twice otherwise, which is bad.

    The best I could do is to exclude them in the target/classes with

    <dir name="...target ... /classes">
         <exclude name="**/*.xml"/>
    </dir>

    However, in the code, this doesn't seem to work. There is a part which does something like (with spring)

    applicationContext.getResources("classpath*:/res/hbm/**/*.hbm.xml");

    And it's still finding resources that ought to have been excluded (I.E it finds them twice - once in src/main/resources, once in target/classes - which should have been excluded).

    Is there a way to get the exclude to work, or to disable the resources directory entirely in the maven plugin (save for manually generating rebel.xml) ?

    Posted 7 months ago #
  2. lauri

    Member
    Posts: 482

    Currently there is no good way to disabel adding resource folders to rebel.xml. You may be able to get around it by enabling filtering for src/main/resources (jrebel maven plugin generates a bit different xml for filtered resources). Or you may disable the plugin for this one module by adding
    <plugin>
    <groupId>org.zeroturnaround</groupId>
    <artifactId>javarebel-maven-plugin</artifactId>
    <executions>
    <execution>
    <id>generate-rebel-xml</id>
    <phase>none</phase>
    </execution>
    </executions>
    </plugin>

    Posted 7 months ago #

RSS feed for this topic

Reply

(required)

(required)

(optional)

(required)

Allowed markup: a blockquote code em strong ul ol li.
Put code in between `backticks`.

Olark Livehelp