[ http://jira.codehaus.org/browse/MNG-813?page=comments#action_45579 ]
Vincent Massol commented on MNG-813:
------------------------------------
For now, I'm adding a system property in the surefire plugin:
System.setProperty( "localRepository", localRepository.getBasedir() );
This allows my project code to add the following that is passed to the junit
tests:
<property>
<name>cargo.testdata.empty-ear</name>
<value>org/codehaus/cargo/samples/testdata/empy-ear/${version}/empty-ear-${version}.ear</value>
</property>
And inside the junit tests, I'll have:
String localRepo = System.getProperty("localRepository");
File emptyEar = new File(localRepo,
System.getProperty("cargo.testdata.empty-ear");
Not perfect but does the job for now.
> Allow unit tests to manipulate dependencies
> -------------------------------------------
>
> Key: MNG-813
> URL: http://jira.codehaus.org/browse/MNG-813
> Project: Maven 2
> Type: Task
> Components: maven-plugins
> Versions: 2.0-alpha-3
> Reporter: Vincent Massol
> Assignee: Vincent Massol
> Fix For: 2.0-beta-1
>
>
> I have some unit tests that require to copy some dependencies file somewhere
> and I'd need a handle on those dependencies.
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]