[
https://issues.jboss.org/browse/FORGE-433?page=com.atlassian.jira.plugin....
]
Lincoln Baxter III closed FORGE-433.
------------------------------------
Resolution: Done
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