You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Lukas Theussl (JIRA)" <ji...@codehaus.org> on 2006/03/25 01:58:31 UTC

[jira] Closed: (MPTEST-47) It should be possible to add additional elements to the test classpath

     [ http://jira.codehaus.org/browse/MPTEST-47?page=all ]
     
Lukas Theussl closed MPTEST-47:
-------------------------------

     Assign To: Lukas Theussl
    Resolution: Fixed

> It should be possible to add additional elements to the test classpath
> ----------------------------------------------------------------------
>
>          Key: MPTEST-47
>          URL: http://jira.codehaus.org/browse/MPTEST-47
>      Project: maven-test-plugin
>         Type: Improvement

>  Environment: Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_07-b05)
> Java HotSpot(TM) Client VM (build 1.4.2_07-b05, mixed mode)
>     Reporter: Henning Schmiedehausen
>     Assignee: Lukas Theussl
>      Fix For: 1.8
>  Attachments: maven-test.patch
>
> Original Estimate: 10 minutes
>         Remaining: 10 minutes
>
> (this is basically a rehash of MPTEST-16)
> For porting unit tests from ant to maven, it was necessary to add certain pre-produced jars to the test classpath. This is not possible with the 1.6.2 plugin. My solution was (as the solution of some other users), to add a property which can
> be assigned and is then added to the classpath. This allows me to do e.g.
> maven.test.classpath= ${basedir}/test/cpload/test1.jar;${basedir}/test/cpload/test2.jar
> where test1.jar and test2.jar are jars that must not be present in the build phase but need to present in the test phase.
> There have different solution been discussed. However:
> - adding something to the "resources" part of the POM makes it impossible to automatically download such a jar
>   through maven.
> - adding a property to the dependencies makes it impossible to ship such a test jar with the distribution and reference
>   it locally. 
> and still we currently have no solution at all. I'd therefore propose the attached patch which allows all three test goals in maven-test-plugin (test:single, test:test and test:match) to evaluate a property variable called maven.test.classpath. This
> variable (if nonempty) is transferred to a <pathelement path="..."/> element and can therefore contain multiple elements (separated by e.g. ";").
> The attached patch is IMHO the easiest fix for this problem with seems to affect a lot of maven users.

-- 
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