Class AbstractLauncher
java.lang.Object
org.jdrupes.builder.startup.AbstractLauncher
- All Implemented Interfaces:
Launcher
- Direct Known Subclasses:
BootstrapLauncher, DirectLauncher
A default implementation of a
Launcher.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.apache.commons.cli.CommandLineThe command line.protected static final PropertiesThe JDrupes Builder properties read from the file.jdbld.propertiesin the root project.protected final LoggerThe log. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final org.apache.commons.cli.OptionsReturn the handled options.protected voidfindProjects(ClassLoader clsLoader, List<Class<? extends RootProject>> rootProjects, List<Class<? extends Project>> subprojects) Find projects.protected final <T> TunwrapBuildException(Callable<T> todo) A utility method that invokes the callable.
-
Field Details
-
jdbldProps
The JDrupes Builder properties read from the file.jdbld.propertiesin the root project. -
log
-
commandLine
The command line.
-
-
Constructor Details
-
AbstractLauncher
Instantiates a new abstract launcher.- Parameters:
args- the command line arguments
-
-
Method Details
-
baseOptions
Return the handled options.- Returns:
- the options
-
findProjects
protected void findProjects(ClassLoader clsLoader, List<Class<? extends RootProject>> rootProjects, List<Class<? extends Project>> subprojects) Find projects. The classpath is scanned for classes that implementProjectbut do not implementMasked.- Parameters:
clsLoader- the cls loaderrootProjects- classes that implementRootProjectsubprojects- classes that implementProjectbut notRootProject
-
unwrapBuildException
A utility method that invokes the callable. If an exception occurs during the invocation, it unwraps the causes until it finds the rootBuildException, prints the message from this exception and exits.- Type Parameters:
T- the generic type- Parameters:
todo- the todo- Returns:
- the t
-