de.smartics.maven.plugin.buildmetadata.common
Class Constant

Package class diagram package Constant
java.lang.Object
  extended by de.smartics.maven.plugin.buildmetadata.common.Constant

public final class Constant
     
     
extends Object

Constants used in this package.

Author:
Robert Reiner

Nested Class Summary
static class Constant.Section
          The section allows to group build meta data properties.
 
Field Summary
static String DEFAULT_DATE_PATTERN
          The default pattern for the (locale independent) build date.
static String MAVEN_ACTIVE_PROFILE_PREFIX
          The prefix used to provide active profile information of the build.
static String MAVEN_EXECUTION_PROPERTIES_PREFIX
          The prefix used to provide execution properties to the build properties file.
static String PROP_NAME_ARTIFACT_ID
          The name of the project property that stores the artifact ID as read from the POM.
static String PROP_NAME_BUILD_DATE
          The name of the project property that stores the formatted build date.
static String PROP_NAME_BUILD_DATE_PATTERN
          The name of the project property that stores the pattern of the build date.
static String PROP_NAME_BUILD_DURATION
          The name of the project property that stores the duration of the build in milliseconds.
static String PROP_NAME_BUILD_TIMESTAMP
          The name of the project property that stores the build timestamp.
static String PROP_NAME_BUILD_USER
          The name of the project property that stores the build user.
static String PROP_NAME_BUILD_YEAR
          The name of the project property that stores the build year.
static String PROP_NAME_COPYRIGHT_YEAR
          The name of the project property that stores the copyright year.
static String PROP_NAME_FULL_VERSION
          The name of the project property that stores the full version that may include the version, the build date, the build number and the revision number.
static String PROP_NAME_GROUP_ID
          The name of the project property that stores the group ID as read from the POM.
static String PROP_NAME_HOSTNAME
          The name of the property that stores the name of the host the build has been run on.
static String PROP_NAME_JAVA_COMPILER
          The name of the property that stores the name of the Java compiler being executed for the build.
static String PROP_NAME_JAVA_OPTS
          The name of the property that stores the Java opts set in the environment.
static String PROP_NAME_JAVA_RUNTIME_NAME
          The name of the property that stores the name of Java runtime being executed for the build.
static String PROP_NAME_JAVA_RUNTIME_VERSION
          The name of the property that stores the version of Java runtime being executed for the build.
static String PROP_NAME_JAVA_VENDOR
          The name of the property that stores the name of the vendor of Java being executed for the build.
static String PROP_NAME_JAVA_VM
          The name of the property that stores the name of the Java VM being executed for the build.
static String PROP_NAME_MAVEN_ACTIVE_PROFILES
          The name of the property that contains names of active profiles during the build.
static String PROP_NAME_MAVEN_CMDLINE
          The name of the property that stores the command line to start the build.
static String PROP_NAME_MAVEN_EXECUTION_PROJECT
          The name of the property that contains the name of the execution project.
static String PROP_NAME_MAVEN_FILTERS
          The name of the property that contains the name of the filters being registered for the build.
static String PROP_NAME_MAVEN_GOALS
          The name of the property that stores the goals given on the command line for the build.
static String PROP_NAME_MAVEN_IS_EXECUTION_ROOT
          The name of the property that flags if the artifact is build within the project that is the execution root.
static String PROP_NAME_MAVEN_OPTS
          The name of the property that stores the Maven opts set in the environment.
static String PROP_NAME_MAVEN_VERSION
          The name of the property that stores the version of Maven being executed for the build.
static String PROP_NAME_OS_ARCH
          The name of the property that stores the architecture of the operating system the build has been run on.
static String PROP_NAME_OS_NAME
          The name of the property that stores the name of the operating system the build has been run on.
static String PROP_NAME_OS_VERSION
          The name of the property that stores the version of the operating system the build has been run on.
static String PROP_NAME_PROJECT_CATEGORY
          The name of the property that stores a value to categorize the project.
static String PROP_NAME_PROJECT_HOMEPAGE
          The name of the property that stores URL of the project homepage.
static String PROP_NAME_PROJECT_OPS
          The name of the property that stores URL to a page useful for operations teams.
static String PROP_NAME_PROJECT_SUBCATEGORY
          The name of the property that stores a value to further categorize the project.
static String PROP_NAME_PROJECT_TAGS
          The name of the property that stores a comma separated list of tags to categorize the project.
static String PROP_NAME_SCM_LOCALLY_MODIFIED
          The name of the project property that stores the information if the local sources are modified.
static String PROP_NAME_SCM_LOCALLY_MODIFIED_FILES
          The name of the project property that stores the files that are locally modified.
static String PROP_NAME_SCM_REVISION_DATE
          The name of the project property that stores the date the revision number was set.
static String PROP_NAME_SCM_REVISION_ID
          The name of the project property that stores the revision number provided by the SCM.
static String PROP_NAME_SCM_URL
          The name of the project property that stores the URL to the SCM server.
static String PROP_NAME_VERSION
          The name of the project property that stores the version as read from the POM.
static List<Constant.Section> REPORT_PROPERTIES
          List of properties, organized in sections, relevant to the build report.
static String SECTION_ARTIFACT
          The name of the artifact section.
static String SECTION_BUILD_DATE
          The name of the build date section.
static String SECTION_BUILD_JAVA
          The name of the Java build section.
static String SECTION_BUILD_MAVEN
          The name of the Maven build section.
static String SECTION_BUILD_MISC
          The name of the miscellaneous build section.
static String SECTION_BUILD_RUNTIME
          The name of the runtime build section.
static String SECTION_BUILD_SCM
          The name of the SCM section.
static String SECTION_PROJECT
          The name of the project section.
static Set<String> STANDARD_PROPERTIES
          The set of standard keys known to be rendered in sections.
 
Method Summary
static Properties calcNonStandardProperties(Properties buildMetaDataProperties, List<Property> userProperties)
          Calculates the non standard properties relevant for the misc section.
static boolean isIntendedForMiscSection(String name)
          Checks if the given property is rejected from being displayed in the misc section of a report.
static String prettify(String string)
          Prettifies a multi value string that contains brackets.
static String prettifyFilesValue(Object value)
          Prettifies a value string that contains brackets.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SECTION_BUILD_SCM

public static final String SECTION_BUILD_SCM
The name of the SCM section.

The value of this constant is "build.scm".

Constant Field Value:
"build.scm"

SECTION_ARTIFACT

public static final String SECTION_ARTIFACT
The name of the artifact section.

The value of this constant is "build.artifact".

Constant Field Value:
"build.artifact"

SECTION_BUILD_DATE

public static final String SECTION_BUILD_DATE
The name of the build date section.

The value of this constant is "build.timeAndDate".

Constant Field Value:
"build.timeAndDate"

SECTION_BUILD_RUNTIME

public static final String SECTION_BUILD_RUNTIME
The name of the runtime build section.

The value of this constant is "build.runtime".

Constant Field Value:
"build.runtime"

SECTION_BUILD_JAVA

public static final String SECTION_BUILD_JAVA
The name of the Java build section.

The value of this constant is "build.java".

Constant Field Value:
"build.java"

SECTION_BUILD_MAVEN

public static final String SECTION_BUILD_MAVEN
The name of the Maven build section.

The value of this constant is "build.maven".

Constant Field Value:
"build.maven"

SECTION_BUILD_MISC

public static final String SECTION_BUILD_MISC
The name of the miscellaneous build section.

The value of this constant is "build.misc".

Constant Field Value:
"build.misc"

SECTION_PROJECT

public static final String SECTION_PROJECT
The name of the project section.

The value of this constant is "project".

Constant Field Value:
"project"

PROP_NAME_SCM_URL

public static final String PROP_NAME_SCM_URL
The name of the project property that stores the URL to the SCM server.

The value of this constant is "build.scmRevision.url".

Constant Field Value:
"build.scmRevision.url"

PROP_NAME_SCM_REVISION_ID

public static final String PROP_NAME_SCM_REVISION_ID
The name of the project property that stores the revision number provided by the SCM.

The value of this constant is "build.scmRevision.id".

Constant Field Value:
"build.scmRevision.id"

PROP_NAME_SCM_REVISION_DATE

public static final String PROP_NAME_SCM_REVISION_DATE
The name of the project property that stores the date the revision number was set.

The value of this constant is "build.scmRevision.date".

Constant Field Value:
"build.scmRevision.date"

PROP_NAME_SCM_LOCALLY_MODIFIED

public static final String PROP_NAME_SCM_LOCALLY_MODIFIED
The name of the project property that stores the information if the local sources are modified.

The value of this constant is "build.scmLocallyModified".

Constant Field Value:
"build.scmLocallyModified"

PROP_NAME_SCM_LOCALLY_MODIFIED_FILES

public static final String PROP_NAME_SCM_LOCALLY_MODIFIED_FILES
The name of the project property that stores the files that are locally modified.

The value of this constant is "build.scmLocallyModified.files".

Constant Field Value:
"build.scmLocallyModified.files"

PROP_NAME_BUILD_DATE

public static final String PROP_NAME_BUILD_DATE
The name of the project property that stores the formatted build date.

The value of this constant is "build.date".

Constant Field Value:
"build.date"

PROP_NAME_BUILD_TIMESTAMP

public static final String PROP_NAME_BUILD_TIMESTAMP
The name of the project property that stores the build timestamp.

The value of this constant is "build.timestamp.millis".

Constant Field Value:
"build.timestamp.millis"

PROP_NAME_BUILD_DATE_PATTERN

public static final String PROP_NAME_BUILD_DATE_PATTERN
The name of the project property that stores the pattern of the build date. This way it is easy for the reading client to parse the build date.

The value of this constant is "build.date.pattern".

Constant Field Value:
"build.date.pattern"

PROP_NAME_GROUP_ID

public static final String PROP_NAME_GROUP_ID
The name of the project property that stores the group ID as read from the POM.

The value of this constant is "build.groupId".

Constant Field Value:
"build.groupId"

PROP_NAME_ARTIFACT_ID

public static final String PROP_NAME_ARTIFACT_ID
The name of the project property that stores the artifact ID as read from the POM.

The value of this constant is "build.artifactId".

Constant Field Value:
"build.artifactId"

PROP_NAME_VERSION

public static final String PROP_NAME_VERSION
The name of the project property that stores the version as read from the POM.

The value of this constant is "build.version".

Constant Field Value:
"build.version"

PROP_NAME_FULL_VERSION

public static final String PROP_NAME_FULL_VERSION
The name of the project property that stores the full version that may include the version, the build date, the build number and the revision number.

The value of this constant is "build.version.full".

Constant Field Value:
"build.version.full"

PROP_NAME_BUILD_YEAR

public static final String PROP_NAME_BUILD_YEAR
The name of the project property that stores the build year.

The value of this constant is "build.year".

Constant Field Value:
"build.year"

PROP_NAME_BUILD_DURATION

public static final String PROP_NAME_BUILD_DURATION
The name of the project property that stores the duration of the build in milliseconds. The duration is taken at the end of the build when the last plugin is run. The plugin cannot guarantee that there is no work done afterwards. The install and deploy phase are not measured since the plugin is running in the verify phase.

The value of this constant is "build.duration".

Constant Field Value:
"build.duration"

PROP_NAME_COPYRIGHT_YEAR

public static final String PROP_NAME_COPYRIGHT_YEAR
The name of the project property that stores the copyright year. The copyright year is either the inception year (if inception and build year are the same) or the period starting with the inception year and ending with the build year.

The value of this constant is "build.copyright.year".

Constant Field Value:
"build.copyright.year"

DEFAULT_DATE_PATTERN

public static final String DEFAULT_DATE_PATTERN
The default pattern for the (locale independent) build date.

The value of this constant is "dd.MM.yyyy".

Constant Field Value:
"dd.MM.yyyy"

PROP_NAME_BUILD_USER

public static final String PROP_NAME_BUILD_USER
The name of the project property that stores the build user. This is the person or system that run the build. It is either a configured value or the value of the system property user.name.

The value of this constant is "build.user".

Constant Field Value:
"build.user"

PROP_NAME_HOSTNAME

public static final String PROP_NAME_HOSTNAME
The name of the property that stores the name of the host the build has been run on.

The value of this constant is "build.host.name".

Constant Field Value:
"build.host.name"

PROP_NAME_OS_NAME

public static final String PROP_NAME_OS_NAME
The name of the property that stores the name of the operating system the build has been run on.

The value of this constant is "build.os.name".

Constant Field Value:
"build.os.name"

PROP_NAME_OS_ARCH

public static final String PROP_NAME_OS_ARCH
The name of the property that stores the architecture of the operating system the build has been run on.

The value of this constant is "build.os.arch".

Constant Field Value:
"build.os.arch"

PROP_NAME_OS_VERSION

public static final String PROP_NAME_OS_VERSION
The name of the property that stores the version of the operating system the build has been run on.

The value of this constant is "build.os.version".

Constant Field Value:
"build.os.version"

PROP_NAME_JAVA_RUNTIME_NAME

public static final String PROP_NAME_JAVA_RUNTIME_NAME
The name of the property that stores the name of Java runtime being executed for the build.

The value of this constant is "build.java.runtime.name".

Constant Field Value:
"build.java.runtime.name"

PROP_NAME_JAVA_RUNTIME_VERSION

public static final String PROP_NAME_JAVA_RUNTIME_VERSION
The name of the property that stores the version of Java runtime being executed for the build.

The value of this constant is "build.java.runtime.version".

Constant Field Value:
"build.java.runtime.version"

PROP_NAME_JAVA_VENDOR

public static final String PROP_NAME_JAVA_VENDOR
The name of the property that stores the name of the vendor of Java being executed for the build.

The value of this constant is "build.java.vendor".

Constant Field Value:
"build.java.vendor"

PROP_NAME_JAVA_VM

public static final String PROP_NAME_JAVA_VM
The name of the property that stores the name of the Java VM being executed for the build.

The value of this constant is "build.java.vm".

Constant Field Value:
"build.java.vm"

PROP_NAME_JAVA_COMPILER

public static final String PROP_NAME_JAVA_COMPILER
The name of the property that stores the name of the Java compiler being executed for the build.

The value of this constant is "build.java.compiler".

Constant Field Value:
"build.java.compiler"

PROP_NAME_MAVEN_VERSION

public static final String PROP_NAME_MAVEN_VERSION
The name of the property that stores the version of Maven being executed for the build.

The value of this constant is "build.maven.version".

Constant Field Value:
"build.maven.version"

PROP_NAME_MAVEN_GOALS

public static final String PROP_NAME_MAVEN_GOALS
The name of the property that stores the goals given on the command line for the build.

The value of this constant is "build.maven.execution.goals".

Constant Field Value:
"build.maven.execution.goals"

PROP_NAME_MAVEN_CMDLINE

public static final String PROP_NAME_MAVEN_CMDLINE
The name of the property that stores the command line to start the build.

The value of this constant is "build.maven.execution.cmdline".

Constant Field Value:
"build.maven.execution.cmdline"

PROP_NAME_MAVEN_OPTS

public static final String PROP_NAME_MAVEN_OPTS
The name of the property that stores the Maven opts set in the environment.

The value of this constant is "build.maven.execution.opts".

Constant Field Value:
"build.maven.execution.opts"

PROP_NAME_JAVA_OPTS

public static final String PROP_NAME_JAVA_OPTS
The name of the property that stores the Java opts set in the environment.

The value of this constant is "build.maven.execution.java.opts".

Constant Field Value:
"build.maven.execution.java.opts"

PROP_NAME_MAVEN_IS_EXECUTION_ROOT

public static final String PROP_NAME_MAVEN_IS_EXECUTION_ROOT
The name of the property that flags if the artifact is build within the project that is the execution root.

The value of this constant is "build.maven.execution.isRoot".

Constant Field Value:
"build.maven.execution.isRoot"

PROP_NAME_MAVEN_EXECUTION_PROJECT

public static final String PROP_NAME_MAVEN_EXECUTION_PROJECT
The name of the property that contains the name of the execution project.

The value of this constant is "build.maven.execution.project".

Constant Field Value:
"build.maven.execution.project"

PROP_NAME_MAVEN_FILTERS

public static final String PROP_NAME_MAVEN_FILTERS
The name of the property that contains the name of the filters being registered for the build.

The value of this constant is "build.maven.execution.filters".

Constant Field Value:
"build.maven.execution.filters"

MAVEN_EXECUTION_PROPERTIES_PREFIX

public static final String MAVEN_EXECUTION_PROPERTIES_PREFIX
The prefix used to provide execution properties to the build properties file.

The value of this constant is "execution.property".

Constant Field Value:
"execution.property"

PROP_NAME_MAVEN_ACTIVE_PROFILES

public static final String PROP_NAME_MAVEN_ACTIVE_PROFILES
The name of the property that contains names of active profiles during the build.

The value of this constant is "build.maven.execution.profiles.active".

Constant Field Value:
"build.maven.execution.profiles.active"

MAVEN_ACTIVE_PROFILE_PREFIX

public static final String MAVEN_ACTIVE_PROFILE_PREFIX
The prefix used to provide active profile information of the build.

The value of this constant is "build.maven.execution.profile.active".

Constant Field Value:
"build.maven.execution.profile.active"

PROP_NAME_PROJECT_HOMEPAGE

public static final String PROP_NAME_PROJECT_HOMEPAGE
The name of the property that stores URL of the project homepage.

The value of this constant is "project.page.home.url".

Constant Field Value:
"project.page.home.url"

PROP_NAME_PROJECT_OPS

public static final String PROP_NAME_PROJECT_OPS
The name of the property that stores URL to a page useful for operations teams.

The value of this constant is "project.page.ops.url".

Constant Field Value:
"project.page.ops.url"

PROP_NAME_PROJECT_CATEGORY

public static final String PROP_NAME_PROJECT_CATEGORY
The name of the property that stores a value to categorize the project.

The value of this constant is "project.category".

Constant Field Value:
"project.category"

PROP_NAME_PROJECT_SUBCATEGORY

public static final String PROP_NAME_PROJECT_SUBCATEGORY
The name of the property that stores a value to further categorize the project.

The value of this constant is "project.subcategory".

Constant Field Value:
"project.subcategory"

PROP_NAME_PROJECT_TAGS

public static final String PROP_NAME_PROJECT_TAGS
The name of the property that stores a comma separated list of tags to categorize the project.

The value of this constant is "project.tags".

Constant Field Value:
"project.tags"

REPORT_PROPERTIES

public static final List<Constant.Section> REPORT_PROPERTIES
List of properties, organized in sections, relevant to the build report. The order of properties in this list determines the order of the properties listed in the report.


STANDARD_PROPERTIES

public static final Set<String> STANDARD_PROPERTIES
The set of standard keys known to be rendered in sections. This list allows to render properties within a separate section that have not yet been rendered.

Method Detail

isIntendedForMiscSection

public static boolean isIntendedForMiscSection(String name)
Checks if the given property is rejected from being displayed in the misc section of a report.

Parameters:
name - the name of the property to check.
Returns:
true if the property is to be rendered in a misc section, false otherwise.

calcNonStandardProperties

public static Properties calcNonStandardProperties(Properties buildMetaDataProperties,
                                                   List<Property> userProperties)
Calculates the non standard properties relevant for the misc section.

Parameters:
buildMetaDataProperties - the build meta data.
userProperties - the list of a system properties or environment variables to be selected by the user to include into the build meta data properties.
Returns:
the non standard properties.

prettify

public static String prettify(String string)
Prettifies a multi value string that contains brackets. It simply removes the brackets.

Parameters:
string - the string to prettify.
Returns:
the prettified string.

prettifyFilesValue

public static String prettifyFilesValue(Object value)
Prettifies a value string that contains brackets. It simply removes the brackets.

Parameters:
value - the object whose string representation is to be prettified.
Returns:
the prettified string.


Copyright © 2006-2012 Kronseder & Reiner GmbH - smartics. All Rights Reserved.