class InvokerProperties
extends java.lang.Object
invoker.properties
.Modifier and Type | Class and Description |
---|---|
private static class |
InvokerProperties.InvocationProperty |
private static class |
InvokerProperties.SelectorProperty |
Modifier and Type | Field and Description |
---|---|
private java.util.Properties |
properties
The invoker properties being wrapped.
|
private static java.lang.String |
SELECTOR_PREFIX |
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 |
getJreVersion(int index)
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 |
getMavenVersion(int index) |
java.lang.String |
getOsFamily()
Gets the specification of OS families on which this build job should be run.
|
java.lang.String |
getOsFamily(int index)
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 |
getSettingsFile(int index)
Gets the settings file used for the specified invocation.
|
java.lang.String |
getSystemPropertiesFile(int index)
Gets the path to the properties file used to set the system properties for the specified invocation.
|
int |
getTimeoutInSeconds(int index)
Get timeout to execute the project
|
java.util.Collection<InvokerToolchain> |
getToolchains() |
java.util.Collection<InvokerToolchain> |
getToolchains(int index) |
private java.util.Collection<InvokerToolchain> |
getToolchains(java.util.regex.Pattern p) |
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.
|
boolean |
isSelectorDefined(int index)
Determines whether these invoker properties contain a build definition for the specified selector index.
|
private static final java.lang.String SELECTOR_PREFIX
private final java.util.Properties properties
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 getJreVersion(int index)
public java.lang.String getMavenVersion()
public java.lang.String getMavenVersion(int index)
index
- the selector indexpublic java.lang.String getOsFamily()
public java.lang.String getOsFamily(int index)
index
- the selector indexpublic java.util.Collection<InvokerToolchain> getToolchains()
public java.util.Collection<InvokerToolchain> getToolchains(int index)
private java.util.Collection<InvokerToolchain> getToolchains(java.util.regex.Pattern p)
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 boolean isSelectorDefined(int index)
index
- the indextrue
if the selector 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, must not be negative.null
if not set.public java.lang.String getSettingsFile(int index)
index
- The index of the invocation, must not be negative.null
if not set.public int getTimeoutInSeconds(int index)
index
- index The index of the invocation, must not be negative.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)