开发者

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

开发者 https://www.devze.com 2023-03-17 14:54 出处:网络
I\'m writing a plugin which in part takes as an input groupId:artifactId:version, and interrogates it POM.

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消