Hey there :)
It's me again, I have a question about the hasRepository method in
the MavenDependencyFacet.
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
Max
@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;
}