Parsing a Maven POM III
Join the DZone community and get the full member experience.
Join For FreeDue to popular demand I moved the latest code for parsing a Maven POM (including it’s parent POMs) into a tiny Github Project:
https://github.com/fuinorg/utils4maven
Here is a short example how to use it:
// Reading the model loads everything from remote
// repository using JBoss Shrinkwrap Resolver!
Model model = MavenPomReader.readModel("org.fuin:objects4j:0.6.1");
System.out.println(model.getName());
// Should print 'Objects4J'
A full example can be found here: MavenPomReaderTest.java
Published at DZone with permission of Michael Schnell, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments