Class TestLauncher
java.lang.Object
org.jdrupes.builder.core.LauncherBase
org.jdrupes.builder.startup.AbstractLauncher
org.jdrupes.builder.startup.BuildProjectLauncher
org.jdrupes.builder.startup.TestLauncher
- All Implemented Interfaces:
AutoCloseable, Launcher
An implementation of a
Launcher that launches a build configuration.
It expects that the JDrupes Builder project has already been compiled
and its classes are available on the classpath. It can be used to
launch a build configuration from a unit test where the context is
already is bound.-
Field Summary
Fields inherited from class BuildProjectLauncher
commandLine, jdbldPropsFields inherited from class LauncherBase
scopedBuildContext -
Constructor Summary
ConstructorsConstructorDescriptionTestLauncher(ClassLoader classloader, Path buildRoot, String[] args) Initializes a new test launcher. -
Method Summary
Methods inherited from class BuildProjectLauncher
close, main, regenerateRootProject, rootProject, runCommandsMethods inherited from class AbstractLauncher
addCliProperties, baseOptions, configureLogging, findProjects, formatter, propertiesFromFiles, reportBuildExceptionMethods inherited from class LauncherBase
context, createProjects
-
Constructor Details
-
TestLauncher
Initializes a new test launcher.- Parameters:
classloader- the classloaderbuildRoot- the build rootargs- the args
-
-
Method Details
-
resources
public <T extends Resource> Stream<T> resources(Stream<Project> projects, ResourceRequest<T> request) Description copied from interface:LauncherProvide the requested resources from the given projects, using the context from the root project. The launcher must automatically regenerate the root project ifCleanlinesswas requested.- Specified by:
resourcesin interfaceLauncher- Overrides:
resourcesin classAbstractLauncher- Type Parameters:
T- the requested type- Parameters:
projects- the projectsrequest- the request- Returns:
- the results
-