1 Reply Latest reply on Jan 23, 2008 5:13 PM by Scott Stark

    .class files in project resources

    Scott Stark Master

      For the class loader tests I would like to include class files in the exploded archives, but when I do they are not copied over to the target/test-classes directory. I see there is an exclusion pattern of **/*.java, but don't know why that would prevent .class files from being copied. Removing it does not change anything. Anyone know how to allow .class files in the resources tree?

        • 1. Re: .class files in project resources
          Scott Stark Master

          I guess this is just the behavior of source directories in a java project. To get something close to what I was looking for, I had to add source directories for each classpath location in the ear and exclude these from the src/resources/tests dir:

           <classpathentry kind="src" output="target/deploy/testear1.ear/war1.war/WEB-INF/classes" path="src/resources/tests/deploy/testear1.ear/war1.war/WEB-INF/classes"/>
           <classpathentry kind="src" output="target/deploy/testear1.ear/lib/jar1.jar" path="src/resources/tests/deploy/testear1.ear/lib/jar1.jar"/>
           <classpathentry kind="src" output="target/deploy/testear1.ear/ejb1.jar" path="src/resources/tests/deploy/testear1.ear/ejb1.jar"/>
           <classpathentry excluding="deploy/**" kind="src" output="target/tests-classes" path="src/resources/tests"/>
          


          This isn't perfect because non-classpath items like META-INF contents are not copied. Maybe we need to leave this as content in the src/tests/resources, and have an ant builder generate the unpacked/packed artifacts in a classpath dir.