History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: MPANT-14
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Arnaud Heritier
Reporter: Matthias Kerkhoff
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Maven 1.x Ant Plugin

unitTest resources copied to wrong location

Created: 29/Apr/04 01:03 AM   Updated: 09/May/04 06:49 PM
Component/s: None
Affects Version/s: 1.6, 1.7
Fix Version/s: 1.7

Time Tracking:
Not Specified


 Description  « Hide
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...



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Arnaud Heritier - 03/May/04 08:19 PM
build template is modified to use the targetPath if defined.

Arnaud Heritier - 04/May/04 06:56 AM
need to add a test case

Arnaud Heritier - 09/May/04 06:49 PM
test case added