2009/5/14 Chris Helck <[email protected]>

> I have multiple versions of a jar file called child: child_1.0.jar,
> child_1.1, and child_1.2. In theory each version of child implements the
> same API and should be backwardly compatible.
>
> I have another jar file called parent_2.0.jar. I would like to run
> parent's unit tests three times, each time using a different version of
> child.
>
> Can this be done using Maven?
>

OK, here is one solution.

Create a test-jar from your parent's unit tests

Add a dependency to each child module on the parent with scope test and
type test-jar

[The next steps are required to work around a bug in surefire, whereby it
does not find tests from within test-jar dependencies]

Unpack the test-jar into the target/test-classes folder in each of your
child modules using unpack-dependencies configured for type test-jar only

Now the child modules will run the unit tests from the parent test-jar.

-Stephen


> Regards,
> Christopher
>
>
>

Reply via email to