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.
- Alphabetic
- By Inheritance
- unbound
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- case class Activation(activeByDefault: Boolean = false, jdk: String = null, os: ActivationOS = null, property: ActivationProperty = null, file: ActivationFile = null) extends Product with Serializable
- case class ActivationFile(missing: String = null, exists: String = null) extends Product with Serializable
- case class ActivationOS(name: String = null, family: String = null, arch: String = null, version: String = null) extends Product with Serializable
- case class ActivationProperty(name: String = null, value: String = null) extends Product with Serializable
-
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
- 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
- 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
- case class CIManagement(system: String = null, url: String = null, notifiers: Seq[Notifier] = Seq[Notifier]()) extends Product with Serializable
- case class CommentPath(elems: PathElement*) extends Product with Serializable
- case class Comments(s: Seq[String], path: CommentPath) extends Product with Serializable
-
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
- 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
- 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
- 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
- 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
- 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
- case class DocComments(comments: Seq[Comments]) extends Product with Serializable
- case class ElementLabel(label: String) extends PathElement with Product with Serializable
- case class Exclude(exclude: String) extends Product with Serializable
- case class Exclusion(groupId: String = null, artifactId: String = null) extends Product with Serializable
- 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
- case class Extension(groupId: String = null, artifactId: String = null, version: String = null) extends Product with Serializable
- 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
- case class Filter(filter: String) extends Product with Serializable
- case class Goal(goal: String) extends Product with Serializable
-
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.
- case class Include(include: String) extends Product with Serializable
- case class IssueManagement(system: String = null, url: String = null) extends Product with Serializable
-
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.
-
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.
- case class License(name: String = null, url: String = null, distribution: String = License.Repo, comments: String = "") extends Product with Serializable
- case class ListIndex(idx: Int) extends PathElement with Product with Serializable
- case class MailingList(name: String, subscribe: String, unsubscribe: String, post: String = null, archive: String = null, otherArchives: Seq[String] = Seq[String]()) extends Product with Serializable
- 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
- case class ManifestSection(name: String = null, manifestEntries: Map[String, String] = Map[String, String]()) extends Product with Serializable
- case class Mapper(type: String = SL.Identity, from: String = null, to: String = null, classname: String = null) extends Product with Serializable
- case class Module(module: String) extends Product with Serializable
- 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
- case class Organization(name: String = null, url: String = null) extends Product with Serializable
- case class OtherArchive(archive: String) extends Product with Serializable
- case class Parent(groupId: String = null, artifactId: String = null, version: String = null, relativePath: String = Parent.DefRelativePath) extends Product with Serializable
- sealed trait PathElement extends AnyRef
- 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
- 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
- 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
- case class PropertyValue(key: String, value: String) extends Product with Serializable
- case class Relocation(groupId: String = null, artifactId: String = null, version: String = null, message: String = null) extends Product with Serializable
- case class Report(report: String) extends Product with Serializable
- 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
- case class ReportSet(id: String = SL.DefaultStr, reports: Seq[String] = Seq[String](), inherited: Boolean = true, configuration: Config = null) extends Product with Serializable
- case class Reporting(excludeDefaults: Boolean = false, outputDirectory: String = SL.Target + "/" + SL.SiteStr, plugins: Seq[ReportPlugin] = Seq[ReportPlugin]()) extends Product with Serializable
- 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
- case class RepositoryPolicy(enabled: Boolean = true, updatePolicy: String = RepositoryPolicy.Daily, checksumPolicy: String = RepositoryPolicy.Warn) extends Product with Serializable
- 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
- case class Role(role: String) extends Product with Serializable
- 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
- case class Site(childInheritUrl: Boolean = true, id: String = null, name: String = null, url: String = null) extends Product with Serializable
-
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
-
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
-
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.
-
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
-
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
-
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
-
def
emptyToNull(s: String): String
translates empty string to null, otherwise returns the original string
-
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
-
def
isWindows(): Boolean
- Attributes
- protected
-
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.
-
def
loadConfig(files: File*): Config
Utility method to load Config objects from a list of Hocon files
-
val
os: String
- Attributes
- protected
-
val
separators: Array[Char]
- Attributes
- protected
-
def
singular(s: String): String
- Attributes
- protected
- def unencodeJson(s: String): String
- object Activation extends CommonJsonReader with Product with Serializable
- object ActivationFile extends CommonJsonReader with Product with Serializable
- object ActivationOS extends CommonJsonReader with Product with Serializable
- object ActivationProperty extends CommonJsonReader with Product with Serializable
-
object
Archiver extends CommonJsonReader with Serializable
- Attributes
- protected
- object Build extends CommonJsonReader with Product with Serializable
- object BuildBase extends CommonJsonReader with Product with Serializable
- object CIManagement extends CommonJsonReader with Product with Serializable
-
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.
- object CommentExtractor
- object Contributor extends CommonJsonReader with Product with Serializable
- object Dependency extends CommonJsonReader with Product with Serializable
- object DeploymentRepository extends CommonJsonReader with Product with Serializable
- object Developer extends CommonJsonReader with Product with Serializable
- object DistributionManagement extends CommonJsonReader with Product with Serializable
- object Execution extends CommonJsonReader with Product with Serializable
- object Extension extends CommonJsonReader with Product with Serializable
-
object
Fileset extends CommonJsonReader with Serializable
- Attributes
- protected
-
object
HoconReader extends HoconProjectReader
Static accessor to the Config -> Project case class conversion code
- object IssueManagement extends CommonJsonReader with Product with Serializable
-
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
-
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
- object License extends CommonJsonReader with Product with Serializable
- object MailingList extends CommonJsonReader with Product with Serializable
-
object
ManifestObj extends CommonJsonReader with Serializable
- Attributes
- protected
-
object
ManifestSection extends CommonJsonReader with Serializable
- Attributes
- protected
- object Notifier extends CommonJsonReader with Product with Serializable
- object Organization extends CommonJsonReader with Product with Serializable
- object Parent extends CommonJsonReader with Product with Serializable
- object Plugin extends CommonJsonReader with Product with Serializable
- object Profile extends CommonJsonReader with Product with Serializable
- object Project extends CommonJsonReader with Product with Serializable
- object Relocation extends CommonJsonReader with Product with Serializable
- object ReportPlugin extends CommonJsonReader with Product with Serializable
- object ReportSet extends CommonJsonReader with Product with Serializable
- object Reporting extends CommonJsonReader with Product with Serializable
- object Repository extends CommonJsonReader with Product with Serializable
- object RepositoryPolicy extends CommonJsonReader with Product with Serializable
- object Resource extends CommonJsonReader with Product with Serializable
-
object
SL extends Labels
a static set of internalized strings used by Unbound
- object Scm extends CommonJsonReader with Product with Serializable
- object Site extends CommonJsonReader with Product with Serializable