[forge-users] MavenDependencyFacet.hasRepository

Max Schwaab max.schwaab at akquinet.de
Tue Jan 17 05:48:53 EST 2012

Hey there :)

It's me again, I have a question about the hasRepository method in the 

Why do you remove the repository if its found in the project pom?
I expect the method to deliver true or false, not to manipulate the 
project pom.

Is this a bug or something with another sense?

Best regards


    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()))
                return true;
       return false;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/forge-users/attachments/20120117/95a000b2/attachment.html 

More information about the forge-users mailing list