Issue Details (XML | Word | Printable)

Key: MPTEST-49
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Lukas Theussl
Reporter: Nick Matthews
Votes: 0
Watchers: 2
Operations

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

test:test does not allow multiple source directories

Created: 07/Apr/05 06:53 PM   Updated: 14/Apr/06 04:21 PM
Component/s: None
Affects Version/s: None
Fix Version/s: 1.8

Time Tracking:
Not Specified


 Description  « Hide
Our project is set up as follows:
src/main/java
src/main/resources
src/tests/java
src/tests/resources

Some of the files in src/tests/resources are xml files which are used to generate JUnit source files. These are generated into

target/testutil

This value is set in our properties file as
maven.clienttester.src.dir = ${maven.build.dir}/testutil

<ant:path id="testutil.src.dir" location="${maven.clienttester.src.dir}"/>
<maven:addPath id="maven.test.compile.src.set" id="testutil.src.dir"/>

Now, calling the test:compile goal will compile the source files from target/testutil into target/test-classes

This is good.
However, test:test doesn't attempt to run any of these test files. test:test only runs the files located in src/tests/java, as defined in my project.xml file.

This is not so good. Since I have source files for everything, I would prefer not to use maven.test.search.classdir property. test:test should honour the maven.test.compile.src.set variable, the same as test:compile.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Arnaud Heritier added a comment - 05/Apr/06 04:53 PM
The proposed fix creates this error on windows :

File...... file:/d:/Data/maven-1/cache/maven-test-plugin-1.8-SNAPSHOT/plugin.jelly
Element... junit
Line...... 151
Column.... -1
D:\OSS\Maven\1.X\SCM\plugins\trunk\artifact\D not found.

This is because the path separator is hardcoded with a character ':' which is used in the drive letter.


Arnaud Heritier added a comment - 05/Apr/06 04:55 PM
Lukas, can you test it on linux and close this issue if it works.
thx.

Lukas Theussl added a comment - 05/Apr/06 05:06 PM
Works. Thanks!

Jeff Jensen added a comment - 14/Apr/06 03:57 PM
Fantastic find and fix.

Is this published in a snapshot? The latest 1.8-SNAPSHOT I find is on http://cvs.apache.org/repository/maven/plugins and has a date of: 26-Mar-2006 11:42, which appears after the fix date.

Using that published snapshot, I still have this problem.

Am I missing a repo where the current snapshot is published? (I thought the core plugins were auto-snapshot-ted?) I greatly prefer using the published snapshots over build-my-own for the impact on the team...


Lukas Theussl added a comment - 14/Apr/06 04:10 PM
Does that mean that it works if you use a self-built version from SVN but not with the published snapshot? The above snapshot should indeed include this fix, if not, I have just republished it, can you try again?

Jeff Jensen added a comment - 14/Apr/06 04:21 PM
Yes! That snapshot now works! Thank you very much for republishing so immediately.