Class Buildr::POM
In: lib/buildr/java/pom.rb  (CVS)
Parent: Object

Methods

Constants

POM_TO_SPEC_MAP = { :group=>"groupId", :id=>"artifactId", :type=>"type", :version=>"version", :classifier=>"classifier", :scope=>"scope" }
SCOPES_TRANSITIVE = [nil, "compile", "runtime"]
SCOPES_WE_USE = SCOPES_TRANSITIVE + ["provided"]

Attributes

parent  [R]  Parent POM if referenced by this POM.
project  [R]  POM project as Hash (using XmlSimple).

Public Class methods

Load new POM object form various kind of sources such as artifact, hash representing spec, filename, XML.

Public Instance methods

Returns list of required dependencies as specified by the POM. You can specify which scopes to use (e.g. "compile", "runtime"); use nil for dependencies with unspecified scope. The default scopes are nil, "compile" and "runtime" (aka SCOPES_WE_USE).

The first form returns all the managed dependencies specified by this POM in dependencyManagement. The second form uses a single spec hash and expands it from the current/parent POM. Used to determine the version number if specified in dependencyManagement instead of dependencies.

Returns properties available to this POM as hash. Includes explicit properties and pom.xxx/project.xxx properties for groupId, artifactId, version and packaging.

[Validate]