code: protected void updateDependency(Dependency value, String xmlTag, Counter counter, Element element)
     {
        Element root = element;
        Counter innerCount = new Counter(counter.getDepth() + 1);
        findAndReplaceSimpleElement(innerCount, root, "groupId", value.getGroupId(), null);
        findAndReplaceSimpleElement(innerCount, root, "artifactId", value.getArtifactId(), null);
        findAndReplaceSimpleElement(innerCount, root, "version", value.getVersion(), null);
        findAndReplaceSimpleElement(innerCount, root, "type", value.getType(), "jar");
        findAndReplaceSimpleElement(innerCount, root, "classifier", value.getClassifier(), null);
        findAndReplaceSimpleElement(innerCount, root, "scope", value.getScope(), null);
        findAndReplaceSimpleElement(innerCount, root, "systemPath", value.getSystemPath(), null);
        iterateExclusion(innerCount, root, value.getExclusions(), "exclusions", "exclusion");
        findAndReplaceSimpleElement(innerCount, root, "optional",
                 (value.isOptional() == false) ? null : String.valueOf(value.isOptional()), "false");
     }
docs: Method updateDependency.
  
  @param value
  @param element
  @param counter
  @param xmlTag