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

Key: MNG-2365
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: kai lilleby
Votes: 12
Watchers: 8
Operations

If you were logged in you would be able to see more operations.
Maven 2

classes before test-classes in MavenProject.getTestClasspathElements() - should be the other way around?

Created: 14/Jun/06 10:00 AM   Updated: 16/Nov/07 03:36 AM
Component/s: Reactor and workspace
Affects Version/s: 2.0.4
Fix Version/s: 2.0.x

Time Tracking:
Not Specified

File Attachments: 1. Text File MNG-3118-test.patch (1 kb)

Environment: doesnt matter
Issue Links:
Duplicate
 

Complexity: Intermediate


 Description  « Hide
in getTestClasspathElements() we have:

List list = new ArrayList( getArtifacts().size() + 1 );
list.add( getBuild().getOutputDirectory() );
list.add( getBuild().getTestOutputDirectory() );

  • causing classes to be prior to test-classes in the classpath- something then prohibits test-resources/classes to shadow classes/ resources fom main. .I.e. it is not possible to redefine resources/classes for usage when running tests.

Sugested solution:
List list = new ArrayList( getArtifacts().size() + 1 );
list.add( getBuild().getTestOutputDirectory() );
list.add( getBuild().getOutputDirectory() );

add test-classes before classes



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Brett Porter - 17/Jul/06 12:31 AM
while this makes sense to me, ISTR having to change this in the past. Please investigate SVN history before doing this.

Benjamin Bentmann - 16/Nov/07 03:36 AM
This patch includes a unit test to to check the proper test class path ordering.