Search code examples
buildantjbossclasspath

How to include JBOSS modules in compile path


After applying patches to JBOSS 6.4 to bring it to 6.4.14, my build breaks. I am using the various modules in the build path using **/*.jar. (See below for code)

RedHat disables old versions of jars when applying patches red hat doc

This is by design.

When applying a patch to EAP 6.2.0 to build EAP 6.2.x , the Patch tool does not replace the existing files. It will place new files under the folder $JBOSS_HOME/modules/system/layers/base/.overlays/_ and cripple the original files by flipping a bit in the end of central directory record to prevent them from being used.

How can I include all the jars in the modules directory except for the disabled ones?

Relevant portion of my build.xml file.

<property name="jbossmodules" value="${env.JBOSS_HOME}/modules" /> 
<path id="class.path">
    <pathelement path="${class.lib}" />
    <pathelement path="${java.class.path}" />
    [...]
    <fileset dir="${jbossmodules}">
        <include name="**/*.jar" />
    </fileset>

Solution

  • I worked with Redhat support. If one has the appropriate user type, one can download a directory of jars to compile against. In short Redhat seems to discourage compiling against a live patched version of JBOSS. But neither do they make it easy to get a set of jars one can compile against.