}
@Override
public void removeDependency(final Dependency dep)
{
MavenFacet maven = getOrigin().getFacet(MavenFacet.class);
Model pom = maven.getPOM();
List<Dependency> dependencies = MavenDependencyAdapter.fromMavenList(pom.getDependencies());
List<Dependency> toBeRemoved = new ArrayList<Dependency>();
for (Dependency dependency : dependencies)
{
if (Dependencies.areEquivalent(dependency, resolveProperties(dep)))
{
toBeRemoved.add(dependency);
}
}
dependencies.removeAll(toBeRemoved);
pom.setDependencies(MavenDependencyAdapter.toMavenList(dependencies));
maven.setPOM(pom);
}