<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-15">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hey there :)<br>
<br>
It's me again, I have a question about the hasRepository method in
the MavenDependencyFacet.<br>
<br>
Why do you remove the repository if its found in the project pom?<br>
I expect the method to deliver true or false, not to manipulate the
project pom.<br>
<br>
Is this a bug or something with another sense?<br>
<br>
Best regards<br>
<br>
Max<br>
<br>
@Override<br>
public boolean hasRepository(final String url)<br>
{<br>
if (url != null)<br>
{<br>
MavenCoreFacet maven =
project.getFacet(MavenCoreFacet.class);<br>
Model pom = maven.getPOM();<br>
List<Repository> repositories =
pom.getRepositories();<br>
for (Repository repo : repositories)<br>
{<br>
if (repo.getUrl().trim().equals(url.trim()))<br>
{<br>
<b> repositories.remove(repo);<br>
maven.setPOM(pom);</b><br>
return true;<br>
}<br>
}<br>
}<br>
return false;<br>
}<br>
</body>
</html>