public class IlrAutomator
extends java.lang.Object
implements org.eclipse.equinox.app.IApplication
A class intended for command line project automation. It can import a list of projects into a workspace, apply an extension model and clean/build them to generate ruleset archives.
The class supports command line arguments defined in the IlrBuildCommandLineArguments class. See the details of IlrBuildCommandLineArguments for a description of each command line argument.
The example below (for Linux) imports two projects into the workspace (the Java project rulesetextraction_xom and the Rule Project rulesetextraction_rules). The rulesetextraction_rules project is then cleaned and built, using the build options BUILD_CHECK_IRL and BUILD_INCLUDES_RULE_VALIDATION before the ruleset archive is generated.
-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}
-importPath /sample/workspace/rulesetextraction_xom:/sample/workspace/rulesetextraction_rules
-cleanBuild
-buildOptions BUILD_CHECK_IRL|BUILD_INCLUDES_RULE_VALIDATION
rulesetextraction_rules
This class implements the IApplication Eclipse interface
and can be automatically invoked when Eclipse starts (in either GUI or headless mode)
by specifying the -application argument.
IlrBuildCommandLineArguments| Modifier and Type | Field and Description |
|---|---|
static int |
ERROR_BAD_ARGUMENTS
A return value (2) indicating that the arguments to the IApplication are invalid
|
static int |
ERROR_BUILD_FAILED
A return value (4) indicating that one of the projects failed to build and the build
was stopped because the failFast flag had been set
|
static int |
ERROR_EXCEPTION
A return value (1) indicating that an exception was thrown while running the IApplication
|
static int |
USAGE_REQUESTED
A return value (3) indicating that the user requested usage information to be printed
|
| Constructor and Description |
|---|
IlrAutomator() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
run(java.lang.String[] args)
Executes the build cycle on the list of rule projects specified in the args.
|
java.lang.Object |
start(org.eclipse.equinox.app.IApplicationContext context)
The entry point for Eclipse IApplication implementations.
|
void |
stop()
Stop method for the IApplication, called by the framework.
|
public static final int ERROR_EXCEPTION
public static final int ERROR_BAD_ARGUMENTS
public static final int USAGE_REQUESTED
public static final int ERROR_BUILD_FAILED
public java.lang.Object start(org.eclipse.equinox.app.IApplicationContext context)
throws java.lang.Exception
start in interface org.eclipse.equinox.app.IApplicationjava.lang.Exceptionpublic java.lang.Object run(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exceptionargs - the command line argumentspublic void stop()
stop in interface org.eclipse.equinox.app.IApplication© Copyright IBM Corp. 1987, 2017