Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Parsing a Maven POM III

DZone's Guide to

Parsing a Maven POM III

· Java Zone
Free Resource

Try Okta to add social login, MFA, and OpenID Connect support to your Java app in minutes. Create a free developer account today and never build auth again.

Due 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

Build and launch faster with Okta’s user management API. Register today for the free forever developer edition!

Topics:
java ,maven ,pomodoro technique

Published at DZone with permission of Michael Schnell, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}