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.
On 5/2/05, Petr Adamek <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I want to split my project "xiqe" into smaller subprojects, but I have
> found one problem.
> The xiqe-storage subproject contains the interface Converter and the
> helper class
> ConverterAbstractTestCase. Each implementation of Converter interface
> has its own
> test class that extends the ConverterAbstractTestCase class. This works
> perfectly
> for Converter implementations in the same subproject.
>
> But I have problem with other subprojects. The ConverterAbstractTestCase
> class is in
> test directory and it is not copied into xiqe-storage artefact jar file
> and test classes
> in other subprojects can't extend it. I don't want move it into main
> directory because
> it depends on junit.
>
> Is there any way how to define and solve dependency on classes from test
> directory? Or what
> is correct approach to solve this problem?
>
> xiqe
> +- storage
> | +- src
> | +- main
> | | +- java
> | | +- org.xiqe.storage.converters.Converter
> | +- test
> | +- java
> | +- org.xiqe.storage.converters.ConverterAbstractTestCase
> +- core (depends on storage)
> +- src
> +- main
> | +- java
> | +- org.xiqe.structures.dom.NodeConverter (implements Converter)
> +- test
> +- java
> +- org.xiqe.structures.dom.NodeConverterTest (extends
> ConverterAbstractTestCase)
>
> --
> 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]