That won't work for me, I don't want to run the whole build. I just want to have an instantiated MavenProject and call methods on it, not run the build.
On 26-06-11 16:45, Ansgar Konermann wrote: > Am 26.06.2011 16:07, schrieb Asmann, Roland: >> I am trying to read a pom.xml and instantiate it as a MavenProject for >> testing. > > You also might want to have a look at > > http://maven.apache.org/shared/maven-invoker/ > > http://maven.apache.org/plugins/maven-invoker-plugin/ > > http://maven.apache.org/ref/3.0.3/maven-embedder/ > > I use maven invoker plugin to instantiate poms for testing purposes, and > it works great. Depending on your needs, maven-invoker and > maven-embedder might be better for your case. > > AFAIK, the approach you currently follow using Xpp3Reader will give you > a static XML-like model of the pom's xml text (think JAXB or JDOM), but > this is far from a fully initialized maven project. > > Best regards > > Ansgar > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at ------------------------------------------------------------- >>> business. people. technology. <<< ------------------------------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org