Issue Details (XML | Word | Printable)

Key: MPTEST-38
Type: Improvement Improvement
Status: Closed Closed
Resolution: Won't Fix
Priority: Critical Critical
Assignee: Lukas Theussl
Reporter: Jerome Lacoste
Votes: 0
Watchers: 0
Operations

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

variable name typo breaks test plugin

Created: 15/Jul/04 07:30 PM   Updated: 22/Mar/06 05:31 PM
Component/s: None
Affects Version/s: None
Fix Version/s: 1.8

Time Tracking:
Original Estimate: 1 minute
Original Estimate - 1 minute
Remaining Estimate: 1 minute
Remaining Estimate - 1 minute
Time Spent: Not Specified
Remaining Estimate - 1 minute


 Description  « Hide
<j:set var="maven.test.searchdir" value="${maven.test.dest}"/>
<j:if test="${context.getVariable('maven.test.search.classdir') == null}">
^^^^^
<j:set var="maven.test.searchdir" value="${pom.build.unitTestSourceDirectory}"/>
</j:if>

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Jerome Lacoste added a comment - 15/Jul/04 07:39 PM
I may have incorrectly identified my problem badly.

My problem is that I want to only run tests which have been compiled. But the sourceModifications was not taken into account. the test plugin only compiles classes which are not excluded in the sourceModifications excludes. But after that it tries to run tests based on the test source directory.

So it tried to run classes that have not been compiled.

I thought that the reason for the problem was coming from this strange property which is not referenced anywhere else.

But I may be wrong.


dion gillard added a comment - 18/Jul/04 10:38 PM
AFAIK, this isn't a typo.

From the docs:
Use this property to specify that JUnit should search the test classes directory rather than the source directory. This allows for test cases to be written in other languages such as Groovy which generate bytecode that can then be used by this plugin. Sample :

maven.test.search.classdir=true

I agree the code doesn't make much sense though, why is the searchdir being set to ${maven.test.dest} and then in almost all cases, being overwritten to ${pom.build.unitTestSourceDirectory}


Jerome Lacoste added a comment - 19/Jul/04 08:25 AM
All in all, I still don't understand why the run tests are found in the tests sources. Why don't one use the compiled classes as input?
What are the drawbacks of doing so?

Whatever the answer to that question, with the current implementation, I think that the doc should be improved to say at least in the sourceModifications doc to look at this maven.test.search.classdir property.

Or maybe this should be added as a FAQ in the wiki. The problem is that if you use sourceModifications, then you may end up with some classes not being compiled, and running the tests based on the test source directory becomes a bad idea.

And the documentation of the maven.test.search.classdir property should perhaps also mention the sourceModifications change that could result in the need for using that property. (which is to me a more frequent reason that using Groovy)


Lukas Theussl added a comment - 22/Mar/06 05:31 PM
Clarified docs.