You can also use MojoRule#readMavenProject from
maven-plugin-testing-harness [1]. You'd have to inject any cross-module
dependencies manually.
You can also see how we do this in Tycho [2], where we delegate to
DefaultMaven to read and resolve multimodule project.
And, of course, you can just create MavenProject instance and populate
it with relevant data.
Really depends on what you actually need to do.
[1]
https://git-wip-us.apache.org/repos/asf?p=maven-plugin-testing.git;a=blob;f=maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/MojoRule.java;h=d4d57f0ca2295a60032984d31680815364c8f805;hb=5f2f3a23b62bf1cc2465c94b173700ee557edc5a
[2]
http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/tree/tycho-testing-harness/src/main/java/org/eclipse/tycho/testing/AbstractTychoMojoTestCase.java
--
Regards,
Igor
On 2014-10-29, 10:09, Anders Hammar wrote:
I'm trying to create a unit test for MSHARED-361, but I can't figure out
how I get hold of the MavenProject object of one of the modules in a
multi-module build.
Anyone with a pointer or a hint on where this is done in some other unit
test?
/Anders
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]