A core component instance have been create using the com.alpha.pineapple.CoreFactory:
// create core component CoreFactory coreFactory = new CoreFactory(); PineappleCore core = coreFactory.createCore();
This instance of the core component is created with default settings and will:
To execute an operation, invoke the method executeOperation(..):
// get user.home String userHome = System.getProperty( "user.home" ); // define default pineapple runtime directory File runtimeDirectory = new File( userHome, ".pineapple" ); // define modules directory File modulesDirectory = new File( runtimeDirectory, "modules" ); // setup parameters String operation = "run-tests"; String environment = "production-2-a"; String module = "jee-platform-infrastructure-tests" ; // execute operation ExecutionInfo info; info = core.executeOperation( operation, environment, module );
This instance of the core component will:
The method is asynchronous and will return a ExecutionInfo object. To inspect whether operation is finished, invoke the getResult() method and test whether the execution state differs from EXECUTING.