Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the replacement for MavenProjectBuilder which is deprecated in maven 3?

I'm writing a plugin which in part takes as an input groupId:artifactId:version, and interrogates it POM.

In Maven2, there was an option to use MavenProjectBuilder. I could download the pom for the input GAV, and using MavenProjectBuilder, build a MavenProject and thus interrogate all I need from this pom (dependencies, scm tag), etc.

In Maven3, MavenProjectBuilder is deprecated, and I couldn't find any resource on replacement for it. Usually when you deprecate a class you add @see to help developers use the new class. Maven developers didn't,

Thanks!

Asaf

like image 837
Asaf Mesika Avatar asked Jul 05 '11 11:07

Asaf Mesika


1 Answers

Though it's not specifically referenced in the 3.0.3 API (as you mentioned), I think org.apache.maven.project.DefaultProjectBuilder (and the interface it implements) is the likely replacement. They seem to have done away with some of the convenience methods.

like image 71
Justin Garrick Avatar answered Nov 09 '22 14:11

Justin Garrick