[jira] Commented: (MNG-2365) classes before test-classes in MavenProject.getTestClasspathElements() - should be the other way around?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (MNG-2365) classes before test-classes in MavenProject.getTestClasspathElements() - should be the other way around?

JIRA jira@codehaus.org
    [ http://jira.codehaus.org/browse/MNG-2365?page=comments#action_69941 ]
           
Brett Porter commented on MNG-2365:
-----------------------------------

while this makes sense to me, ISTR having to change this in the past. Please investigate SVN history before doing this.

> classes before test-classes in MavenProject.getTestClasspathElements() - should be the other way around?
> --------------------------------------------------------------------------------------------------------
>
>                 Key: MNG-2365
>                 URL: http://jira.codehaus.org/browse/MNG-2365
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: doesnt matter
>            Reporter: kai lilleby
>             Fix For: 2.0.5
>
>
> 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

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira