Пример #1
0
 /**
  * Returns a RepoPath from an aql result's path fields
  *
  * @param repo repo key
  * @param path path
  * @param name file name
  */
 public static RepoPath fromAql(String repo, String path, String name) {
   if (StringUtils.equals(path, ".")) {
     return RepoPathFactory.create(repo, name);
   } else {
     return RepoPathFactory.create(repo, path + "/" + name);
   }
 }
 private P2Repo resolveLocalP2RepoFromUrl(String url) {
   String rpp = StringUtils.removeStart(url, "local://");
   // rpp = rpp.substring(0, rpp.indexOf('/'));
   RepoPath repoPath = RepoPathFactory.create(rpp);
   LocalRepoDescriptor localRepoDescriptor =
       centralConfig.getMutableDescriptor().getLocalRepositoriesMap().get(repoPath.getRepoKey());
   if (localRepoDescriptor != null) {
     return new P2Repo(null, repoPath.getRepoKey(), url);
   }
   return null;
 }