> Hi,
> I am using maven2 and trying to add a directory to the test classpath.
[quoted text clipped - 28 lines]
>
> What else I can do to add a custom folder to the test classpath?
Resources are copied to the 'classes' or 'test-classes' directory as
appropriate, not used from their original location in the source tree,
for Java projects. If you absolutely need to add another element to
the test classpath, maven-surefire-plugin has an option named
additionalClasspathElements, which takes a list of path elements to
add to the classpath:
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<additionalClasspathElements>
<element>code/testresources</element>
</additionalClasspathElements>
</configuration>
</plugin>
However, before you do this, you should really consider working with,
rather than across, maven's defaults and store your test resources in
src/test/resources, and let maven-resources-plugin copy them to target/
test-classes during the build.
-o