For what it's worth (probably not much), I think this isn't the best
approach.
Essentially, core has a dependency on the test code of storage.
Expressing the dependency this way will break if any of the following
happens:
 * The storage project moves to a new location
 * Core's dependency on storage is for a different version than the
current version of storage
 * The version of the storage project code on my machine doesn't match
the version that I'm downloading as a dependency for core
If the risk of any of these things is low, then this approach becomes
less dangerous.

It would be better to have some project (maybe storage, maybe something
else) create a jar that contains this dependency, then have the core
project use the Maven dependency management to get it.

..David..


-----Original Message-----
From: Petr Adamek [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 03, 2005 8:57 AM
To: Maven Users List
Subject: Re: Dependency on test class

baleineca wrote:

>I am using a preGoal for the test dependency.  This goes in the 
>maven.xml (in your case it woud be 'core').
>
>In your case, from looking at your layout, it would be something like 
>this.  Adjust the pathelement to suit your need.
>(xmlns:ant="jelly:ant" and xmlns:m="jelly:maven" in the script below).
>
>        <preGoal name="test:compile">
>                <ant:path id="requiredTestSrc">
>                        <ant:pathelement 
>location="${basedir}/../storage/test/java/org/xiqe/storage/converters"
>/>
>                </ant:path>
>                <m:addPath id="maven.test.compile.src.set"
>refid="requiredTestSrc" />
>        </preGoal>
>
>Hope it helps.
>  
>
It has helped, thank you very much :-).

--
Ing. Petr Adamek
Faculty of Informatics, Masaryk University, Brno


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to