Scala library for reading Maven POM files
Scala Shell
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
etc
src
.travis.yml
LICENSE
README.md
build.sbt
pom.xml

README.md

pom-util

This is a Scala library for extracting project metadata from Maven POM files. It does not aim to reproduce all of Maven's functionality, but rather to make it easy to extract basic metadata for a project for use by simple development tools.

Usage

The POM class exposes the metadata from a pom.xml file:

val pom = POM.fromFile(new File("pom.xml"))
// do what you will with pom.groupId, pom.artifactId, etc.

A POM's dependencies are modeled via the Dependency class, and one can locate said dependencies in the local Maven repository if desired:

val pom = POM.fromFile(new File("pom.xml"))
pom.depends map(_.localArtifact) foreach { f => println("File: " + f.getPath) }

License

pom-util is released under the New BSD License, which can be found in the LICENSE file.