如何使用Java从子POM中获取父母POM
目前,我有一个Maven模型,通过阅读Child Pom,可以与MavenXpp3Reader一起获得。
MavenXpp3Reader reader = new MavenXpp3Reader();
Model model = reader.read(new FileReader("pom.xml"));
该模型具有model.getParent()< / code>方法,该方法返回具有
artifactid / groupId / gropes < / code>的父对象。
我可以使用此数据访问父pom,还是有另一种方法?
我需要仅使用JavaCode构建完整的父pom层次结构。
At the moment I have a Maven Model which I get with MavenXpp3Reader by reading the child pom.
MavenXpp3Reader reader = new MavenXpp3Reader();
Model model = reader.read(new FileReader("pom.xml"));
The model has a model.getParent()
method which returns the Parent object having artifactId / groupId / version
.
Can I access the parent POM using this data, or is there another way?
I need this to build a complete Parent Pom hierarchy using only JavaCode.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论