Class DefaultBuildContext
java.lang.Object
org.jdrupes.builder.core.DefaultBuildContext
- All Implemented Interfaces:
BuildContext
A context for building.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe key for specifying the builder directory in the properties file. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.commons.cli.CommandLineThe command line as processed by Apache Commons CLI.executor()Returns the executor service used by this build to create futures.voidexecutor(ExecutorService executor) Sets the executor service used by this build to create futures.get(ResourceProvider provider, ResourceRequest<T> request) Obtains the resource stream for the given resource from the given provider.The relative path to the JDrupes Builder directory from a project directory.Return the value of the given property.
-
Field Details
-
JDBLD_DIRECTORY
The key for specifying the builder directory in the properties file.- See Also:
-
-
Method Details
-
executor
Returns the executor service used by this build to create futures.- Returns:
- the executor service
-
executor
Sets the executor service used by this build to create futures.- Parameters:
executor- the executor
-
get
Description copied from interface:BuildContextObtains the resource stream for the given resource from the given provider. The result from invoking the provider is evaluated asynchronously and cached. Only when the returned stream is terminated will the invocation block until the result from the provider becomes available.- Specified by:
getin interfaceBuildContext- Type Parameters:
T- the resource type- Parameters:
provider- the providerrequest- the request- Returns:
- the results
-
jdbldDirectory
Description copied from interface:BuildContextThe relative path to the JDrupes Builder directory from a project directory.- Specified by:
jdbldDirectoryin interfaceBuildContext- Returns:
- the path
-
commandLine
Description copied from interface:BuildContextThe command line as processed by Apache Commons CLI.- Specified by:
commandLinein interfaceBuildContext- Returns:
- the string[]
-
property
Description copied from interface:BuildContextReturn the value of the given property. Properties are defined by (in order of precedence):
- command line options
- the file
.jdbld.propertiesin the directory of the root project - the file
.jdbld/jdbld.propertiesin the user's home directory
- Specified by:
propertyin interfaceBuildContext- Parameters:
name- the name- Returns:
- the string
-