Package org.eclipse.m2e.core.embedder

Examples of org.eclipse.m2e.core.embedder.MavenRuntime


    }

    public boolean isRuntimeConfigured() throws IOException {
      MavenRuntimeManager runtimeManager = MavenPlugin.getMavenRuntimeManager();
      String path = location.getCanonicalPath();
      MavenRuntime runtime = runtimeManager.getRuntime(path);
      return (runtime != null && runtime.isAvailable());
    }
View Full Code Here


    public IStatus configure(IProgressMonitor monitor) {
      try {
        MavenRuntimeManager runtimeManager = MavenPlugin.getMavenRuntimeManager();

        String path = location.getCanonicalPath();
        MavenRuntime runtime = runtimeManager.getRuntime(path);

        // Get the existing default runtime in case we need to revert later
        oldDefaultRuntime = runtimeManager.getDefaultRuntime();

        // If a runtime at the given path already exists make it the default
        if (runtime != null && runtime.isAvailable()) {
          if (!runtime.equals(oldDefaultRuntime)) {
            runtimeManager.setDefaultRuntime(runtime);
          }
          setConfigured(true);
          return new Status(IStatus.INFO, MavenCorePlugin.PLUGIN_ID, NLS.bind("Maven already configured at {0}", path));
        }
View Full Code Here

    public IStatus unConfigure(IProgressMonitor monitor) {
      try {
        MavenRuntimeManager runtimeManager = MavenPlugin.getMavenRuntimeManager();

        String path = location.getCanonicalPath();
        MavenRuntime runtime = runtimeManager.getRuntime(path);

        // Remove the newly added runtime
        if (runtime != null) {
          List<MavenRuntime> runtimes = runtimeManager.getMavenRuntimes();
          runtimes.remove(runtime);
View Full Code Here

TOP

Related Classes of org.eclipse.m2e.core.embedder.MavenRuntime

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.