All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pomutil.Profile.scala Maven / Gradle / Ivy

//
// pom-util - a Scala library for reading Maven POM files
// http://github.com/samskivert/pom-util/blob/master/LICENSE

package pomutil

import scala.xml.Node

/** Modules profile information inside a POM. */
class Profile (pom :POM, elem :Node) {
  /** The id of this profile. */
  lazy val id :String = pom.attr(elem, "id") getOrElse("")

  /** The dependencies declared in this profile. */
  lazy val depends :Seq[Dependency] =
    (elem \ "dependencies" \ "dependency") map(Dependency.fromXML(pom.subProps))

  /** The modules declared in this profile. */
  lazy val modules :Seq[String] =
    (elem \ "modules" \\ "module") map(_.text.trim)

  override def toString = id
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy