It is possible to specify a directory
into which maven copies the specified
test resources. According to the schema
and the current implementation, it is
absolutly legal to have constructs like
the following in the project.xml:
<!-- Unit test classes -->
<unitTest>
<includes>
<include>**/*Test.java</include>
</includes>
<!-- unit test resources -->
<resources>
<resource>
<directory>TESTDATA-1</directory>
<targetPath>DIRECTORY-1</targetPath>
<includes>
<include>**</include>
</includes>
</resource>
<resource>
<directory>TESTDATA-2</directory>
<targetPath>DIRECTORY-2</targetPath>
<includes>
<include>**</include>
</includes>
</resource>
</resources>
</unitTest>
Such a block will map TESTDATA-1/** to target/test-classes/DIRECTORY-1
and TESTDATA-2/** to target/test-classes/DIRECTORY-2.
The plugin does assume that all test resources should be copied to
target/test-classes (or whatever directory ${testclasses} points to).
Such an assumption is incorrect.
The problem applies to a number of generated ant targets, for
example to compile, to compile-tests, to internal-test...