Interface BuildContext
- All Known Implementing Classes:
DefaultBuildContext
public interface BuildContext
The context of a build.
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.commons.cli.CommandLineThe command line as processed by Apache Commons CLI.Returns the relative path from a project directory to the JDrupes Builder directory.Returns the value of the given property.resources(ResourceProvider provider, ResourceRequest<T> request) Obtains the stream of resources of the given type from the given provider.
-
Method Details
-
jdbldDirectory
Returns the relative path from a project directory to the JDrupes Builder directory.- Returns:
- the path
-
commandLine
org.apache.commons.cli.CommandLine commandLine()The command line as processed by Apache Commons CLI.- Returns:
- the parsed command line
-
resources
Obtains the stream of resources of the given type 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.
To avoid duplicate invocations of a non-project provider, any intends are removed from the request before such a provider is invoked.
- Type Parameters:
T- the resource type- Parameters:
provider- the providerrequest- the request- Returns:
- the results
-
property
Returns 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
- Parameters:
name- the namedefaultValue- the default value- Returns:
- the string
-