I'm creating an addon that updates the existing POM, I'm able to add dependencies, repository, and various other information using DependencyFacet, MavenFacet etc., However, I'm unable to figure out how to add a parent POM. Following is the code I tried and it didn't work. Any help is appreciated as to which facet I can use and what is the syntax to use it.
Parent p = new Parent();
MavenFacet mavenFacet = getFaceted().getFacet(MavenFacet.class);
I found the answer after some trail and errors...
|Parent p = new Parent();|
|MavenFacet mavenFacet = getFaceted().getFacet(MavenFacet.class);|
|Model model = mavenFacet.getModel();|