Re: DefaultProjectBuilder ... mavenTools: null [Was: Re: Programmatically get maven properties]

2014-01-07 Thread Barrie Treloar
On 8 January 2014 09:00, juliangeo wrote: > Hi! > > I'm new to Maven and I've been struggling with this for a while. I just need > to be able to programmatically build a project from a pom file in order to > retrieve its relevant information. I am not using, nor want to, a maven > plugin, just nee

Re: DefaultProjectBuilder ... mavenTools: null [Was: Re: Programmatically get maven properties]

2014-01-07 Thread juliangeo
Hi! I'm new to Maven and I've been struggling with this for a while. I just need to be able to programmatically build a project from a pom file in order to retrieve its relevant information. I am not using, nor want to, a maven plugin, just need this functionality as part of my application. I've

Re: DefaultProjectBuilder ... mavenTools: null [Was: Re: Programmatically get maven properties]

2012-02-13 Thread Max Spring
Yes, having a projectBuilder in the Mojo did the trick. Thank you! The complete working example is down below. -Max package org.example; import java.io.File; import org.apache.maven.model.Model; import org.apache.maven.model.building.ModelBuildingRequest; import org.apache.maven.plugin.Abstract

Re: DefaultProjectBuilder ... mavenTools: null [Was: Re: Programmatically get maven properties]

2012-02-10 Thread Olivier Lamy
Hello, You must probably use: /** * @component */ private ProjectBuilder projectBuilder; 2012/2/10 Max Spring : > I'm running into the same "mavenTools: null" problem, but my code sits in a > Maven 3.0.3 mojo: > >  public class MyMojo extends AbstractMojo{ > >    /** @parameter

DefaultProjectBuilder ... mavenTools: null [Was: Re: Programmatically get maven properties]

2012-02-10 Thread Max Spring
I'm running into the same "mavenTools: null" problem, but my code sits in a Maven 3.0.3 mojo: public class MyMojo extends AbstractMojo{ /** @parameter default-value="${repositorySystemSession}" */ private RepositorySystemSession repoSession; public void execute() throws MojoExecu