code: public static void removeDependency(File pom, Dependency dependency, Log logger) throws IOException, XmlPullParserException {
  		Model model = getModelFromPOM(pom, logger);
  
  		for (Iterator<Dependency> it = model.getDependencies().iterator(); it.hasNext();){
  			if (dependenciesEqual(it.next(), dependency)) {
  				it.remove();
  			}
  		}
  		
  		writeModelToPOM(model, pom, logger);
  	}
docs: Remove the Maven dependency from a POM file.
  
  @param pom
  @param dependency
  @throws IOException
  @throws XmlPullParserException