Class BootstrapProjectLauncher
- All Implemented Interfaces:
Launcher
An implementation of a Launcher that bootstraps the build.
The BootstrapProjectLauncher uses the built-in BootstrapRoot and
BootstrapBuild to assemble a JDrupes Builder Project (the
bootstrap project) that includes the JavaCompiler for compiling
the JDrupes Builder configuration provided by the user.
The launcher then requests the supplied and exposed classes from
the bootstrap project, including in particular the RootProject of
the user's build configuration. The launcher uses these classes as
classpath for creating the BuildProjectLauncher
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.commons.cli.CommandLineThe command line.protected PropertiesThe JDrupes Builder properties read from the file.jdbld.propertiesin the root project. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildBuildProjectLauncher(Class<? extends RootProject> rootPrjCls, String[] args) Executes a build.static voidThe main method.Root project.Methods inherited from class AbstractLauncher
addCliProperties, baseOptions, configureLogging, findProjects, formatter, propertiesFromFiles, reportBuildException, resources
-
Field Details
-
jdbldProps
The JDrupes Builder properties read from the file.jdbld.propertiesin the root project. -
commandLine
The command line.
-
-
Constructor Details
-
BootstrapProjectLauncher
public BootstrapProjectLauncher()Initializes a new bootstrap launcher.
-
-
Method Details
-
buildBuildProjectLauncher
public BuildProjectLauncher buildBuildProjectLauncher(Class<? extends RootProject> rootPrjCls, String[] args) Executes a build. An instance of the class passed as argument is created and used as root project for the build.
Unless the root project is the only project, the root project must declare dependencies, else the subprojects won't be instantiated.
- Parameters:
rootPrjCls- the root projectargs- the args- Returns:
- the builds the project launcher
-
rootProject
-
main
-