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
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
Well, I want a simple way to get a MavenProject object with artifact
dependencies which consist of folder(s) instead of a jar. I probably could
mock this, but I was thinking having a multimodule project on disk and then
build it and get hold of one of the modules (which has a dependency to one
of
Unfortunately, maven-plugin-testing-harness v3.1.0 (where
readMavenProject was added) is too high of a Java version for the shared
liv I'm working on. :-( But I could probably borrow the code...
Turns out I can't do that. That code uses the ProjectBuilder class which is
not available in
I would conclude not to use Maven 2 from that ;-)
Anders Hammar wrote on 29.10.2014 08:18:
Unfortunately, maven-plugin-testing-harness v3.1.0 (where
readMavenProject was added) is too high of a Java version for the shared
liv I'm working on. :-( But I could probably borrow the code...
I would conclude not to use Maven 2 from that ;-)
Well, not an option for maven-shared libs. (at least not yet)
/Anders
Anders Hammar wrote on 29.10.2014 08:18:
Unfortunately, maven-plugin-testing-harness v3.1.0 (where
readMavenProject was added) is too high of a Java version for