p

org.apache.maven

unbound

package unbound

This is the Maven Unbound package. It contains a Scala implementation of the Maven POM object and serialization/deserialization functionality for translating POM files as XML to and from Json and Hocon formats.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. unbound
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class Activation(activeByDefault: Boolean = false, jdk: String = null, os: ActivationOS = null, property: ActivationProperty = null, file: ActivationFile = null) extends Product with Serializable
  2. case class ActivationFile(missing: String = null, exists: String = null) extends Product with Serializable
  3. case class ActivationOS(name: String = null, family: String = null, arch: String = null, version: String = null) extends Product with Serializable
  4. case class ActivationProperty(name: String = null, value: String = null) extends Product with Serializable
  5. case class Archiver(addMavenDescriptor: Boolean = true, compress: Boolean = true, forced: Boolean = true, index: Boolean = false, manifest: ManifestObj = null, manifestEntries: Map[String, String] = Map[String, String](), manifestFile: String = null, manifestSections: Seq[ManifestSection] = Seq[ManifestSection](), pomPropertiesFile: String = null) extends Product with Serializable

    This class handles the special case of the Maven Archiver which is a piece of shared infrastructure provided by Maven to Plugins to allow compressing of build products into a single file.

    This class handles the special case of the Maven Archiver which is a piece of shared infrastructure provided by Maven to Plugins to allow compressing of build products into a single file.

    See also

    See http://maven.apache.org/shared/maven-archiver/index.html for more details

  6. case class Build(sourceDirectory: String = Build.defSourceDir, scriptSourceDirectory: String = Build.defScriptDir, testSourceDirectory: String = Build.defTestDir, outputDirectory: String = Build.defOutputDir, testOutputDirectory: String = Build.defTestOutputDir, extensions: Seq[Extension] = Seq[Extension](), defaultGoal: String = null, resources: Seq[Resource] = ..., testResources: Seq[Resource] = ..., directory: String = SL.Target, finalName: String = null, filters: Seq[String] = Seq[String](), pluginManagement: Seq[Plugin] = Seq[Plugin](), plugins: Seq[Plugin] = Seq[Plugin]()) extends Product with Serializable
  7. case class BuildBase(defaultGoal: String = null, resources: Seq[Resource] = ..., testResources: Seq[Resource] = ..., directory: String = SL.Target, finalName: String = null, filters: Seq[String] = Seq[String](), pluginManagement: Seq[Plugin] = Seq[Plugin](), plugins: Seq[Plugin] = Seq[Plugin]()) extends Product with Serializable
  8. case class CIManagement(system: String = null, url: String = null, notifiers: Seq[Notifier] = Seq[Notifier]()) extends Product with Serializable
  9. case class CommentPath(elems: PathElement*) extends Product with Serializable
  10. case class Comments(s: Seq[String], path: CommentPath) extends Product with Serializable
  11. trait CommonJsonReader extends Labels

    Conversion code that translates Json4s objects to and from Project case class instances.

    Conversion code that translates Json4s objects to and from Project case class instances. Unfortunately because Json4s serialization doesn't handle case classes with default values well, often there are case objects littered throughout the code to provide explicit serialization to/from Json4s objects. Those case objects extend this trait to get all the utility code needed to read/write Json4s objects

  12. case class Contributor(name: String = null, email: String = null, url: String = null, organization: String = null, organizationUrl: String = null, roles: Seq[String] = Seq[String](), timezone: String = null, properties: Map[String, String] = Map[String, String]()) extends Product with Serializable
  13. case class Dependency(groupId: String = null, artifactId: String = null, version: String = null, type: String = SL.JarStr, classifier: String = null, scope: String = SL.Compile, systemPath: String = null, exclusions: Seq[Exclusion] = Seq[Exclusion](), optional: Boolean = false) extends Product with Serializable
  14. case class DeploymentRepository(uniqueVersion: Boolean = true, releases: RepositoryPolicy = null, snapshots: RepositoryPolicy = null, id: String = null, name: String = null, url: String = null, layout: String = SL.DefaultStr) extends Product with Serializable
  15. case class Developer(id: String = null, name: String = null, email: String = null, url: String = null, organization: String = null, organizationUrl: String = null, roles: Seq[String] = Seq[String](), timezone: String = null, properties: Map[String, String] = Map[String, String]()) extends Product with Serializable
  16. case class DistributionManagement(repository: DeploymentRepository = null, snapshotRepository: DeploymentRepository = null, site: Site = null, downloadUrl: String = null, relocation: Relocation = null, status: String = DistributionManagement.None) extends Product with Serializable
  17. case class DocComments(comments: Seq[Comments]) extends Product with Serializable
  18. case class ElementLabel(label: String) extends PathElement with Product with Serializable
  19. case class Exclude(exclude: String) extends Product with Serializable
  20. case class Exclusion(groupId: String = null, artifactId: String = null) extends Product with Serializable
  21. case class Execution(id: String = SL.DefaultStr, phase: String = null, goals: Seq[String] = Seq[String](), inherited: Boolean = true, configuration: Config = null) extends Product with Serializable
  22. case class Extension(groupId: String = null, artifactId: String = null, version: String = null) extends Product with Serializable
  23. case class Fileset(directory: String = null, lineEnding: String = null, followSymlinks: Boolean = false, outputDirectory: String = null, useDefaultExcludes: Boolean = true, includes: Seq[String] = Seq[String](), excludes: Seq[String] = Seq[String](), fileMode: String = SL.DefaultFileMode, directoryMode: String = SL.DefaultDirectoryMode, mapper: Mapper = null) extends Product with Serializable

  24. case class Filter(filter: String) extends Product with Serializable
  25. case class Goal(goal: String) extends Product with Serializable
  26. trait HoconProjectReader extends AnyRef

    This trait provides the ability to read Maven POM projects from Typesafe Config objects.

    This trait provides the ability to read Maven POM projects from Typesafe Config objects. Since the Typesafe ConfigFactory provides so many ways to read Typesafe Config objects, only the Config -> Maven POM case class is provided here. Ficus is used to automate much of the conversion.

  27. case class Include(include: String) extends Product with Serializable
  28. case class IssueManagement(system: String = null, url: String = null) extends Product with Serializable
  29. trait JsonProjectAPI extends JsonMethods with CommonJsonReader

    A trait which gathers all the case object serializers together so they can be used to read/write Project case class objects.

  30. trait Labels extends AnyRef

    A set of all the static strings used by Unbound.

    A set of all the static strings used by Unbound. Done as a set of typesafe objects that can be converted to Strings when in scope.

  31. case class License(name: String = null, url: String = null, distribution: String = License.Repo, comments: String = "") extends Product with Serializable
  32. case class ListIndex(idx: Int) extends PathElement with Product with Serializable
  33. case class MailingList(name: String, subscribe: String, unsubscribe: String, post: String = null, archive: String = null, otherArchives: Seq[String] = Seq[String]()) extends Product with Serializable
  34. case class ManifestObj(addClasspath: Boolean = false, addDefaultEntries: Boolean = true, addDefaultImplementationEntries: Boolean = false, addDefaultSpecificationEntries: Boolean = false, addBuildEnvironmentEntries: Boolean = false, addExtensions: Boolean = false, classpathLayoutType: String = SL.Simple, classpathPrefix: String = "", customClasspathLayout: String = null, mainClass: String = null, packageName: String = null, useUniqueVersions: Boolean = true) extends Product with Serializable
  35. case class ManifestSection(name: String = null, manifestEntries: Map[String, String] = Map[String, String]()) extends Product with Serializable
  36. case class Mapper(type: String = SL.Identity, from: String = null, to: String = null, classname: String = null) extends Product with Serializable
  37. case class Module(module: String) extends Product with Serializable
  38. case class Notifier(type: String = SL.Mail, sendOnError: Boolean = true, sendOnFailure: Boolean = true, sendOnSuccess: Boolean = true, sendOnWarning: Boolean = true, configuration: Map[String, String] = Map[String, String]()) extends Product with Serializable
  39. case class Organization(name: String = null, url: String = null) extends Product with Serializable
  40. case class OtherArchive(archive: String) extends Product with Serializable
  41. case class Parent(groupId: String = null, artifactId: String = null, version: String = null, relativePath: String = Parent.DefRelativePath) extends Product with Serializable
  42. sealed trait PathElement extends AnyRef
  43. case class Plugin(groupId: String = SL.DefaultPluginGroup, artifactId: String = null, version: String = null, extensions: Boolean = false, executions: Seq[Execution] = Seq[Execution](), dependencies: Seq[Dependency] = Seq[Dependency](), inherited: Boolean = true, configuration: Config = null) extends Product with Serializable
  44. case class Profile(id: String = SL.DefaultStr, activation: Activation = null, build: BuildBase = null, modules: Seq[String] = Seq[String](), distributionManagement: DistributionManagement = null, properties: Map[String, String] = Map[String, String](), dependencyManagement: Seq[Dependency] = Seq[Dependency](), dependencies: Seq[Dependency] = Seq[Dependency](), repositories: Seq[Repository] = Seq[Repository](), pluginRepositories: Seq[Repository] = Seq[Repository](), reporting: Reporting = null) extends Product with Serializable
  45. case class Project(childInheritUrl: Boolean = true, modelVersion: String = SL.DefaultModelVersion, parent: Parent = null, groupId: String = null, artifactId: String = null, version: String = null, packaging: String = SL.JarStr, name: String = null, description: String = null, url: String = null, inceptionYear: String = null, organization: Organization = null, licenses: Seq[License] = Seq[License](), developers: Seq[Developer] = Seq[Developer](), contributors: Seq[Contributor] = Seq[Contributor](), mailingLists: Seq[MailingList] = Seq[MailingList](), modules: Seq[String] = Seq[String](), scm: Scm = null, issueManagement: IssueManagement = null, ciManagement: CIManagement = null, distributionManagement: DistributionManagement = null, properties: Map[String, String] = Map[String, String](), dependencyManagement: Seq[Dependency] = Seq[Dependency](), dependencies: Seq[Dependency] = Seq[Dependency](), repositories: Seq[Repository] = Seq[Repository](), pluginRepositories: Seq[Repository] = Seq[Repository](), build: Build = null, reporting: Reporting = null, profiles: Seq[Profile] = Seq[Profile]()) extends Writable with HoconProjectReader with Product with Serializable
  46. case class PropertyValue(key: String, value: String) extends Product with Serializable
  47. case class Relocation(groupId: String = null, artifactId: String = null, version: String = null, message: String = null) extends Product with Serializable
  48. case class Report(report: String) extends Product with Serializable
  49. case class ReportPlugin(groupId: String = SL.DefaultPluginGroup, artifactId: String = null, version: String = null, reportSets: Seq[ReportSet] = Seq[ReportSet](), inherited: Boolean = true, configuration: Config = null) extends Product with Serializable
  50. case class ReportSet(id: String = SL.DefaultStr, reports: Seq[String] = Seq[String](), inherited: Boolean = true, configuration: Config = null) extends Product with Serializable
  51. case class Reporting(excludeDefaults: Boolean = false, outputDirectory: String = SL.Target + "/" + SL.SiteStr, plugins: Seq[ReportPlugin] = Seq[ReportPlugin]()) extends Product with Serializable
  52. case class Repository(releases: RepositoryPolicy = null, snapshots: RepositoryPolicy = null, id: String = null, name: String = null, url: String = null, layout: String = SL.DefaultStr) extends Product with Serializable
  53. case class RepositoryPolicy(enabled: Boolean = true, updatePolicy: String = RepositoryPolicy.Daily, checksumPolicy: String = RepositoryPolicy.Warn) extends Product with Serializable
  54. case class Resource(targetPath: String = null, filtering: Boolean = false, directory: String = SL.Dot, includes: Seq[String], excludes: Seq[String] = Seq[String]()) extends Product with Serializable
  55. case class Role(role: String) extends Product with Serializable
  56. case class Scm(childInheritConnection: Boolean = true, childInheritDeveloperConnection: Boolean = true, childInheritUrl: Boolean = true, connection: String = null, developerConnection: String = null, tag: String = Scm.Head, url: String = null) extends Product with Serializable
  57. case class Site(childInheritUrl: Boolean = true, id: String = null, name: String = null, url: String = null) extends Product with Serializable
  58. trait Writable extends AnyRef

    A trait case classes can extend to get the ability to write themselves as XML provided they have a field named xml of type Elem

Value Members

  1. def configToElem(config: Config): Elem

    Translates a Typesafe Config object to a XML Element.

    Translates a Typesafe Config object to a XML Element. Handles all the same special cases as elemToConfig. Supported type conversions:

    • Boolean <key>true/false</key>
    • Number <key>number</key>
    • String <key>value</key>
    • Seq[Any] <key(plural)><key(singular)>value(0) </key(singular)><key(singular)>value(1)</key(singular)> ...</key(plural)>
    • Properties Identified by the presence of a child at path "properties" with the value true, otherwise represented as a Map[String, String] in the Scala code. It returns the Maven property XML format which is: <key><property><name>property key1</name><value>property value1</value></property> <property><name>property key2</name> <value>property value2</value></property>...</key>
    • Seq[Dependency] Special case where child elements all have the keys of a valid "dependency" object in the POM
    • Archiver Special case where a child key is "archive"
    • Fileset Special case where a child key is "fileset"
    • Resource Transformer Special case where a child key is implementation
    • Map[String, Any] general/default case, returns whatever the value translates to inside a XML element labeled by the key
  2. def configToJson(conf: Config): JObject

    Converts a Typesafe Config object to a Json4s Json object usually for serialization.

    Converts a Typesafe Config object to a Json4s Json object usually for serialization. Does a direct translation.

  3. def elemToConfig(elem: Elem): Config

    Converts an XML Element into a Typesafe Config object.

    Converts an XML Element into a Typesafe Config object. Generally it converts Elements into Maps keyed by the names of the child tags. It also looks for special patterns of XML to do more specific type conversions. Supported type conversions:

    • Boolean the strings true or false
    • Number both Integers and Doubles
    • String Text nodes of the XML document
    • Seq[Any] Elements whose child labels are the singlar form of elem's label
    • Properties Elements whose grand child labels are all name or value
    • Seq[Dependency] Special case where child elements all have the label "dependency"
    • Archiver Special case where elem's label is "archive"
    • Fileset Special case where elem's label is "fileset"
    • Resource Transformer Special case where the elem's label is transformers, the child's label is transformer and there is an attribute named implementation defined
    • Map[String, Any] general/default case
    See also

    Configuring Plugins https://maven.apache.org/guides/mini/guide-configuring-plugins.html

    Archiver http://maven.apache.org/shared/maven-archiver/index.html

    Resource Transformers https://maven.apache.org/plugins-archives/maven-shade-plugin-2.0/examples/resource-transformers.html

  4. def emptyToDefault(s: String, d: String): String

    translates the empty string to a default, otherwise returns the original string

    translates the empty string to a default, otherwise returns the original string

    s

    string to test and return if not empty

    d

    string to return if s is the empty string

  5. def emptyToDefaultBool(s: String, d: Boolean): Boolean

    if s is the string "true" returns true, if s is not the empty string return false, otherwise return d

    if s is the string "true" returns true, if s is not the empty string return false, otherwise return d

    s

    string to test for "true"

    d

    value to return if s is the empty string

  6. def emptyToNull(s: String): String

    translates empty string to null, otherwise returns the original string

  7. def ensureDefault[T](seq: Seq[T], default: T): Seq[T]

    Take a list of something and if its empty returns a list containing only default instead, otherwise it returns the original list

    Take a list of something and if its empty returns a list containing only default instead, otherwise it returns the original list

    seq

    the list of T

    default

    the default value wrapped in a list to return if the list is empty

  8. def isWindows(): Boolean
    Attributes
    protected
  9. def jsonToConfig(jobject: JObject): Config

    Converts a Json4s object into a Typesafe config in a very direct way Handles no special cases as there is an isomorphism between Json and Hocon.

    Converts a Json4s object into a Typesafe config in a very direct way Handles no special cases as there is an isomorphism between Json and Hocon. Hocon is really just a special case of Json afterall.

  10. def loadConfig(files: File*): Config

    Utility method to load Config objects from a list of Hocon files

  11. val os: String
    Attributes
    protected
  12. val separators: Array[Char]
    Attributes
    protected
  13. def singular(s: String): String
    Attributes
    protected
  14. def unencodeJson(s: String): String
  15. object Activation extends CommonJsonReader with Product with Serializable
  16. object ActivationFile extends CommonJsonReader with Product with Serializable
  17. object ActivationOS extends CommonJsonReader with Product with Serializable
  18. object ActivationProperty extends CommonJsonReader with Product with Serializable
  19. object Archiver extends CommonJsonReader with Serializable
    Attributes
    protected
  20. object Build extends CommonJsonReader with Product with Serializable
  21. object BuildBase extends CommonJsonReader with Product with Serializable
  22. object CIManagement extends CommonJsonReader with Product with Serializable
  23. object Cli

    The Maven Unbound Command Line Interface(CLI).

    The Maven Unbound Command Line Interface(CLI). It converts pom.json and pom.conf files to pom.xml files and visa-versa. It reads the parsed files to extract the list of sub-modules to recurse down a heirarchy performing the same conversions on all necessary modules of a multi-module project. Normally this class is only used when building a command line interface but can be used in other cases as well.

  24. object CommentExtractor
  25. object Contributor extends CommonJsonReader with Product with Serializable
  26. object Dependency extends CommonJsonReader with Product with Serializable
  27. object DeploymentRepository extends CommonJsonReader with Product with Serializable
  28. object Developer extends CommonJsonReader with Product with Serializable
  29. object DistributionManagement extends CommonJsonReader with Product with Serializable
  30. object Execution extends CommonJsonReader with Product with Serializable
  31. object Extension extends CommonJsonReader with Product with Serializable
  32. object Fileset extends CommonJsonReader with Serializable
    Attributes
    protected
  33. object HoconReader extends HoconProjectReader

    Static accessor to the Config -> Project case class conversion code

  34. object IssueManagement extends CommonJsonReader with Product with Serializable
  35. object JsonReader extends JsonProjectAPI

    Static Json reader for Project objects.

    Static Json reader for Project objects. Reads from Strings, Readers or InputStreams and returns Project case classes

  36. object JsonWriter extends JsonProjectAPI

    Static Json writer for Project objects.

    Static Json writer for Project objects. Writes Project case classes into Strings, Writers or OutputStreams

  37. object License extends CommonJsonReader with Product with Serializable
  38. object MailingList extends CommonJsonReader with Product with Serializable
  39. object ManifestObj extends CommonJsonReader with Serializable
    Attributes
    protected
  40. object ManifestSection extends CommonJsonReader with Serializable
    Attributes
    protected
  41. object Notifier extends CommonJsonReader with Product with Serializable
  42. object Organization extends CommonJsonReader with Product with Serializable
  43. object Parent extends CommonJsonReader with Product with Serializable
  44. object Plugin extends CommonJsonReader with Product with Serializable
  45. object Profile extends CommonJsonReader with Product with Serializable
  46. object Project extends CommonJsonReader with Product with Serializable
  47. object Relocation extends CommonJsonReader with Product with Serializable
  48. object ReportPlugin extends CommonJsonReader with Product with Serializable
  49. object ReportSet extends CommonJsonReader with Product with Serializable
  50. object Reporting extends CommonJsonReader with Product with Serializable
  51. object Repository extends CommonJsonReader with Product with Serializable
  52. object RepositoryPolicy extends CommonJsonReader with Product with Serializable
  53. object Resource extends CommonJsonReader with Product with Serializable
  54. object SL extends Labels

    a static set of internalized strings used by Unbound

  55. object Scm extends CommonJsonReader with Product with Serializable
  56. object Site extends CommonJsonReader with Product with Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped