Package aQute.bnd.build

Examples of aQute.bnd.build.ProjectLauncher


        if (!bundleFolder.exists() && !bundleFolder.mkdirs()) {
            status.add(new Status(IStatus.ERROR, Plugin.PLUGIN_ID, 0, "Unable to create folder.", null));
            return status;
        }

        ProjectLauncher launcher = null;
        try {
            launcher = bndProject.getProjectLauncher();
        } catch (Exception e) {
            status.add(new Status(IStatus.ERROR, Plugin.PLUGIN_ID, 0, "Error getting project launcher.", e));
            return status;
View Full Code Here


    }

    private IStatus generateJar(String jarPath) {
        MultiStatus status = new MultiStatus(Plugin.PLUGIN_ID, 0, "Errors occurred during exporting.", null);
        try {
            ProjectLauncher launcher = bndProject.getProjectLauncher();
            Jar jar = launcher.executable();
            jar.write(jarPath);
        } catch (Exception e) {
            status.add(new Status(IStatus.ERROR, Plugin.PLUGIN_ID, 0, "Error generating executable JAR.", e));
        }
        return status;
View Full Code Here

    }

    @Override
    public void launch(ILaunchConfiguration configuration, String mode, final ILaunch launch, IProgressMonitor monitor) throws CoreException {
        // Register listener to clean up temp files on exit of launched JVM
        final ProjectLauncher launcher = getProjectLauncher();
        IDebugEventSetListener listener = new IDebugEventSetListener() {
            public void handleDebugEvents(DebugEvent[] events) {
                for (DebugEvent event : events) {
                    if (event.getKind() == DebugEvent.TERMINATE) {
                        Object source = event.getSource();
                        if (source instanceof IProcess) {
                            ILaunch processLaunch = ((IProcess) source).getLaunch();
                            if (processLaunch == launch) {
                                // Not interested in any further events =>
                                // unregister this listener
                                DebugPlugin.getDefault().removeDebugEventListener(this);

                                // Cleanup. Guard with a draconian catch because
                                // changes in the ProjectLauncher API
                                // *may* cause LinkageErrors.
                                try {
                                    launcher.cleanup();
                                } catch (Throwable t) {
                                    logger.logError("Error cleaning launcher temporary files", t);
                                }
                            }
                        }
View Full Code Here

TOP

Related Classes of aQute.bnd.build.ProjectLauncher

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.