Re: Using the Maven API outside of a plugin?

2016-12-29 Thread org . apache . maven . user
On 2016-12-28T12:20:20 +
org.apache.maven.u...@io7m.com wrote:

> Hello.
> 
> I'm writing a small program to analyze the dependencies of Maven
> projects. There are numerous examples of how to do this from within a
> Maven plugin, but I can't work out how to simply load a POM file and
> derive a ProjectDependencyGraph from it outside of the context of a
> plugin. How do I instantiate all of the required classes? As an
> example, I believe I need to instantiate a MavenSession, but all of the
> constructors of that class are deprecated...
> 
> Does anyone have any example code or documentation I can look at?
> 
> M

Am I perhaps correct in thinking that nobody actually knows how to do
this, and that everyone depends on a DI framework instead?

M


pgpgQXv9pKiIT.pgp
Description: OpenPGP digital signature


Using the Maven API outside of a plugin?

2016-12-28 Thread org . apache . maven . user
Hello.

I'm writing a small program to analyze the dependencies of Maven
projects. There are numerous examples of how to do this from within a
Maven plugin, but I can't work out how to simply load a POM file and
derive a ProjectDependencyGraph from it outside of the context of a
plugin. How do I instantiate all of the required classes? As an
example, I believe I need to instantiate a MavenSession, but all of the
constructors of that class are deprecated...

Does anyone have any example code or documentation I can look at?

M


pgpf11zxYuaSF.pgp
Description: OpenPGP digital signature