Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.3.1
-
None
Description
When running tests, test classes and test resources should come before compile classes and compiles resources in the java classpath, so that classes and resources for test can override classes and resources for 'real' use. This behaviour would be consistent with Maven.
Example:
myproject/
— src/
------ main/
--------- java/
--------- resources/
------------ myProperties.properties # This one is for the real world
------ test/
--------- java/
--------- resources/
------------ myProperties.properties # This one is for testing and should override the other one
Buildr 1.3.1.1 uses the following classpath to run tests.
...dependencies...:myproject/target/classes:myproject/target/resources:myproject/target/test/classes:myproject/target/test/resources:...jars for testing...
'myproject/target/test/classes' and 'myproject/target/test/resources' should come before 'myproject/target/classes' and 'myproject/target/resources'.
This issue can be solved by adding 'test.with test.resources.target' in the project definition. Yet, I think it should be the default behaviour.
Regards.