There seems to be a bigger issue here too.
What if I have the following project structure
project/
api-module/
src/
main/
mock/
test/
impl-module/
src/
main/
test/
Now, api-module needs to provide mocks for use by both the api-module
unit tests the impl-module unit tests.
For impl-module unit test code to get the right dependency, the
api-module mocks must be delivered as a JAR. This must be separate
from the the main api-module JAR.
So, why not just put the mocks in src/mock (alongside src/test) and
make a mocks JAR as the secondary api-module deliverable?
Well, that would need to JAR up the compiled mock classes which will
be in api-module/target/test-classes. However, these test classes
also include the compiled src/test/java classes, as well as test
resources.
Note: it is also not possible to split this out as a separate module,
because there would be a cyclic dependency between api-module and
"api-mock-module".
Is there a way to deliver an api-module mock JAR that only contains
classes for mocks, and can be used by both the api-module unit tests
and the impl-module unit tests?
Kind Regards,
John Fallows.
On 9/13/05, Jorg Heymans <[EMAIL PROTECTED]> wrote:
>
> Trygve Laugstøl wrote:
>
> > Just treat the mocks as unit test source code and use
> >
> > <project>
> > ..
> > <build>
> > ..
> > <testSourceDirectory>mocks</testSourceDirectory>
> > ..
> > </build>
> > </project>
> >
>
> Just tried this, doesn't seem to work.
>
>
> Jorg
>
>
> ---------------------------------------------------------------------
> 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]