Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-433

MavenDependencyFacet.hasRepository() removes repository if it exists.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.0.0.CR1
    • 1.0.0.Beta5
    • Build Tools - Maven
    • None

      @Override
         public boolean hasRepository(final String url)
         {
            if (url != null)
            {
               MavenCoreFacet maven = project.getFacet(MavenCoreFacet.class);
               Model pom = maven.getPOM();
               List<Repository> repositories = pom.getRepositories();
               for (Repository repo : repositories)
               {
                  if (repo.getUrl().trim().equals(url.trim()))
                  {
                     repositories.remove(repo);
                     maven.setPOM(pom);
                     return true;
                  }
               }
            }
            return false;
         }

              lincolnthree Lincoln Baxter III (Inactive)
              lincolnthree Lincoln Baxter III (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: