You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Chris Helck <Ch...@us.icap.com> on 2009/05/14 16:58:49 UTC
Run unit tests with multimple dependecies?
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?
Regards,
Christopher
**********************************************************************
This communication and all information (including, but not limited to,
market prices/levels and data) contained therein (the "Information") is
for informational purposes only, is confidential, may be legally
privileged and is the intellectual property of ICAP plc and its affiliates
("ICAP") or third parties. No confidentiality or privilege is waived or
lost by any mistransmission. The Information is not, and should not
be construed as, an offer, bid or solicitation in relation to any
financial instrument or as an official confirmation of any transaction.
The Information is not warranted, including, but not limited, as to
completeness, timeliness or accuracy and is subject to change
without notice. ICAP assumes no liability for use or misuse of the
Information. All representations and warranties are expressly
disclaimed. The Information does not necessarily reflect the views of
ICAP. Access to the Information by anyone else other than the
recipient is unauthorized and any disclosure, copying, distribution or
any action taken or omitted to be taken in reliance on it is prohibited. If
you receive this message in error, please immediately delete it and all
copies of it from your system, destroy any hard copies of it and
notify the sender.
**********************************************************************
Re: Run unit tests with multimple dependecies?
Posted by Stephen Connolly <st...@gmail.com>.
2009/5/14 Chris Helck <Ch...@us.icap.com>
> 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
>
>
>
Re: Run unit tests with multimple dependecies?
Posted by Baptiste MATHUS <ml...@batmat.net>.
Never done your use case myself, but I guess I'd have a look at profile
activation and multiple executions of the same build.
Cheers
2009/5/14 Chris Helck <Ch...@us.icap.com>
> 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?
>
> Regards,
> Christopher
>
>
> **********************************************************************
> This communication and all information (including, but not limited to,
> market prices/levels and data) contained therein (the "Information") is
> for informational purposes only, is confidential, may be legally
> privileged and is the intellectual property of ICAP plc and its affiliates
> ("ICAP") or third parties. No confidentiality or privilege is waived or
> lost by any mistransmission. The Information is not, and should not
> be construed as, an offer, bid or solicitation in relation to any
> financial instrument or as an official confirmation of any transaction.
> The Information is not warranted, including, but not limited, as to
> completeness, timeliness or accuracy and is subject to change
> without notice. ICAP assumes no liability for use or misuse of the
> Information. All representations and warranties are expressly
> disclaimed. The Information does not necessarily reflect the views of
> ICAP. Access to the Information by anyone else other than the
> recipient is unauthorized and any disclosure, copying, distribution or
> any action taken or omitted to be taken in reliance on it is prohibited.
> If
> you receive this message in error, please immediately delete it and all
> copies of it from your system, destroy any hard copies of it and
> notify the sender.
> **********************************************************************
>
>
--
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !