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

MavenDependencyFacet.hasRepository() removes repository if it exists.

    Details

      Description

      @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;
         }

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                lincolnthree Lincoln Baxter III
                Reporter:
                lincolnthree Lincoln Baxter III
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: