Annotation Interface Version
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionString[]
Sets paths to resources that provide the version informationboolean
Sets whether to suppress this help section if there is an error obtaining the version information. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionString[]
Any additional properties from which information should be obtainedString[]
The titles for the additional properties specified byadditionalProperties()
used to present this information in generated help outputSets the property used to find build information (if any)Sets the property used to find the component information (if any)Sets the property used to find build date information (if any)Class<? extends ResourceLocator>[]
Resource locators used to find the properties files specified insources()
boolean
Whether to display the version information in a tabular formatSets the property used to find version information (if any)
-
Element Details
-
sources
String[] sourcesSets paths to resources that provide the version informationWhen this annotation is converted into a help section these are the files that are scanned for the version information used to produce the Version help section. Files are located using the resource locators specified by
sourceLocators()
which by default looks for resources on the classpath then as files. You can add the prefixesclasspath:
orfile://
to your source paths to force a specific location to be usedEach source will be provided as a separate list/table row within the help section depending on the setting of the
tabular()
field.Sources are loaded using
Properties.load(java.io.InputStream)
which supports either normal Java properties format (key value pairs separated by=
with one per line) or Java Manifest files.- Returns:
- Sources for version information
-
componentProperty
String componentPropertySets the property used to find the component information (if any)- Returns:
- Component property
- Default:
"component"
-
versionProperty
String versionPropertySets the property used to find version information (if any)- Returns:
- Version property
- Default:
"version"
-
buildProperty
String buildPropertySets the property used to find build information (if any)- Returns:
- Build property
- Default:
"build"
-
dateProperty
String datePropertySets the property used to find build date information (if any)- Returns:
- Build Date property
- Default:
"buildDate"
-
additionalProperties
String[] additionalPropertiesAny additional properties from which information should be obtained- Returns:
- Additional properties
- Default:
{}
-
additionalTitles
String[] additionalTitlesThe titles for the additional properties specified byadditionalProperties()
used to present this information in generated help output- Returns:
- Additional titles
- Default:
{}
-
suppressOnError
boolean suppressOnErrorSets whether to suppress this help section if there is an error obtaining the version information.When set to
false
a runtime error will be thrown if this annotation is used and the version information cannot be successfully obtained. When set totrue
then if the version information cannot be obtained the help section will either be suppressed if no information was found or if some information was found then partial information is shown.- Returns:
- True if errors in obtaining version information are suppressed
-
tabular
boolean tabularWhether to display the version information in a tabular format- Returns:
- True if tabular format, false for list format
- Default:
false
-
sourceLocators
Class<? extends ResourceLocator>[] sourceLocatorsResource locators used to find the properties files specified insources()
- Returns:
- Resource locators to use
- Default:
{com.github.rvesse.airline.parser.resources.ClasspathLocator.class, com.github.rvesse.airline.parser.resources.ModulePathLocator.class, com.github.rvesse.airline.parser.resources.FileLocator.class}
-