[forge-issues] [JBoss JIRA] (FORGE-433) MavenDependencyFacet.hasRepository() removes repository if it exists.

Max Schwaab (JIRA) jira-events at lists.jboss.org
Tue Jan 17 13:27:18 EST 2012


    [ https://issues.jboss.org/browse/FORGE-433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12659927#comment-12659927 ] 

Max Schwaab commented on FORGE-433:
-----------------------------------

Thanks for the really quick fix and response :)

Cheers

Max
                
> MavenDependencyFacet.hasRepository() removes repository if it exists.
> ---------------------------------------------------------------------
>
>                 Key: FORGE-433
>                 URL: https://issues.jboss.org/browse/FORGE-433
>             Project: Forge
>          Issue Type: Bug
>          Components: Maven Integration
>    Affects Versions: 1.0.0.Beta5
>            Reporter: Lincoln Baxter III
>            Assignee: Lincoln Baxter III
>             Fix For: 1.0.0.CR1
>
>
> {code}
> @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;
>    }{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the forge-issues mailing list