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