Package aQute.bnd.build

Examples of aQute.bnd.build.Workspace


        String name = url.getPath().substring(idx + 1);
        return name.substring(0, name.lastIndexOf('.'));
    }

  public static void refreshProject(Project project) throws Exception {
    Workspace ws = getWorkspace();
    if (ws == null) {
      return;
    }
    IWorkspace workspace = ResourcesPlugin.getWorkspace();
    IWorkspaceRoot root = workspace.getRoot();
View Full Code Here


    return (Workspace) workspaceTracker.getService();
  }

  public static List<RepositoryPlugin> getRepositories() {

    Workspace ws = (Workspace)workspaceTracker.getService();
    if (ws == null) {
      return Collections.emptyList();
    }

    return ws.getPlugins(RepositoryPlugin.class);
  }
View Full Code Here

  public Workspace getWorkspace(MavenSession session) throws MojoFailureException {

    File executionRoot = new File(session.getExecutionRootDirectory());

    Workspace workspace = workspaces.get(session);

    if (workspace != null)
      return workspace;

    try {
      File currentFolder = new File("cnf").getCanonicalFile();
      if (currentFolder.exists() && currentFolder.isDirectory())
        workspace = new Workspace(currentFolder.getParentFile());
      else {
        File sessionRoot = new File(executionRoot, "/cnf").getCanonicalFile();
        if (sessionRoot.exists() && sessionRoot.isDirectory())
          workspace = new Workspace(sessionRoot.getParentFile());
        else {
          File upFolder = new File("../cnf").getCanonicalFile();
          if (upFolder.exists() && upFolder.isDirectory())
            workspace = new Workspace(upFolder.getParentFile());
        }
      }
    } catch (IOException e) {
      throw new MojoFailureException("Failed to access workspace folder", e);
    } catch (Exception e) {
View Full Code Here

TOP

Related Classes of aQute.bnd.build.Workspace

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.