Yep!<br><br>That's a bug: <a href="https://issues.jboss.org/browse/FORGE-433">https://issues.jboss.org/browse/FORGE-433</a> (Just filed and fixed.)<br><br>Thanks!<br>~Lincoln<br><br><div class="gmail_quote">On Tue, Jan 17, 2012 at 5:48 AM, Max Schwaab <span dir="ltr"><<a href="mailto:max.schwaab@akquinet.de">max.schwaab@akquinet.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div 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>
</div>
<br>_______________________________________________<br>
forge-users mailing list<br>
<a href="mailto:forge-users@lists.jboss.org">forge-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/forge-users" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Lincoln Baxter, III<br><a href="http://ocpsoft.com">http://ocpsoft.com</a><br><a href="http://scrumshark.com">http://scrumshark.com</a><br>"Keep it Simple"<br>