class InvokerProperties
extends java.lang.Object
invoker.properties
.Modifier and Type | Class and Description |
---|---|
private static class |
InvokerProperties.InvocationProperty |
Modifier and Type | Field and Description |
---|---|
private java.util.Properties |
properties
The invoker properties being wrapped.
|
Constructor and Description |
---|
InvokerProperties(java.util.Properties properties)
Creates a new facade for the specified invoker properties.
|
Modifier and Type | Method and Description |
---|---|
void |
configureInvocation(org.apache.maven.shared.invoker.InvocationRequest request,
int index)
Configures the specified invocation request from these invoker properties.
|
private java.lang.String |
get(InvokerProperties.InvocationProperty prop,
int index) |
(package private) java.lang.String |
get(java.lang.String key,
int index)
Gets a value from the invoker properties.
|
java.lang.String |
getJobDescription()
Gets the description of the corresponding build job.
|
java.lang.String |
getJobName()
Gets the name of the corresponding build job.
|
java.lang.String |
getJreVersion()
Gets the specification of JRE versions on which this build job should be run.
|
java.lang.String |
getMavenVersion()
Gets the specification of Maven versions on which this build job should be run.
|
java.lang.String |
getOsFamily()
Gets the specification of OS families on which this build job should be run.
|
java.util.Properties |
getProperties()
Gets the invoker properties being wrapped.
|
java.lang.String |
getSystemPropertiesFile(int index)
Gets the path to the properties file used to set the system properties for the specified invocation.
|
boolean |
isExpectedResult(int exitCode,
int index)
Checks whether the specified exit code matches the one expected for the given invocation.
|
boolean |
isInvocationDefined(int index)
Determines whether these invoker properties contain a build definition for the specified invocation index.
|
private final java.util.Properties properties
public InvokerProperties(java.util.Properties properties)
properties
- The invoker properties to wrap, may be null
if none.public java.util.Properties getProperties()
null
.public java.lang.String getJobName()
public java.lang.String getJobDescription()
public java.lang.String getJreVersion()
public java.lang.String getMavenVersion()
public java.lang.String getOsFamily()
public boolean isInvocationDefined(int index)
index
- The one-based index of the invocation to check for, must not be negative.true
if the invocation with the specified index is defined, false
otherwise.public void configureInvocation(org.apache.maven.shared.invoker.InvocationRequest request, int index)
request
- The invocation request to configure, must not be null
.index
- The one-based index of the invocation to configure, must not be negative.public boolean isExpectedResult(int exitCode, int index)
exitCode
- The exit code of the Maven invocation to check.index
- The index of the invocation for which to check the exit code, must not be negative.true
if the exit code is zero and a success was expected or if the exit code is non-zero and
a failue was expected, false
otherwise.public java.lang.String getSystemPropertiesFile(int index)
index
- The index of the invocation for which to check the exit code, must not be negative.null
if not set.java.lang.String get(java.lang.String key, int index)
key.index
will be queried. If this property does not exist, the value of the property named
key
will finally be returned.key
- The (base) key for the invoker property to lookup, must not be null
.index
- The index of the invocation for which to retrieve the value, must not be negative.null
if not defined.private java.lang.String get(InvokerProperties.InvocationProperty prop, int index)