Search in sources :

Example 1 with EquinoxInstallationLaunchConfiguration

use of org.eclipse.sisu.equinox.launching.internal.EquinoxInstallationLaunchConfiguration in project tycho by eclipse.

the class StandaloneDirectorRuntime method newInstallCommand.

@Override
public Command newInstallCommand() {
    return new AbstractDirectorApplicationCommand() {

        @Override
        public void execute() throws DirectorCommandException {
            List<String> programArguments = new ArrayList<>();
            programArguments.add("-application");
            programArguments.add("org.eclipse.equinox.p2.director");
            programArguments.addAll(getDirectorApplicationArguments());
            LaunchConfiguration launch = new EquinoxInstallationLaunchConfiguration(runtimeLocation, programArguments);
            logger.info("Using the standalone p2 Director to install the product...");
            int exitCode = launchHelper.execute(launch, forkedProcessTimeoutInSeconds);
            if (exitCode != 0) {
                throw new DirectorCommandException("Call to p2 director application failed with exit code " + exitCode + ". Program arguments were: " + programArguments + ".");
            }
        }
    };
}
Also used : LaunchConfiguration(org.eclipse.tycho.launching.LaunchConfiguration) EquinoxInstallationLaunchConfiguration(org.eclipse.sisu.equinox.launching.internal.EquinoxInstallationLaunchConfiguration) EquinoxInstallationLaunchConfiguration(org.eclipse.sisu.equinox.launching.internal.EquinoxInstallationLaunchConfiguration) DirectorCommandException(org.eclipse.tycho.p2.tools.director.shared.DirectorCommandException) ArrayList(java.util.ArrayList) AbstractDirectorApplicationCommand(org.eclipse.tycho.p2.tools.director.shared.AbstractDirectorApplicationCommand)

Aggregations

ArrayList (java.util.ArrayList)1 EquinoxInstallationLaunchConfiguration (org.eclipse.sisu.equinox.launching.internal.EquinoxInstallationLaunchConfiguration)1 LaunchConfiguration (org.eclipse.tycho.launching.LaunchConfiguration)1 AbstractDirectorApplicationCommand (org.eclipse.tycho.p2.tools.director.shared.AbstractDirectorApplicationCommand)1 DirectorCommandException (org.eclipse.tycho.p2.tools.director.shared.DirectorCommandException)1