code: private String getBaseRepoPath(final String path) {
          int pos;
          if (path.contains("local-repo")) {
              pos = path.indexOf("local-repo" + File.separator) + 11;
          } else {
              pos = path.indexOf("repository" + File.separator) + 11;
          }
          if (pos < 0) {
              return path;
          }
          int tmp = path.indexOf(File.separator, pos);
          if (tmp <= 0) {
              return path;
          }
          //below is always true
          //if (tmp > 0) {
          pos = tmp + 1;
          //}
          tmp = path.indexOf(File.separator, pos);
          if (tmp > 0) {
              pos = tmp + 1;
          }
          return path.substring(0, pos);
      }
docs: Attempts to trim a maven repo to a common base path. This is typically
  [drive]\[repo_location]\repository\[path1]\[path2].
  
  @param path the path to trim
  @return a string representing the base path.