You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2010/05/16 15:15:38 UTC

svn commit: r944825 [2/3] - in /maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade: mojo/ShadeMojo.java pom/MavenJDOMWriter.java resource/ApacheNoticeResourceTransformer.java resource/XmlAppendingTransformer.java

Modified: maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/pom/MavenJDOMWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/pom/MavenJDOMWriter.java?rev=944825&r1=944824&r2=944825&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/pom/MavenJDOMWriter.java (original)
+++ maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/pom/MavenJDOMWriter.java Sun May 16 13:15:38 2010
@@ -21,8 +21,8 @@ package org.apache.maven.plugins.shade.p
 
 //package org.apache.maven.model.io.jdom;
 
-  //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
 //---------------------------------/
 
 import java.io.OutputStream;
@@ -87,15 +87,15 @@ import org.jdom.output.XMLOutputter;
 
 /**
  * Class MavenJDOMWriter.
- *
+ * 
  * @version $Revision$ $Date$
  */
-public class MavenJDOMWriter {
-
+public class MavenJDOMWriter
+{
 
-      //--------------------------/
-     //- Class/Member Variables -/
-    //--------------------------/
+    // --------------------------/
+    // - Class/Member Variables -/
+    // --------------------------/
 
     /**
      * Field factory
@@ -107,1866 +107,2089 @@ public class MavenJDOMWriter {
      */
     private String lineSeparator;
 
+    // ----------------/
+    // - Constructors -/
+    // ----------------/
 
-      //----------------/
-     //- Constructors -/
-    //----------------/
-
-    public MavenJDOMWriter() {
+    public MavenJDOMWriter()
+    {
         factory = new DefaultJDOMFactory();
         lineSeparator = "\n";
-    } //-- org.apache.maven.model.io.jdom.MavenJDOMWriter()
-
+    } // -- org.apache.maven.model.io.jdom.MavenJDOMWriter()
 
-      //-----------/
-     //- Methods -/
-    //-----------/
+    // -----------/
+    // - Methods -/
+    // -----------/
 
     /**
      * Method findAndReplaceProperties
-     *
+     * 
      * @param counter
      * @param props
      * @param name
      * @param parent
      */
-    protected Element findAndReplaceProperties(Counter counter, Element parent, String name, Map props)
+    protected Element findAndReplaceProperties( Counter counter, Element parent, String name, Map props )
     {
-        boolean shouldExist = props != null && ! props.isEmpty();
-        Element element = updateElement(counter, parent, name, shouldExist);
-        if (shouldExist) {
+        boolean shouldExist = props != null && !props.isEmpty();
+        Element element = updateElement( counter, parent, name, shouldExist );
+        if ( shouldExist )
+        {
             Iterator it = props.keySet().iterator();
-            Counter innerCounter = new Counter(counter.getDepth() + 1);
-            while (it.hasNext()) {
+            Counter innerCounter = new Counter( counter.getDepth() + 1 );
+            while ( it.hasNext() )
+            {
                 String key = (String) it.next();
-                findAndReplaceSimpleElement(innerCounter, element, key, (String)props.get(key), null);
-                }
-            ArrayList lst = new ArrayList(props.keySet());
+                findAndReplaceSimpleElement( innerCounter, element, key, (String) props.get( key ), null );
+            }
+            ArrayList lst = new ArrayList( props.keySet() );
             it = element.getChildren().iterator();
-            while (it.hasNext()) {
+            while ( it.hasNext() )
+            {
                 Element elem = (Element) it.next();
                 String key = elem.getName();
-                if (!lst.contains(key)) {
+                if ( !lst.contains( key ) )
+                {
                     it.remove();
                 }
             }
         }
         return element;
-    } //-- Element findAndReplaceProperties(Counter, Element, String, Map)
+    } // -- Element findAndReplaceProperties(Counter, Element, String, Map)
 
     /**
      * Method findAndReplaceSimpleElement
-     *
+     * 
      * @param counter
      * @param defaultValue
      * @param text
      * @param name
      * @param parent
      */
-    protected Element findAndReplaceSimpleElement(Counter counter, Element parent, String name, String text, String defaultValue)
+    protected Element findAndReplaceSimpleElement( Counter counter, Element parent, String name, String text,
+                                                   String defaultValue )
     {
-        if (defaultValue != null && text != null && defaultValue.equals(text)) {
-            Element element =  parent.getChild(name, parent.getNamespace());
+        if ( defaultValue != null && text != null && defaultValue.equals( text ) )
+        {
+            Element element = parent.getChild( name, parent.getNamespace() );
             // if exist and is default value or if doesn't exist.. just keep the way it is..
-            if ((element != null && defaultValue.equals(element.getText())) || element == null) {
+            if ( ( element != null && defaultValue.equals( element.getText() ) ) || element == null )
+            {
                 return element;
             }
         }
         boolean shouldExist = text != null && text.trim().length() > 0;
-        Element element = updateElement(counter, parent, name, shouldExist);
-        if (shouldExist) {
-            element.setText(text);
+        Element element = updateElement( counter, parent, name, shouldExist );
+        if ( shouldExist )
+        {
+            element.setText( text );
         }
         return element;
-    } //-- Element findAndReplaceSimpleElement(Counter, Element, String, String, String)
+    } // -- Element findAndReplaceSimpleElement(Counter, Element, String, String, String)
 
     /**
      * Method findAndReplaceSimpleLists
-     *
+     * 
      * @param counter
      * @param childName
      * @param parentName
      * @param list
      * @param parent
      */
-    protected Element findAndReplaceSimpleLists(Counter counter, Element parent, java.util.Collection list, String parentName, String childName)
+    protected Element findAndReplaceSimpleLists( Counter counter, Element parent, java.util.Collection list,
+                                                 String parentName, String childName )
     {
         boolean shouldExist = list != null && list.size() > 0;
-        Element element = updateElement(counter, parent, parentName, shouldExist);
-        if (shouldExist) {
+        Element element = updateElement( counter, parent, parentName, shouldExist );
+        if ( shouldExist )
+        {
             Iterator it = list.iterator();
-            Iterator elIt = element.getChildren(childName, element.getNamespace()).iterator();
-            if (! elIt.hasNext()) elIt = null;
-            Counter innerCount = new Counter(counter.getDepth() + 1);
-            while (it.hasNext()) {
+            Iterator elIt = element.getChildren( childName, element.getNamespace() ).iterator();
+            if ( !elIt.hasNext() )
+                elIt = null;
+            Counter innerCount = new Counter( counter.getDepth() + 1 );
+            while ( it.hasNext() )
+            {
                 String value = (String) it.next();
                 Element el;
-                if (elIt != null && elIt.hasNext()) {
+                if ( elIt != null && elIt.hasNext() )
+                {
                     el = (Element) elIt.next();
-                    if (! elIt.hasNext()) elIt = null;
-                } else {
-                    el = factory.element(childName, element.getNamespace());
-                    insertAtPreferredLocation(element, el, innerCount);
+                    if ( !elIt.hasNext() )
+                        elIt = null;
+                }
+                else
+                {
+                    el = factory.element( childName, element.getNamespace() );
+                    insertAtPreferredLocation( element, el, innerCount );
                 }
-                el.setText(value);
+                el.setText( value );
                 innerCount.increaseCount();
             }
-            if (elIt != null) {
-                while (elIt.hasNext()) {
+            if ( elIt != null )
+            {
+                while ( elIt.hasNext() )
+                {
                     elIt.next();
                     elIt.remove();
                 }
             }
         }
         return element;
-    } //-- Element findAndReplaceSimpleLists(Counter, Element, java.util.Collection, String, String)
+    } // -- Element findAndReplaceSimpleLists(Counter, Element, java.util.Collection, String, String)
 
     /**
      * Method findAndReplaceXpp3DOM
-     *
+     * 
      * @param counter
      * @param dom
      * @param name
      * @param parent
      */
-    protected Element findAndReplaceXpp3DOM(Counter counter, Element parent, String name, Xpp3Dom dom)
+    protected Element findAndReplaceXpp3DOM( Counter counter, Element parent, String name, Xpp3Dom dom )
     {
-        boolean shouldExist = dom != null && (dom.getChildCount() > 0 || dom.getValue() != null);
-        Element element = updateElement(counter, parent, name, shouldExist);
-        if (shouldExist) {
-            replaceXpp3DOM(element, dom, new Counter(counter.getDepth() + 1));
+        boolean shouldExist = dom != null && ( dom.getChildCount() > 0 || dom.getValue() != null );
+        Element element = updateElement( counter, parent, name, shouldExist );
+        if ( shouldExist )
+        {
+            replaceXpp3DOM( element, dom, new Counter( counter.getDepth() + 1 ) );
         }
         return element;
-    } //-- Element findAndReplaceXpp3DOM(Counter, Element, String, Xpp3Dom)
+    } // -- Element findAndReplaceXpp3DOM(Counter, Element, String, Xpp3Dom)
 
     /**
      * Method insertAtPreferredLocation
-     *
+     * 
      * @param parent
      * @param counter
      * @param child
      */
-    protected void insertAtPreferredLocation(Element parent, Element child, Counter counter)
+    protected void insertAtPreferredLocation( Element parent, Element child, Counter counter )
     {
         int contentIndex = 0;
         int elementCounter = 0;
         Iterator it = parent.getContent().iterator();
         Text lastText = null;
         int offset = 0;
-        while (it.hasNext() && elementCounter <= counter.getCurrentIndex()) {
+        while ( it.hasNext() && elementCounter <= counter.getCurrentIndex() )
+        {
             Object next = it.next();
             offset = offset + 1;
-            if (next instanceof Element) {
+            if ( next instanceof Element )
+            {
                 elementCounter = elementCounter + 1;
                 contentIndex = contentIndex + offset;
                 offset = 0;
             }
-            if (next instanceof Text && it.hasNext()) {
-                lastText = (Text)next;
+            if ( next instanceof Text && it.hasNext() )
+            {
+                lastText = (Text) next;
             }
         }
-        if (lastText != null && lastText.getTextTrim().length() == 0) {
-            lastText = (Text)lastText.clone();
-        } else {
+        if ( lastText != null && lastText.getTextTrim().length() == 0 )
+        {
+            lastText = (Text) lastText.clone();
+        }
+        else
+        {
             String starter = lineSeparator;
-            for (int i = 0; i < counter.getDepth(); i++) {
-                starter = starter + "    "; //TODO make settable?
+            for ( int i = 0; i < counter.getDepth(); i++ )
+            {
+                starter = starter + "    "; // TODO make settable?
             }
-            lastText = factory.text(starter);
+            lastText = factory.text( starter );
         }
-        if (parent.getContentSize() == 0) {
-            Text finalText = (Text)lastText.clone();
-            finalText.setText(finalText.getText().substring(0, finalText.getText().length() - "    ".length()));
-            parent.addContent(contentIndex, finalText);
-        }
-        parent.addContent(contentIndex, child);
-        parent.addContent(contentIndex, lastText);
-    } //-- void insertAtPreferredLocation(Element, Element, Counter)
+        if ( parent.getContentSize() == 0 )
+        {
+            Text finalText = (Text) lastText.clone();
+            finalText.setText( finalText.getText().substring( 0, finalText.getText().length() - "    ".length() ) );
+            parent.addContent( contentIndex, finalText );
+        }
+        parent.addContent( contentIndex, child );
+        parent.addContent( contentIndex, lastText );
+    } // -- void insertAtPreferredLocation(Element, Element, Counter)
 
     /**
      * Method iterateContributor
-     *
+     * 
      * @param counter
      * @param childTag
      * @param parentTag
      * @param list
      * @param parent
      */
-    protected void iterateContributor(Counter counter, Element parent, java.util.Collection list, java.lang.String parentTag, java.lang.String childTag)
+    protected void iterateContributor( Counter counter, Element parent, java.util.Collection list,
+                                       java.lang.String parentTag, java.lang.String childTag )
     {
         boolean shouldExist = list != null && list.size() > 0;
-        Element element = updateElement(counter, parent, parentTag, shouldExist);
-        if (shouldExist) {
+        Element element = updateElement( counter, parent, parentTag, shouldExist );
+        if ( shouldExist )
+        {
             Iterator it = list.iterator();
-            Iterator elIt = element.getChildren(childTag, element.getNamespace()).iterator();
-            if (!elIt.hasNext()) elIt = null;
-            Counter innerCount = new Counter(counter.getDepth() + 1);
-            while (it.hasNext()) {
+            Iterator elIt = element.getChildren( childTag, element.getNamespace() ).iterator();
+            if ( !elIt.hasNext() )
+                elIt = null;
+            Counter innerCount = new Counter( counter.getDepth() + 1 );
+            while ( it.hasNext() )
+            {
                 Contributor value = (Contributor) it.next();
                 Element el;
-                if (elIt != null && elIt.hasNext()) {
+                if ( elIt != null && elIt.hasNext() )
+                {
                     el = (Element) elIt.next();
-                    if (! elIt.hasNext()) elIt = null;
-                } else {
-                    el = factory.element(childTag, element.getNamespace());
-                    insertAtPreferredLocation(element, el, innerCount);
+                    if ( !elIt.hasNext() )
+                        elIt = null;
+                }
+                else
+                {
+                    el = factory.element( childTag, element.getNamespace() );
+                    insertAtPreferredLocation( element, el, innerCount );
                 }
-                updateContributor(value, childTag, innerCount, el);
+                updateContributor( value, childTag, innerCount, el );
                 innerCount.increaseCount();
             }
-            if (elIt != null) {
-                while (elIt.hasNext()) {
+            if ( elIt != null )
+            {
+                while ( elIt.hasNext() )
+                {
                     elIt.next();
                     elIt.remove();
                 }
             }
         }
-    } //-- void iterateContributor(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
+    } // -- void iterateContributor(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
 
     /**
      * Method iterateDependency
-     *
+     * 
      * @param counter
      * @param childTag
      * @param parentTag
      * @param list
      * @param parent
      */
-    protected void iterateDependency(Counter counter, Element parent, java.util.Collection list, java.lang.String parentTag, java.lang.String childTag)
+    protected void iterateDependency( Counter counter, Element parent, java.util.Collection list,
+                                      java.lang.String parentTag, java.lang.String childTag )
     {
         boolean shouldExist = list != null && list.size() > 0;
-        Element element = updateElement(counter, parent, parentTag, shouldExist);
-        if (shouldExist) {
+        Element element = updateElement( counter, parent, parentTag, shouldExist );
+        if ( shouldExist )
+        {
             Iterator it = list.iterator();
-            Iterator elIt = element.getChildren(childTag, element.getNamespace()).iterator();
-            if (!elIt.hasNext()) elIt = null;
-            Counter innerCount = new Counter(counter.getDepth() + 1);
-            while (it.hasNext()) {
+            Iterator elIt = element.getChildren( childTag, element.getNamespace() ).iterator();
+            if ( !elIt.hasNext() )
+                elIt = null;
+            Counter innerCount = new Counter( counter.getDepth() + 1 );
+            while ( it.hasNext() )
+            {
                 Dependency value = (Dependency) it.next();
                 Element el;
-                if (elIt != null && elIt.hasNext()) {
+                if ( elIt != null && elIt.hasNext() )
+                {
                     el = (Element) elIt.next();
-                    if (! elIt.hasNext()) elIt = null;
-                } else {
-                    el = factory.element(childTag, element.getNamespace());
-                    insertAtPreferredLocation(element, el, innerCount);
+                    if ( !elIt.hasNext() )
+                        elIt = null;
                 }
-                updateDependency(value, childTag, innerCount, el);
+                else
+                {
+                    el = factory.element( childTag, element.getNamespace() );
+                    insertAtPreferredLocation( element, el, innerCount );
+                }
+                updateDependency( value, childTag, innerCount, el );
                 innerCount.increaseCount();
             }
-            if (elIt != null) {
-                while (elIt.hasNext()) {
+            if ( elIt != null )
+            {
+                while ( elIt.hasNext() )
+                {
                     elIt.next();
                     elIt.remove();
                 }
             }
         }
-    } //-- void iterateDependency(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
+    } // -- void iterateDependency(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
 
     /**
      * Method iterateDeveloper
-     *
+     * 
      * @param counter
      * @param childTag
      * @param parentTag
      * @param list
      * @param parent
      */
-    protected void iterateDeveloper(Counter counter, Element parent, java.util.Collection list, java.lang.String parentTag, java.lang.String childTag)
+    protected void iterateDeveloper( Counter counter, Element parent, java.util.Collection list,
+                                     java.lang.String parentTag, java.lang.String childTag )
     {
         boolean shouldExist = list != null && list.size() > 0;
-        Element element = updateElement(counter, parent, parentTag, shouldExist);
-        if (shouldExist) {
+        Element element = updateElement( counter, parent, parentTag, shouldExist );
+        if ( shouldExist )
+        {
             Iterator it = list.iterator();
-            Iterator elIt = element.getChildren(childTag, element.getNamespace()).iterator();
-            if (!elIt.hasNext()) elIt = null;
-            Counter innerCount = new Counter(counter.getDepth() + 1);
-            while (it.hasNext()) {
+            Iterator elIt = element.getChildren( childTag, element.getNamespace() ).iterator();
+            if ( !elIt.hasNext() )
+                elIt = null;
+            Counter innerCount = new Counter( counter.getDepth() + 1 );
+            while ( it.hasNext() )
+            {
                 Developer value = (Developer) it.next();
                 Element el;
-                if (elIt != null && elIt.hasNext()) {
+                if ( elIt != null && elIt.hasNext() )
+                {
                     el = (Element) elIt.next();
-                    if (! elIt.hasNext()) elIt = null;
-                } else {
-                    el = factory.element(childTag, element.getNamespace());
-                    insertAtPreferredLocation(element, el, innerCount);
+                    if ( !elIt.hasNext() )
+                        elIt = null;
+                }
+                else
+                {
+                    el = factory.element( childTag, element.getNamespace() );
+                    insertAtPreferredLocation( element, el, innerCount );
                 }
-                updateDeveloper(value, childTag, innerCount, el);
+                updateDeveloper( value, childTag, innerCount, el );
                 innerCount.increaseCount();
             }
-            if (elIt != null) {
-                while (elIt.hasNext()) {
+            if ( elIt != null )
+            {
+                while ( elIt.hasNext() )
+                {
                     elIt.next();
                     elIt.remove();
                 }
             }
         }
-    } //-- void iterateDeveloper(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
+    } // -- void iterateDeveloper(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
 
     /**
      * Method iterateExclusion
-     *
+     * 
      * @param counter
      * @param childTag
      * @param parentTag
      * @param list
      * @param parent
      */
-    protected void iterateExclusion(Counter counter, Element parent, java.util.Collection list, java.lang.String parentTag, java.lang.String childTag)
+    protected void iterateExclusion( Counter counter, Element parent, java.util.Collection list,
+                                     java.lang.String parentTag, java.lang.String childTag )
     {
         boolean shouldExist = list != null && list.size() > 0;
-        Element element = updateElement(counter, parent, parentTag, shouldExist);
-        if (shouldExist) {
+        Element element = updateElement( counter, parent, parentTag, shouldExist );
+        if ( shouldExist )
+        {
             Iterator it = list.iterator();
-            Iterator elIt = element.getChildren(childTag, element.getNamespace()).iterator();
-            if (!elIt.hasNext()) elIt = null;
-            Counter innerCount = new Counter(counter.getDepth() + 1);
-            while (it.hasNext()) {
+            Iterator elIt = element.getChildren( childTag, element.getNamespace() ).iterator();
+            if ( !elIt.hasNext() )
+                elIt = null;
+            Counter innerCount = new Counter( counter.getDepth() + 1 );
+            while ( it.hasNext() )
+            {
                 Exclusion value = (Exclusion) it.next();
                 Element el;
-                if (elIt != null && elIt.hasNext()) {
+                if ( elIt != null && elIt.hasNext() )
+                {
                     el = (Element) elIt.next();
-                    if (! elIt.hasNext()) elIt = null;
-                } else {
-                    el = factory.element(childTag, element.getNamespace());
-                    insertAtPreferredLocation(element, el, innerCount);
+                    if ( !elIt.hasNext() )
+                        elIt = null;
+                }
+                else
+                {
+                    el = factory.element( childTag, element.getNamespace() );
+                    insertAtPreferredLocation( element, el, innerCount );
                 }
-                updateExclusion(value, childTag, innerCount, el);
+                updateExclusion( value, childTag, innerCount, el );
                 innerCount.increaseCount();
             }
-            if (elIt != null) {
-                while (elIt.hasNext()) {
+            if ( elIt != null )
+            {
+                while ( elIt.hasNext() )
+                {
                     elIt.next();
                     elIt.remove();
                 }
             }
         }
-    } //-- void iterateExclusion(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
+    } // -- void iterateExclusion(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
 
     /**
      * Method iterateExtension
-     *
+     * 
      * @param counter
      * @param childTag
      * @param parentTag
      * @param list
      * @param parent
      */
-    protected void iterateExtension(Counter counter, Element parent, java.util.Collection list, java.lang.String parentTag, java.lang.String childTag)
+    protected void iterateExtension( Counter counter, Element parent, java.util.Collection list,
+                                     java.lang.String parentTag, java.lang.String childTag )
     {
         boolean shouldExist = list != null && list.size() > 0;
-        Element element = updateElement(counter, parent, parentTag, shouldExist);
-        if (shouldExist) {
+        Element element = updateElement( counter, parent, parentTag, shouldExist );
+        if ( shouldExist )
+        {
             Iterator it = list.iterator();
-            Iterator elIt = element.getChildren(childTag, element.getNamespace()).iterator();
-            if (!elIt.hasNext()) elIt = null;
-            Counter innerCount = new Counter(counter.getDepth() + 1);
-            while (it.hasNext()) {
+            Iterator elIt = element.getChildren( childTag, element.getNamespace() ).iterator();
+            if ( !elIt.hasNext() )
+                elIt = null;
+            Counter innerCount = new Counter( counter.getDepth() + 1 );
+            while ( it.hasNext() )
+            {
                 Extension value = (Extension) it.next();
                 Element el;
-                if (elIt != null && elIt.hasNext()) {
+                if ( elIt != null && elIt.hasNext() )
+                {
                     el = (Element) elIt.next();
-                    if (! elIt.hasNext()) elIt = null;
-                } else {
-                    el = factory.element(childTag, element.getNamespace());
-                    insertAtPreferredLocation(element, el, innerCount);
+                    if ( !elIt.hasNext() )
+                        elIt = null;
                 }
-                updateExtension(value, childTag, innerCount, el);
+                else
+                {
+                    el = factory.element( childTag, element.getNamespace() );
+                    insertAtPreferredLocation( element, el, innerCount );
+                }
+                updateExtension( value, childTag, innerCount, el );
                 innerCount.increaseCount();
             }
-            if (elIt != null) {
-                while (elIt.hasNext()) {
+            if ( elIt != null )
+            {
+                while ( elIt.hasNext() )
+                {
                     elIt.next();
                     elIt.remove();
                 }
             }
         }
-    } //-- void iterateExtension(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
+    } // -- void iterateExtension(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
 
     /**
      * Method iterateLicense
-     *
+     * 
      * @param counter
      * @param childTag
      * @param parentTag
      * @param list
      * @param parent
      */
-    protected void iterateLicense(Counter counter, Element parent, java.util.Collection list, java.lang.String parentTag, java.lang.String childTag)
+    protected void iterateLicense( Counter counter, Element parent, java.util.Collection list,
+                                   java.lang.String parentTag, java.lang.String childTag )
     {
         boolean shouldExist = list != null && list.size() > 0;
-        Element element = updateElement(counter, parent, parentTag, shouldExist);
-        if (shouldExist) {
+        Element element = updateElement( counter, parent, parentTag, shouldExist );
+        if ( shouldExist )
+        {
             Iterator it = list.iterator();
-            Iterator elIt = element.getChildren(childTag, element.getNamespace()).iterator();
-            if (!elIt.hasNext()) elIt = null;
-            Counter innerCount = new Counter(counter.getDepth() + 1);
-            while (it.hasNext()) {
+            Iterator elIt = element.getChildren( childTag, element.getNamespace() ).iterator();
+            if ( !elIt.hasNext() )
+                elIt = null;
+            Counter innerCount = new Counter( counter.getDepth() + 1 );
+            while ( it.hasNext() )
+            {
                 License value = (License) it.next();
                 Element el;
-                if (elIt != null && elIt.hasNext()) {
+                if ( elIt != null && elIt.hasNext() )
+                {
                     el = (Element) elIt.next();
-                    if (! elIt.hasNext()) elIt = null;
-                } else {
-                    el = factory.element(childTag, element.getNamespace());
-                    insertAtPreferredLocation(element, el, innerCount);
+                    if ( !elIt.hasNext() )
+                        elIt = null;
+                }
+                else
+                {
+                    el = factory.element( childTag, element.getNamespace() );
+                    insertAtPreferredLocation( element, el, innerCount );
                 }
-                updateLicense(value, childTag, innerCount, el);
+                updateLicense( value, childTag, innerCount, el );
                 innerCount.increaseCount();
             }
-            if (elIt != null) {
-                while (elIt.hasNext()) {
+            if ( elIt != null )
+            {
+                while ( elIt.hasNext() )
+                {
                     elIt.next();
                     elIt.remove();
                 }
             }
         }
-    } //-- void iterateLicense(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
+    } // -- void iterateLicense(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
 
     /**
      * Method iterateMailingList
-     *
+     * 
      * @param counter
      * @param childTag
      * @param parentTag
      * @param list
      * @param parent
      */
-    protected void iterateMailingList(Counter counter, Element parent, java.util.Collection list, java.lang.String parentTag, java.lang.String childTag)
+    protected void iterateMailingList( Counter counter, Element parent, java.util.Collection list,
+                                       java.lang.String parentTag, java.lang.String childTag )
     {
         boolean shouldExist = list != null && list.size() > 0;
-        Element element = updateElement(counter, parent, parentTag, shouldExist);
-        if (shouldExist) {
+        Element element = updateElement( counter, parent, parentTag, shouldExist );
+        if ( shouldExist )
+        {
             Iterator it = list.iterator();
-            Iterator elIt = element.getChildren(childTag, element.getNamespace()).iterator();
-            if (!elIt.hasNext()) elIt = null;
-            Counter innerCount = new Counter(counter.getDepth() + 1);
-            while (it.hasNext()) {
+            Iterator elIt = element.getChildren( childTag, element.getNamespace() ).iterator();
+            if ( !elIt.hasNext() )
+                elIt = null;
+            Counter innerCount = new Counter( counter.getDepth() + 1 );
+            while ( it.hasNext() )
+            {
                 MailingList value = (MailingList) it.next();
                 Element el;
-                if (elIt != null && elIt.hasNext()) {
+                if ( elIt != null && elIt.hasNext() )
+                {
                     el = (Element) elIt.next();
-                    if (! elIt.hasNext()) elIt = null;
-                } else {
-                    el = factory.element(childTag, element.getNamespace());
-                    insertAtPreferredLocation(element, el, innerCount);
+                    if ( !elIt.hasNext() )
+                        elIt = null;
+                }
+                else
+                {
+                    el = factory.element( childTag, element.getNamespace() );
+                    insertAtPreferredLocation( element, el, innerCount );
                 }
-                updateMailingList(value, childTag, innerCount, el);
+                updateMailingList( value, childTag, innerCount, el );
                 innerCount.increaseCount();
             }
-            if (elIt != null) {
-                while (elIt.hasNext()) {
+            if ( elIt != null )
+            {
+                while ( elIt.hasNext() )
+                {
                     elIt.next();
                     elIt.remove();
                 }
             }
         }
-    } //-- void iterateMailingList(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
+    } // -- void iterateMailingList(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
 
     /**
      * Method iterateNotifier
-     *
+     * 
      * @param counter
      * @param childTag
      * @param parentTag
      * @param list
      * @param parent
      */
-    protected void iterateNotifier(Counter counter, Element parent, java.util.Collection list, java.lang.String parentTag, java.lang.String childTag)
+    protected void iterateNotifier( Counter counter, Element parent, java.util.Collection list,
+                                    java.lang.String parentTag, java.lang.String childTag )
     {
         boolean shouldExist = list != null && list.size() > 0;
-        Element element = updateElement(counter, parent, parentTag, shouldExist);
-        if (shouldExist) {
+        Element element = updateElement( counter, parent, parentTag, shouldExist );
+        if ( shouldExist )
+        {
             Iterator it = list.iterator();
-            Iterator elIt = element.getChildren(childTag, element.getNamespace()).iterator();
-            if (!elIt.hasNext()) elIt = null;
-            Counter innerCount = new Counter(counter.getDepth() + 1);
-            while (it.hasNext()) {
+            Iterator elIt = element.getChildren( childTag, element.getNamespace() ).iterator();
+            if ( !elIt.hasNext() )
+                elIt = null;
+            Counter innerCount = new Counter( counter.getDepth() + 1 );
+            while ( it.hasNext() )
+            {
                 Notifier value = (Notifier) it.next();
                 Element el;
-                if (elIt != null && elIt.hasNext()) {
+                if ( elIt != null && elIt.hasNext() )
+                {
                     el = (Element) elIt.next();
-                    if (! elIt.hasNext()) elIt = null;
-                } else {
-                    el = factory.element(childTag, element.getNamespace());
-                    insertAtPreferredLocation(element, el, innerCount);
+                    if ( !elIt.hasNext() )
+                        elIt = null;
                 }
-                updateNotifier(value, childTag, innerCount, el);
+                else
+                {
+                    el = factory.element( childTag, element.getNamespace() );
+                    insertAtPreferredLocation( element, el, innerCount );
+                }
+                updateNotifier( value, childTag, innerCount, el );
                 innerCount.increaseCount();
             }
-            if (elIt != null) {
-                while (elIt.hasNext()) {
+            if ( elIt != null )
+            {
+                while ( elIt.hasNext() )
+                {
                     elIt.next();
                     elIt.remove();
                 }
             }
         }
-    } //-- void iterateNotifier(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
+    } // -- void iterateNotifier(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
 
     /**
      * Method iteratePlugin
-     *
+     * 
      * @param counter
      * @param childTag
      * @param parentTag
      * @param list
      * @param parent
      */
-    protected void iteratePlugin(Counter counter, Element parent, java.util.Collection list, java.lang.String parentTag, java.lang.String childTag)
+    protected void iteratePlugin( Counter counter, Element parent, java.util.Collection list,
+                                  java.lang.String parentTag, java.lang.String childTag )
     {
         boolean shouldExist = list != null && list.size() > 0;
-        Element element = updateElement(counter, parent, parentTag, shouldExist);
-        if (shouldExist) {
+        Element element = updateElement( counter, parent, parentTag, shouldExist );
+        if ( shouldExist )
+        {
             Iterator it = list.iterator();
-            Iterator elIt = element.getChildren(childTag, element.getNamespace()).iterator();
-            if (!elIt.hasNext()) elIt = null;
-            Counter innerCount = new Counter(counter.getDepth() + 1);
-            while (it.hasNext()) {
+            Iterator elIt = element.getChildren( childTag, element.getNamespace() ).iterator();
+            if ( !elIt.hasNext() )
+                elIt = null;
+            Counter innerCount = new Counter( counter.getDepth() + 1 );
+            while ( it.hasNext() )
+            {
                 Plugin value = (Plugin) it.next();
                 Element el;
-                if (elIt != null && elIt.hasNext()) {
+                if ( elIt != null && elIt.hasNext() )
+                {
                     el = (Element) elIt.next();
-                    if (! elIt.hasNext()) elIt = null;
-                } else {
-                    el = factory.element(childTag, element.getNamespace());
-                    insertAtPreferredLocation(element, el, innerCount);
+                    if ( !elIt.hasNext() )
+                        elIt = null;
+                }
+                else
+                {
+                    el = factory.element( childTag, element.getNamespace() );
+                    insertAtPreferredLocation( element, el, innerCount );
                 }
-                updatePlugin(value, childTag, innerCount, el);
+                updatePlugin( value, childTag, innerCount, el );
                 innerCount.increaseCount();
             }
-            if (elIt != null) {
-                while (elIt.hasNext()) {
+            if ( elIt != null )
+            {
+                while ( elIt.hasNext() )
+                {
                     elIt.next();
                     elIt.remove();
                 }
             }
         }
-    } //-- void iteratePlugin(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
+    } // -- void iteratePlugin(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
 
     /**
      * Method iteratePluginExecution
-     *
+     * 
      * @param counter
      * @param childTag
      * @param parentTag
      * @param list
      * @param parent
      */
-    protected void iteratePluginExecution(Counter counter, Element parent, java.util.Collection list, java.lang.String parentTag, java.lang.String childTag)
+    protected void iteratePluginExecution( Counter counter, Element parent, java.util.Collection list,
+                                           java.lang.String parentTag, java.lang.String childTag )
     {
         boolean shouldExist = list != null && list.size() > 0;
-        Element element = updateElement(counter, parent, parentTag, shouldExist);
-        if (shouldExist) {
+        Element element = updateElement( counter, parent, parentTag, shouldExist );
+        if ( shouldExist )
+        {
             Iterator it = list.iterator();
-            Iterator elIt = element.getChildren(childTag, element.getNamespace()).iterator();
-            if (!elIt.hasNext()) elIt = null;
-            Counter innerCount = new Counter(counter.getDepth() + 1);
-            while (it.hasNext()) {
+            Iterator elIt = element.getChildren( childTag, element.getNamespace() ).iterator();
+            if ( !elIt.hasNext() )
+                elIt = null;
+            Counter innerCount = new Counter( counter.getDepth() + 1 );
+            while ( it.hasNext() )
+            {
                 PluginExecution value = (PluginExecution) it.next();
                 Element el;
-                if (elIt != null && elIt.hasNext()) {
+                if ( elIt != null && elIt.hasNext() )
+                {
                     el = (Element) elIt.next();
-                    if (! elIt.hasNext()) elIt = null;
-                } else {
-                    el = factory.element(childTag, element.getNamespace());
-                    insertAtPreferredLocation(element, el, innerCount);
+                    if ( !elIt.hasNext() )
+                        elIt = null;
+                }
+                else
+                {
+                    el = factory.element( childTag, element.getNamespace() );
+                    insertAtPreferredLocation( element, el, innerCount );
                 }
-                updatePluginExecution(value, childTag, innerCount, el);
+                updatePluginExecution( value, childTag, innerCount, el );
                 innerCount.increaseCount();
             }
-            if (elIt != null) {
-                while (elIt.hasNext()) {
+            if ( elIt != null )
+            {
+                while ( elIt.hasNext() )
+                {
                     elIt.next();
                     elIt.remove();
                 }
             }
         }
-    } //-- void iteratePluginExecution(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
+    } // -- void iteratePluginExecution(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
 
     /**
      * Method iterateProfile
-     *
+     * 
      * @param counter
      * @param childTag
      * @param parentTag
      * @param list
      * @param parent
      */
-    protected void iterateProfile(Counter counter, Element parent, java.util.Collection list, java.lang.String parentTag, java.lang.String childTag)
+    protected void iterateProfile( Counter counter, Element parent, java.util.Collection list,
+                                   java.lang.String parentTag, java.lang.String childTag )
     {
         boolean shouldExist = list != null && list.size() > 0;
-        Element element = updateElement(counter, parent, parentTag, shouldExist);
-        if (shouldExist) {
+        Element element = updateElement( counter, parent, parentTag, shouldExist );
+        if ( shouldExist )
+        {
             Iterator it = list.iterator();
-            Iterator elIt = element.getChildren(childTag, element.getNamespace()).iterator();
-            if (!elIt.hasNext()) elIt = null;
-            Counter innerCount = new Counter(counter.getDepth() + 1);
-            while (it.hasNext()) {
+            Iterator elIt = element.getChildren( childTag, element.getNamespace() ).iterator();
+            if ( !elIt.hasNext() )
+                elIt = null;
+            Counter innerCount = new Counter( counter.getDepth() + 1 );
+            while ( it.hasNext() )
+            {
                 Profile value = (Profile) it.next();
                 Element el;
-                if (elIt != null && elIt.hasNext()) {
+                if ( elIt != null && elIt.hasNext() )
+                {
                     el = (Element) elIt.next();
-                    if (! elIt.hasNext()) elIt = null;
-                } else {
-                    el = factory.element(childTag, element.getNamespace());
-                    insertAtPreferredLocation(element, el, innerCount);
+                    if ( !elIt.hasNext() )
+                        elIt = null;
                 }
-                updateProfile(value, childTag, innerCount, el);
+                else
+                {
+                    el = factory.element( childTag, element.getNamespace() );
+                    insertAtPreferredLocation( element, el, innerCount );
+                }
+                updateProfile( value, childTag, innerCount, el );
                 innerCount.increaseCount();
             }
-            if (elIt != null) {
-                while (elIt.hasNext()) {
+            if ( elIt != null )
+            {
+                while ( elIt.hasNext() )
+                {
                     elIt.next();
                     elIt.remove();
                 }
             }
         }
-    } //-- void iterateProfile(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
+    } // -- void iterateProfile(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
 
     /**
      * Method iterateReportPlugin
-     *
+     * 
      * @param counter
      * @param childTag
      * @param parentTag
      * @param list
      * @param parent
      */
-    protected void iterateReportPlugin(Counter counter, Element parent, java.util.Collection list, java.lang.String parentTag, java.lang.String childTag)
+    protected void iterateReportPlugin( Counter counter, Element parent, java.util.Collection list,
+                                        java.lang.String parentTag, java.lang.String childTag )
     {
         boolean shouldExist = list != null && list.size() > 0;
-        Element element = updateElement(counter, parent, parentTag, shouldExist);
-        if (shouldExist) {
+        Element element = updateElement( counter, parent, parentTag, shouldExist );
+        if ( shouldExist )
+        {
             Iterator it = list.iterator();
-            Iterator elIt = element.getChildren(childTag, element.getNamespace()).iterator();
-            if (!elIt.hasNext()) elIt = null;
-            Counter innerCount = new Counter(counter.getDepth() + 1);
-            while (it.hasNext()) {
+            Iterator elIt = element.getChildren( childTag, element.getNamespace() ).iterator();
+            if ( !elIt.hasNext() )
+                elIt = null;
+            Counter innerCount = new Counter( counter.getDepth() + 1 );
+            while ( it.hasNext() )
+            {
                 ReportPlugin value = (ReportPlugin) it.next();
                 Element el;
-                if (elIt != null && elIt.hasNext()) {
+                if ( elIt != null && elIt.hasNext() )
+                {
                     el = (Element) elIt.next();
-                    if (! elIt.hasNext()) elIt = null;
-                } else {
-                    el = factory.element(childTag, element.getNamespace());
-                    insertAtPreferredLocation(element, el, innerCount);
+                    if ( !elIt.hasNext() )
+                        elIt = null;
+                }
+                else
+                {
+                    el = factory.element( childTag, element.getNamespace() );
+                    insertAtPreferredLocation( element, el, innerCount );
                 }
-                updateReportPlugin(value, childTag, innerCount, el);
+                updateReportPlugin( value, childTag, innerCount, el );
                 innerCount.increaseCount();
             }
-            if (elIt != null) {
-                while (elIt.hasNext()) {
+            if ( elIt != null )
+            {
+                while ( elIt.hasNext() )
+                {
                     elIt.next();
                     elIt.remove();
                 }
             }
         }
-    } //-- void iterateReportPlugin(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
+    } // -- void iterateReportPlugin(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
 
     /**
      * Method iterateReportSet
-     *
+     * 
      * @param counter
      * @param childTag
      * @param parentTag
      * @param list
      * @param parent
      */
-    protected void iterateReportSet(Counter counter, Element parent, java.util.Collection list, java.lang.String parentTag, java.lang.String childTag)
+    protected void iterateReportSet( Counter counter, Element parent, java.util.Collection list,
+                                     java.lang.String parentTag, java.lang.String childTag )
     {
         boolean shouldExist = list != null && list.size() > 0;
-        Element element = updateElement(counter, parent, parentTag, shouldExist);
-        if (shouldExist) {
+        Element element = updateElement( counter, parent, parentTag, shouldExist );
+        if ( shouldExist )
+        {
             Iterator it = list.iterator();
-            Iterator elIt = element.getChildren(childTag, element.getNamespace()).iterator();
-            if (!elIt.hasNext()) elIt = null;
-            Counter innerCount = new Counter(counter.getDepth() + 1);
-            while (it.hasNext()) {
+            Iterator elIt = element.getChildren( childTag, element.getNamespace() ).iterator();
+            if ( !elIt.hasNext() )
+                elIt = null;
+            Counter innerCount = new Counter( counter.getDepth() + 1 );
+            while ( it.hasNext() )
+            {
                 ReportSet value = (ReportSet) it.next();
                 Element el;
-                if (elIt != null && elIt.hasNext()) {
+                if ( elIt != null && elIt.hasNext() )
+                {
                     el = (Element) elIt.next();
-                    if (! elIt.hasNext()) elIt = null;
-                } else {
-                    el = factory.element(childTag, element.getNamespace());
-                    insertAtPreferredLocation(element, el, innerCount);
+                    if ( !elIt.hasNext() )
+                        elIt = null;
+                }
+                else
+                {
+                    el = factory.element( childTag, element.getNamespace() );
+                    insertAtPreferredLocation( element, el, innerCount );
                 }
-                updateReportSet(value, childTag, innerCount, el);
+                updateReportSet( value, childTag, innerCount, el );
                 innerCount.increaseCount();
             }
-            if (elIt != null) {
-                while (elIt.hasNext()) {
+            if ( elIt != null )
+            {
+                while ( elIt.hasNext() )
+                {
                     elIt.next();
                     elIt.remove();
                 }
             }
         }
-    } //-- void iterateReportSet(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
+    } // -- void iterateReportSet(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
 
     /**
      * Method iterateRepository
-     *
+     * 
      * @param counter
      * @param childTag
      * @param parentTag
      * @param list
      * @param parent
      */
-    protected void iterateRepository(Counter counter, Element parent, java.util.Collection list, java.lang.String parentTag, java.lang.String childTag)
+    protected void iterateRepository( Counter counter, Element parent, java.util.Collection list,
+                                      java.lang.String parentTag, java.lang.String childTag )
     {
         boolean shouldExist = list != null && list.size() > 0;
-        Element element = updateElement(counter, parent, parentTag, shouldExist);
-        if (shouldExist) {
+        Element element = updateElement( counter, parent, parentTag, shouldExist );
+        if ( shouldExist )
+        {
             Iterator it = list.iterator();
-            Iterator elIt = element.getChildren(childTag, element.getNamespace()).iterator();
-            if (!elIt.hasNext()) elIt = null;
-            Counter innerCount = new Counter(counter.getDepth() + 1);
-            while (it.hasNext()) {
+            Iterator elIt = element.getChildren( childTag, element.getNamespace() ).iterator();
+            if ( !elIt.hasNext() )
+                elIt = null;
+            Counter innerCount = new Counter( counter.getDepth() + 1 );
+            while ( it.hasNext() )
+            {
                 Repository value = (Repository) it.next();
                 Element el;
-                if (elIt != null && elIt.hasNext()) {
+                if ( elIt != null && elIt.hasNext() )
+                {
                     el = (Element) elIt.next();
-                    if (! elIt.hasNext()) elIt = null;
-                } else {
-                    el = factory.element(childTag, element.getNamespace());
-                    insertAtPreferredLocation(element, el, innerCount);
+                    if ( !elIt.hasNext() )
+                        elIt = null;
                 }
-                updateRepository(value, childTag, innerCount, el);
+                else
+                {
+                    el = factory.element( childTag, element.getNamespace() );
+                    insertAtPreferredLocation( element, el, innerCount );
+                }
+                updateRepository( value, childTag, innerCount, el );
                 innerCount.increaseCount();
             }
-            if (elIt != null) {
-                while (elIt.hasNext()) {
+            if ( elIt != null )
+            {
+                while ( elIt.hasNext() )
+                {
                     elIt.next();
                     elIt.remove();
                 }
             }
         }
-    } //-- void iterateRepository(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
+    } // -- void iterateRepository(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
 
     /**
      * Method iterateResource
-     *
+     * 
      * @param counter
      * @param childTag
      * @param parentTag
      * @param list
      * @param parent
      */
-    protected void iterateResource(Counter counter, Element parent, java.util.Collection list, java.lang.String parentTag, java.lang.String childTag)
+    protected void iterateResource( Counter counter, Element parent, java.util.Collection list,
+                                    java.lang.String parentTag, java.lang.String childTag )
     {
         boolean shouldExist = list != null && list.size() > 0;
-        Element element = updateElement(counter, parent, parentTag, shouldExist);
-        if (shouldExist) {
+        Element element = updateElement( counter, parent, parentTag, shouldExist );
+        if ( shouldExist )
+        {
             Iterator it = list.iterator();
-            Iterator elIt = element.getChildren(childTag, element.getNamespace()).iterator();
-            if (!elIt.hasNext()) elIt = null;
-            Counter innerCount = new Counter(counter.getDepth() + 1);
-            while (it.hasNext()) {
+            Iterator elIt = element.getChildren( childTag, element.getNamespace() ).iterator();
+            if ( !elIt.hasNext() )
+                elIt = null;
+            Counter innerCount = new Counter( counter.getDepth() + 1 );
+            while ( it.hasNext() )
+            {
                 Resource value = (Resource) it.next();
                 Element el;
-                if (elIt != null && elIt.hasNext()) {
+                if ( elIt != null && elIt.hasNext() )
+                {
                     el = (Element) elIt.next();
-                    if (! elIt.hasNext()) elIt = null;
-                } else {
-                    el = factory.element(childTag, element.getNamespace());
-                    insertAtPreferredLocation(element, el, innerCount);
+                    if ( !elIt.hasNext() )
+                        elIt = null;
+                }
+                else
+                {
+                    el = factory.element( childTag, element.getNamespace() );
+                    insertAtPreferredLocation( element, el, innerCount );
                 }
-                updateResource(value, childTag, innerCount, el);
+                updateResource( value, childTag, innerCount, el );
                 innerCount.increaseCount();
             }
-            if (elIt != null) {
-                while (elIt.hasNext()) {
+            if ( elIt != null )
+            {
+                while ( elIt.hasNext() )
+                {
                     elIt.next();
                     elIt.remove();
                 }
             }
         }
-    } //-- void iterateResource(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
+    } // -- void iterateResource(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
 
     /**
      * Method replaceXpp3DOM
-     *
+     * 
      * @param parent
      * @param counter
      * @param parentDom
      */
-    protected void replaceXpp3DOM(Element parent, Xpp3Dom parentDom, Counter counter)
+    protected void replaceXpp3DOM( Element parent, Xpp3Dom parentDom, Counter counter )
     {
-        if (parentDom.getChildCount() > 0) {
+        if ( parentDom.getChildCount() > 0 )
+        {
             Xpp3Dom[] childs = parentDom.getChildren();
             Collection domChilds = new ArrayList();
-            for (int i = 0; i < childs.length; i++) {
-                domChilds.add(childs[i]);
+            for ( int i = 0; i < childs.length; i++ )
+            {
+                domChilds.add( childs[i] );
             }
-           // int domIndex = 0;
+            // int domIndex = 0;
             ListIterator it = parent.getChildren().listIterator();
-            while (it.hasNext()) {
+            while ( it.hasNext() )
+            {
                 Element elem = (Element) it.next();
                 Iterator it2 = domChilds.iterator();
                 Xpp3Dom corrDom = null;
-                while (it2.hasNext()) {
-                    Xpp3Dom dm = (Xpp3Dom)it2.next();
-                    if (dm.getName().equals(elem.getName())) {
+                while ( it2.hasNext() )
+                {
+                    Xpp3Dom dm = (Xpp3Dom) it2.next();
+                    if ( dm.getName().equals( elem.getName() ) )
+                    {
                         corrDom = dm;
                         break;
                     }
                 }
-                if (corrDom != null) {
-                    domChilds.remove(corrDom);
-                    replaceXpp3DOM(elem, corrDom, new Counter(counter.getDepth() + 1));
+                if ( corrDom != null )
+                {
+                    domChilds.remove( corrDom );
+                    replaceXpp3DOM( elem, corrDom, new Counter( counter.getDepth() + 1 ) );
                     counter.increaseCount();
-                } else {
-                    parent.removeContent(elem);
+                }
+                else
+                {
+                    parent.removeContent( elem );
                 }
             }
             Iterator it2 = domChilds.iterator();
-            while (it2.hasNext()) {
+            while ( it2.hasNext() )
+            {
                 Xpp3Dom dm = (Xpp3Dom) it2.next();
-                Element elem = factory.element(dm.getName(), parent.getNamespace());
-                insertAtPreferredLocation(parent, elem, counter);
+                Element elem = factory.element( dm.getName(), parent.getNamespace() );
+                insertAtPreferredLocation( parent, elem, counter );
                 counter.increaseCount();
-                replaceXpp3DOM(elem, dm, new Counter(counter.getDepth() + 1));
+                replaceXpp3DOM( elem, dm, new Counter( counter.getDepth() + 1 ) );
             }
-        } else if (parentDom.getValue() != null) {
-            parent.setText(parentDom.getValue());
         }
-    } //-- void replaceXpp3DOM(Element, Xpp3Dom, Counter)
+        else if ( parentDom.getValue() != null )
+        {
+            parent.setText( parentDom.getValue() );
+        }
+    } // -- void replaceXpp3DOM(Element, Xpp3Dom, Counter)
 
     /**
      * Method updateActivation
-     *
+     * 
      * @param value
      * @param element
      * @param counter
      * @param xmlTag
      */
     /*
-    protected void updateActivation(Activation value, String xmlTag, Counter counter, Element element)
-    {
-        boolean shouldExist = value != null;
-        Element root = updateElement(counter, element, xmlTag, shouldExist);
-        if (shouldExist) {
-            Counter innerCount = new Counter(counter.getDepth() + 1);
-            findAndReplaceSimpleElement(innerCount, root,  "activeByDefault", value.isActiveByDefault() == false ? null : String.valueOf( value.isActiveByDefault() ), "false");
-            findAndReplaceSimpleElement(innerCount, root,  "jdk", value.getJdk(), null);
-            updateActivationOS( value.getOs(), "os", innerCount, root);
-            updateActivationProperty( value.getProperty(), "property", innerCount, root);
-            updateActivationFile( value.getFile(), "file", innerCount, root);
-            updateActivationCustom( value.getCustom(), "custom", innerCount, root);
-        }
-    } //-- void updateActivation(Activation, String, Counter, Element)
+     * protected void updateActivation(Activation value, String xmlTag, Counter counter, Element element) { boolean
+     * shouldExist = value != null; Element root = updateElement(counter, element, xmlTag, shouldExist); if
+     * (shouldExist) { Counter innerCount = new Counter(counter.getDepth() + 1); findAndReplaceSimpleElement(innerCount,
+     * root, "activeByDefault", !value.isActiveByDefault() ? null : String.valueOf( value.isActiveByDefault() ),
+     * "false"); findAndReplaceSimpleElement(innerCount, root, "jdk", value.getJdk(), null); updateActivationOS(
+     * value.getOs(), "os", innerCount, root); updateActivationProperty( value.getProperty(), "property", innerCount,
+     * root); updateActivationFile( value.getFile(), "file", innerCount, root); updateActivationCustom(
+     * value.getCustom(), "custom", innerCount, root); } } //-- void updateActivation(Activation, String, Counter,
+     * Element)
      */
 
     /**
      * Method updateActivationCustom
-     *
+     * 
      * @param value
      * @param element
      * @param counter
      * @param xmlTag
      */
     /*
-    protected void updateActivationCustom(ActivationCustom value, String xmlTag, Counter counter, Element element)
-    {
-        boolean shouldExist = value != null;
-        Element root = updateElement(counter, element, xmlTag, shouldExist);
-        if (shouldExist) {
-            Counter innerCount = new Counter(counter.getDepth() + 1);
-            findAndReplaceXpp3DOM(innerCount, root, "configuration", (Xpp3Dom)value.getConfiguration());
-            findAndReplaceSimpleElement(innerCount, root,  "type", value.getType(), null);
-        }
-    } //-- void updateActivationCustom(ActivationCustom, String, Counter, Element)
-      */
+     * protected void updateActivationCustom(ActivationCustom value, String xmlTag, Counter counter, Element element) {
+     * boolean shouldExist = value != null; Element root = updateElement(counter, element, xmlTag, shouldExist); if
+     * (shouldExist) { Counter innerCount = new Counter(counter.getDepth() + 1); findAndReplaceXpp3DOM(innerCount, root,
+     * "configuration", (Xpp3Dom)value.getConfiguration()); findAndReplaceSimpleElement(innerCount, root, "type",
+     * value.getType(), null); } } //-- void updateActivationCustom(ActivationCustom, String, Counter, Element)
+     */
 
     /**
      * Method updateActivationFile
-     *
+     * 
      * @param value
      * @param element
      * @param counter
      * @param xmlTag
      */
-    protected void updateActivationFile(ActivationFile value, String xmlTag, Counter counter, Element element)
+    protected void updateActivationFile( ActivationFile value, String xmlTag, Counter counter, Element element )
     {
         boolean shouldExist = value != null;
-        Element root = updateElement(counter, element, xmlTag, shouldExist);
-        if (shouldExist) {
-            Counter innerCount = new Counter(counter.getDepth() + 1);
-            findAndReplaceSimpleElement(innerCount, root,  "missing", value.getMissing(), null);
-            findAndReplaceSimpleElement(innerCount, root,  "exists", value.getExists(), null);
+        Element root = updateElement( counter, element, xmlTag, shouldExist );
+        if ( shouldExist )
+        {
+            Counter innerCount = new Counter( counter.getDepth() + 1 );
+            findAndReplaceSimpleElement( innerCount, root, "missing", value.getMissing(), null );
+            findAndReplaceSimpleElement( innerCount, root, "exists", value.getExists(), null );
         }
-    } //-- void updateActivationFile(ActivationFile, String, Counter, Element)
+    } // -- void updateActivationFile(ActivationFile, String, Counter, Element)
 
     /**
      * Method updateActivationOS
-     *
+     * 
      * @param value
      * @param element
      * @param counter
      * @param xmlTag
      */
-    protected void updateActivationOS(ActivationOS value, String xmlTag, Counter counter, Element element)
+    protected void updateActivationOS( ActivationOS value, String xmlTag, Counter counter, Element element )
     {
         boolean shouldExist = value != null;
-        Element root = updateElement(counter, element, xmlTag, shouldExist);
-        if (shouldExist) {
-            Counter innerCount = new Counter(counter.getDepth() + 1);
-            findAndReplaceSimpleElement(innerCount, root,  "name", value.getName(), null);
-            findAndReplaceSimpleElement(innerCount, root,  "family", value.getFamily(), null);
-            findAndReplaceSimpleElement(innerCount, root,  "arch", value.getArch(), null);
-            findAndReplaceSimpleElement(innerCount, root,  "version", value.getVersion(), null);
+        Element root = updateElement( counter, element, xmlTag, shouldExist );
+        if ( shouldExist )
+        {
+            Counter innerCount = new Counter( counter.getDepth() + 1 );
+            findAndReplaceSimpleElement( innerCount, root, "name", value.getName(), null );
+            findAndReplaceSimpleElement( innerCount, root, "family", value.getFamily(), null );
+            findAndReplaceSimpleElement( innerCount, root, "arch", value.getArch(), null );
+            findAndReplaceSimpleElement( innerCount, root, "version", value.getVersion(), null );
         }
-    } //-- void updateActivationOS(ActivationOS, String, Counter, Element)
+    } // -- void updateActivationOS(ActivationOS, String, Counter, Element)
 
     /**
      * Method updateActivationProperty
-     *
+     * 
      * @param value
      * @param element
      * @param counter
      * @param xmlTag
      */
-    protected void updateActivationProperty(ActivationProperty value, String xmlTag, Counter counter, Element element)
+    protected void updateActivationProperty( ActivationProperty value, String xmlTag, Counter counter, Element element )
     {
         boolean shouldExist = value != null;
-        Element root = updateElement(counter, element, xmlTag, shouldExist);
-        if (shouldExist) {
-            Counter innerCount = new Counter(counter.getDepth() + 1);
-            findAndReplaceSimpleElement(innerCount, root,  "name", value.getName(), null);
-            findAndReplaceSimpleElement(innerCount, root,  "value", value.getValue(), null);
+        Element root = updateElement( counter, element, xmlTag, shouldExist );
+        if ( shouldExist )
+        {
+            Counter innerCount = new Counter( counter.getDepth() + 1 );
+            findAndReplaceSimpleElement( innerCount, root, "name", value.getName(), null );
+            findAndReplaceSimpleElement( innerCount, root, "value", value.getValue(), null );
         }
-    } //-- void updateActivationProperty(ActivationProperty, String, Counter, Element)
+    } // -- void updateActivationProperty(ActivationProperty, String, Counter, Element)
 
     /**
      * Method updateBuild
-     *
+     * 
      * @param value
      * @param element
      * @param counter
      * @param xmlTag
      */
-    protected void updateBuild(Build value, String xmlTag, Counter counter, Element element)
+    protected void updateBuild( Build value, String xmlTag, Counter counter, Element element )
     {
         boolean shouldExist = value != null;
-        Element root = updateElement(counter, element, xmlTag, shouldExist);
-        if (shouldExist) {
-            Counter innerCount = new Counter(counter.getDepth() + 1);
-            findAndReplaceSimpleElement(innerCount, root,  "sourceDirectory", value.getSourceDirectory(), null);
-            findAndReplaceSimpleElement(innerCount, root,  "scriptSourceDirectory", value.getScriptSourceDirectory(), null);
-            findAndReplaceSimpleElement(innerCount, root,  "testSourceDirectory", value.getTestSourceDirectory(), null);
-            findAndReplaceSimpleElement(innerCount, root,  "outputDirectory", value.getOutputDirectory(), null);
-            findAndReplaceSimpleElement(innerCount, root,  "testOutputDirectory", value.getTestOutputDirectory(), null);
-            iterateExtension(innerCount, root, value.getExtensions(),"extensions","extension");
-            findAndReplaceSimpleElement(innerCount, root,  "defaultGoal", value.getDefaultGoal(), null);
-            iterateResource(innerCount, root, value.getResources(),"resources","resource");
-            iterateResource(innerCount, root, value.getTestResources(),"testResources","testResource");
-            findAndReplaceSimpleElement(innerCount, root,  "directory", value.getDirectory(), null);
-            findAndReplaceSimpleElement(innerCount, root,  "finalName", value.getFinalName(), null);
-            findAndReplaceSimpleLists(innerCount, root, value.getFilters(), "filters", "filter");
-            updatePluginManagement( value.getPluginManagement(), "pluginManagement", innerCount, root);
-            iteratePlugin(innerCount, root, value.getPlugins(),"plugins","plugin");
+        Element root = updateElement( counter, element, xmlTag, shouldExist );
+        if ( shouldExist )
+        {
+            Counter innerCount = new Counter( counter.getDepth() + 1 );
+            findAndReplaceSimpleElement( innerCount, root, "sourceDirectory", value.getSourceDirectory(), null );
+            findAndReplaceSimpleElement( innerCount, root, "scriptSourceDirectory", value.getScriptSourceDirectory(),
+                                         null );
+            findAndReplaceSimpleElement( innerCount, root, "testSourceDirectory", value.getTestSourceDirectory(), null );
+            findAndReplaceSimpleElement( innerCount, root, "outputDirectory", value.getOutputDirectory(), null );
+            findAndReplaceSimpleElement( innerCount, root, "testOutputDirectory", value.getTestOutputDirectory(), null );
+            iterateExtension( innerCount, root, value.getExtensions(), "extensions", "extension" );
+            findAndReplaceSimpleElement( innerCount, root, "defaultGoal", value.getDefaultGoal(), null );
+            iterateResource( innerCount, root, value.getResources(), "resources", "resource" );
+            iterateResource( innerCount, root, value.getTestResources(), "testResources", "testResource" );
+            findAndReplaceSimpleElement( innerCount, root, "directory", value.getDirectory(), null );
+            findAndReplaceSimpleElement( innerCount, root, "finalName", value.getFinalName(), null );
+            findAndReplaceSimpleLists( innerCount, root, value.getFilters(), "filters", "filter" );
+            updatePluginManagement( value.getPluginManagement(), "pluginManagement", innerCount, root );
+            iteratePlugin( innerCount, root, value.getPlugins(), "plugins", "plugin" );
         }
-    } //-- void updateBuild(Build, String, Counter, Element)
+    } // -- void updateBuild(Build, String, Counter, Element)
 
     /**
      * Method updateBuildBase
-     *
+     * 
      * @param value
      * @param element
      * @param counter
      * @param xmlTag
      */
-    protected void updateBuildBase(BuildBase value, String xmlTag, Counter counter, Element element)
+    protected void updateBuildBase( BuildBase value, String xmlTag, Counter counter, Element element )
     {
         boolean shouldExist = value != null;
-        Element root = updateElement(counter, element, xmlTag, shouldExist);
-        if (shouldExist) {
-            Counter innerCount = new Counter(counter.getDepth() + 1);
-            findAndReplaceSimpleElement(innerCount, root,  "defaultGoal", value.getDefaultGoal(), null);
-            iterateResource(innerCount, root, value.getResources(),"resources","resource");
-            iterateResource(innerCount, root, value.getTestResources(),"testResources","testResource");
-            findAndReplaceSimpleElement(innerCount, root,  "directory", value.getDirectory(), null);
-            findAndReplaceSimpleElement(innerCount, root,  "finalName", value.getFinalName(), null);
-            findAndReplaceSimpleLists(innerCount, root, value.getFilters(), "filters", "filter");
-            updatePluginManagement( value.getPluginManagement(), "pluginManagement", innerCount, root);
-            iteratePlugin(innerCount, root, value.getPlugins(),"plugins","plugin");
+        Element root = updateElement( counter, element, xmlTag, shouldExist );
+        if ( shouldExist )
+        {
+            Counter innerCount = new Counter( counter.getDepth() + 1 );
+            findAndReplaceSimpleElement( innerCount, root, "defaultGoal", value.getDefaultGoal(), null );
+            iterateResource( innerCount, root, value.getResources(), "resources", "resource" );
+            iterateResource( innerCount, root, value.getTestResources(), "testResources", "testResource" );
+            findAndReplaceSimpleElement( innerCount, root, "directory", value.getDirectory(), null );
+            findAndReplaceSimpleElement( innerCount, root, "finalName", value.getFinalName(), null );
+            findAndReplaceSimpleLists( innerCount, root, value.getFilters(), "filters", "filter" );
+            updatePluginManagement( value.getPluginManagement(), "pluginManagement", innerCount, root );
+            iteratePlugin( innerCount, root, value.getPlugins(), "plugins", "plugin" );
         }
-    } //-- void updateBuildBase(BuildBase, String, Counter, Element)
+    } // -- void updateBuildBase(BuildBase, String, Counter, Element)
 
     /**
      * Method updateCiManagement
-     *
+     * 
      * @param value
      * @param element
      * @param counter
      * @param xmlTag
      */
-    protected void updateCiManagement(CiManagement value, String xmlTag, Counter counter, Element element)
+    protected void updateCiManagement( CiManagement value, String xmlTag, Counter counter, Element element )
     {
         boolean shouldExist = value != null;
-        Element root = updateElement(counter, element, xmlTag, shouldExist);
-        if (shouldExist) {
-            Counter innerCount = new Counter(counter.getDepth() + 1);
-            findAndReplaceSimpleElement(innerCount, root,  "system", value.getSystem(), null);
-            findAndReplaceSimpleElement(innerCount, root,  "url", value.getUrl(), null);
-            iterateNotifier(innerCount, root, value.getNotifiers(),"notifiers","notifier");
+        Element root = updateElement( counter, element, xmlTag, shouldExist );
+        if ( shouldExist )
+        {
+            Counter innerCount = new Counter( counter.getDepth() + 1 );
+            findAndReplaceSimpleElement( innerCount, root, "system", value.getSystem(), null );
+            findAndReplaceSimpleElement( innerCount, root, "url", value.getUrl(), null );
+            iterateNotifier( innerCount, root, value.getNotifiers(), "notifiers", "notifier" );
         }
-    } //-- void updateCiManagement(CiManagement, String, Counter, Element)
+    } // -- void updateCiManagement(CiManagement, String, Counter, Element)
 
     /**
      * Method updateConfigurationContainer
-     *
+     * 
      * @param value
      * @param element
      * @param counter
      * @param xmlTag
      */
-    protected void updateConfigurationContainer(ConfigurationContainer value, String xmlTag, Counter counter, Element element)
+    protected void updateConfigurationContainer( ConfigurationContainer value, String xmlTag, Counter counter,
+                                                 Element element )
     {
         boolean shouldExist = value != null;
-        Element root = updateElement(counter, element, xmlTag, shouldExist);
-        if (shouldExist) {
-            Counter innerCount = new Counter(counter.getDepth() + 1);
-            findAndReplaceSimpleElement(innerCount, root,  "inherited", value.getInherited(), null);
-            findAndReplaceXpp3DOM(innerCount, root, "configuration", (Xpp3Dom)value.getConfiguration());
+        Element root = updateElement( counter, element, xmlTag, shouldExist );
+        if ( shouldExist )
+        {
+            Counter innerCount = new Counter( counter.getDepth() + 1 );
+            findAndReplaceSimpleElement( innerCount, root, "inherited", value.getInherited(), null );
+            findAndReplaceXpp3DOM( innerCount, root, "configuration", (Xpp3Dom) value.getConfiguration() );
         }
-    } //-- void updateConfigurationContainer(ConfigurationContainer, String, Counter, Element)
+    } // -- void updateConfigurationContainer(ConfigurationContainer, String, Counter, Element)
 
     /**
      * Method updateContributor
-     *
+     * 
      * @param value
      * @param element
      * @param counter
      * @param xmlTag
      */
-    protected void updateContributor(Contributor value, String xmlTag, Counter counter, Element element)
+    protected void updateContributor( Contributor value, String xmlTag, Counter counter, Element element )
     {
         Element root = element;
-        Counter innerCount = new Counter(counter.getDepth() + 1);
-        findAndReplaceSimpleElement(innerCount, root,  "name", value.getName(), null);
-        findAndReplaceSimpleElement(innerCount, root,  "email", value.getEmail(), null);
-        findAndReplaceSimpleElement(innerCount, root,  "url", value.getUrl(), null);
-        findAndReplaceSimpleElement(innerCount, root,  "organization", value.getOrganization(), null);
-        findAndReplaceSimpleElement(innerCount, root,  "organizationUrl", value.getOrganizationUrl(), null);
-        findAndReplaceSimpleLists(innerCount, root, value.getRoles(), "roles", "role");
-        findAndReplaceSimpleElement(innerCount, root,  "timezone", value.getTimezone(), null);
-        findAndReplaceProperties(innerCount, root,  "properties", value.getProperties());
-    } //-- void updateContributor(Contributor, String, Counter, Element)
+        Counter innerCount = new Counter( counter.getDepth() + 1 );
+        findAndReplaceSimpleElement( innerCount, root, "name", value.getName(), null );
+        findAndReplaceSimpleElement( innerCount, root, "email", value.getEmail(), null );
+        findAndReplaceSimpleElement( innerCount, root, "url", value.getUrl(), null );
+        findAndReplaceSimpleElement( innerCount, root, "organization", value.getOrganization(), null );
+        findAndReplaceSimpleElement( innerCount, root, "organizationUrl", value.getOrganizationUrl(), null );
+        findAndReplaceSimpleLists( innerCount, root, value.getRoles(), "roles", "role" );
+        findAndReplaceSimpleElement( innerCount, root, "timezone", value.getTimezone(), null );
+        findAndReplaceProperties( innerCount, root, "properties", value.getProperties() );
+    } // -- void updateContributor(Contributor, String, Counter, Element)
 
     /**
      * Method updateDependency
-     *
+     * 
      * @param value
      * @param element
      * @param counter
      * @param xmlTag
      */
-    protected void updateDependency(Dependency value, String xmlTag, Counter counter, Element element)
+    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");
-    } //-- void updateDependency(Dependency, String, Counter, 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() ? null
+                        : String.valueOf( value.isOptional() ), "false" );
+    } // -- void updateDependency(Dependency, String, Counter, Element)
 
     /**
      * Method updateDependencyManagement
-     *
+     * 
      * @param value
      * @param element
      * @param counter
      * @param xmlTag
      */
-    protected void updateDependencyManagement(DependencyManagement value, String xmlTag, Counter counter, Element element)
+    protected void updateDependencyManagement( DependencyManagement value, String xmlTag, Counter counter,
+                                               Element element )
     {
         boolean shouldExist = value != null;
-        Element root = updateElement(counter, element, xmlTag, shouldExist);
-        if (shouldExist) {
-            Counter innerCount = new Counter(counter.getDepth() + 1);
-            iterateDependency(innerCount, root, value.getDependencies(),"dependencies","dependency");
+        Element root = updateElement( counter, element, xmlTag, shouldExist );
+        if ( shouldExist )
+        {
+            Counter innerCount = new Counter( counter.getDepth() + 1 );
+            iterateDependency( innerCount, root, value.getDependencies(), "dependencies", "dependency" );
         }
-    } //-- void updateDependencyManagement(DependencyManagement, String, Counter, Element)
+    } // -- void updateDependencyManagement(DependencyManagement, String, Counter, Element)
 
     /**
      * Method updateDeploymentRepository
-     *
+     * 
      * @param value
      * @param element
      * @param counter
      * @param xmlTag
      */
-    protected void updateDeploymentRepository(DeploymentRepository value, String xmlTag, Counter counter, Element element)
+    protected void updateDeploymentRepository( DeploymentRepository value, String xmlTag, Counter counter,
+                                               Element element )
     {
         boolean shouldExist = value != null;
-        Element root = updateElement(counter, element, xmlTag, shouldExist);
-        if (shouldExist) {
-            Counter innerCount = new Counter(counter.getDepth() + 1);
-            findAndReplaceSimpleElement(innerCount, root,  "uniqueVersion", value.isUniqueVersion() == true ? null : String.valueOf( value.isUniqueVersion() ), "true");
-            findAndReplaceSimpleElement(innerCount, root,  "id", value.getId(), null);
-            findAndReplaceSimpleElement(innerCount, root,  "name", value.getName(), null);
-            findAndReplaceSimpleElement(innerCount, root,  "url", value.getUrl(), null);
-            findAndReplaceSimpleElement(innerCount, root,  "layout", value.getLayout(), "default");
+        Element root = updateElement( counter, element, xmlTag, shouldExist );
+        if ( shouldExist )
+        {
+            Counter innerCount = new Counter( counter.getDepth() + 1 );
+            findAndReplaceSimpleElement( innerCount, root, "uniqueVersion", value.isUniqueVersion() ? null
+                            : String.valueOf( value.isUniqueVersion() ), "true" );
+            findAndReplaceSimpleElement( innerCount, root, "id", value.getId(), null );
+            findAndReplaceSimpleElement( innerCount, root, "name", value.getName(), null );
+            findAndReplaceSimpleElement( innerCount, root, "url", value.getUrl(), null );
+            findAndReplaceSimpleElement( innerCount, root, "layout", value.getLayout(), "default" );
         }
-    } //-- void updateDeploymentRepository(DeploymentRepository, String, Counter, Element)
+    } // -- void updateDeploymentRepository(DeploymentRepository, String, Counter, Element)
 
     /**
      * Method updateDeveloper
-     *
+     * 
      * @param value
      * @param element
      * @param counter
      * @param xmlTag
      */
-    protected void updateDeveloper(Developer value, String xmlTag, Counter counter, Element element)
+    protected void updateDeveloper( Developer value, String xmlTag, Counter counter, Element element )
     {
         Element root = element;
-        Counter innerCount = new Counter(counter.getDepth() + 1);
-        findAndReplaceSimpleElement(innerCount, root,  "id", value.getId(), null);
-        findAndReplaceSimpleElement(innerCount, root,  "name", value.getName(), null);
-        findAndReplaceSimpleElement(innerCount, root,  "email", value.getEmail(), null);
-        findAndReplaceSimpleElement(innerCount, root,  "url", value.getUrl(), null);
-        findAndReplaceSimpleElement(innerCount, root,  "organization", value.getOrganization(), null);
-        findAndReplaceSimpleElement(innerCount, root,  "organizationUrl", value.getOrganizationUrl(), null);
-        findAndReplaceSimpleLists(innerCount, root, value.getRoles(), "roles", "role");
-        findAndReplaceSimpleElement(innerCount, root,  "timezone", value.getTimezone(), null);
-        findAndReplaceProperties(innerCount, root,  "properties", value.getProperties());
-    } //-- void updateDeveloper(Developer, String, Counter, Element)
+        Counter innerCount = new Counter( counter.getDepth() + 1 );
+        findAndReplaceSimpleElement( innerCount, root, "id", value.getId(), null );
+        findAndReplaceSimpleElement( innerCount, root, "name", value.getName(), null );
+        findAndReplaceSimpleElement( innerCount, root, "email", value.getEmail(), null );
+        findAndReplaceSimpleElement( innerCount, root, "url", value.getUrl(), null );
+        findAndReplaceSimpleElement( innerCount, root, "organization", value.getOrganization(), null );
+        findAndReplaceSimpleElement( innerCount, root, "organizationUrl", value.getOrganizationUrl(), null );
+        findAndReplaceSimpleLists( innerCount, root, value.getRoles(), "roles", "role" );
+        findAndReplaceSimpleElement( innerCount, root, "timezone", value.getTimezone(), null );
+        findAndReplaceProperties( innerCount, root, "properties", value.getProperties() );
+    } // -- void updateDeveloper(Developer, String, Counter, Element)
 
     /**
      * Method updateDistributionManagement
-     *
+     * 
      * @param value
      * @param element
      * @param counter
      * @param xmlTag
      */
-    protected void updateDistributionManagement(DistributionManagement value, String xmlTag, Counter counter, Element element)
+    protected void updateDistributionManagement( DistributionManagement value, String xmlTag, Counter counter,
+                                                 Element element )
     {
         boolean shouldExist = value != null;
-        Element root = updateElement(counter, element, xmlTag, shouldExist);
-        if (shouldExist) {
-            Counter innerCount = new Counter(counter.getDepth() + 1);
-            updateDeploymentRepository( value.getRepository(), "repository", innerCount, root);
-            updateDeploymentRepository( value.getSnapshotRepository(), "snapshotRepository", innerCount, root);
-            updateSite( value.getSite(), "site", innerCount, root);
-            findAndReplaceSimpleElement(innerCount, root,  "downloadUrl", value.getDownloadUrl(), null);
-            updateRelocation( value.getRelocation(), "relocation", innerCount, root);
-            findAndReplaceSimpleElement(innerCount, root,  "status", value.getStatus(), null);
+        Element root = updateElement( counter, element, xmlTag, shouldExist );

[... 1150 lines stripped ...]