Revert "Reformatted to code style"

Something creepy is going on @ localhost

This reverts commit 8858a32d7b5c59f230db137d8321ce2be254557b.

git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk@1517906 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/java/org/apache/maven/plugin/ant/AntBuildWriter.java b/src/main/java/org/apache/maven/plugin/ant/AntBuildWriter.java
index 9a4a09c..6b69ad3 100644
--- a/src/main/java/org/apache/maven/plugin/ant/AntBuildWriter.java
+++ b/src/main/java/org/apache/maven/plugin/ant/AntBuildWriter.java
@@ -126,8 +126,8 @@
     /**
      * Generate <code>maven-build.properties</code> only for a non-POM project
      *
-     * @throws IOException
      * @see #DEFAULT_MAVEN_PROPERTIES_FILENAME
+     * @throws IOException
      */
     protected void writeBuildProperties()
         throws IOException
@@ -143,67 +143,67 @@
         // Build properties
         // ----------------------------------------------------------------------
 
-        addProperty( properties, "maven.build.finalName",
-                     AntBuildWriterUtil.toRelative( project.getBasedir(), project.getBuild().getFinalName() ) );
+        addProperty( properties, "maven.build.finalName", AntBuildWriterUtil.toRelative( project.getBasedir(), project
+            .getBuild().getFinalName() ) );
 
         // target
-        addProperty( properties, "maven.build.dir",
-                     AntBuildWriterUtil.toRelative( project.getBasedir(), project.getBuild().getDirectory() ) );
+        addProperty( properties, "maven.build.dir", AntBuildWriterUtil.toRelative( project.getBasedir(), project.getBuild()
+            .getDirectory() ) );
         addProperty( properties, "project.build.directory", "${maven.build.dir}" );
 
         // ${maven.build.dir}/classes
-        addProperty( properties, "maven.build.outputDir", "${maven.build.dir}/" + AntBuildWriterUtil.toRelative(
-            new File( project.getBasedir(), properties.getProperty( "maven.build.dir" ) ),
-            project.getBuild().getOutputDirectory() ) );
+        addProperty( properties, "maven.build.outputDir", "${maven.build.dir}/"
+            + AntBuildWriterUtil.toRelative( new File( project.getBasedir(), properties.getProperty( "maven.build.dir" ) ),
+                                    project.getBuild().getOutputDirectory() ) );
         addProperty( properties, "project.build.outputDirectory", "${maven.build.outputDir}" );
 
         // src/main/java
         if ( !project.getCompileSourceRoots().isEmpty() )
         {
             List var = project.getCompileSourceRoots();
-            String[] compileSourceRoots = (String[]) var.toArray( new String[var.size()] );
+            String[] compileSourceRoots = (String[]) var.toArray(new String[var.size()]);
             for ( int i = 0; i < compileSourceRoots.length; i++ )
             {
-                addProperty( properties, "maven.build.srcDir." + i,
-                             AntBuildWriterUtil.toRelative( project.getBasedir(), compileSourceRoots[i] ) );
+                addProperty( properties, "maven.build.srcDir." + i, AntBuildWriterUtil.toRelative( project.getBasedir(),
+                                                                                          compileSourceRoots[i] ) );
             }
         }
         // src/main/resources
         if ( project.getBuild().getResources() != null )
         {
             List<Resource> var = project.getBuild().getResources();
-            Resource[] array = var.toArray( new Resource[var.size()] );
+            Resource[] array = var.toArray(new Resource[var.size()]);
             for ( int i = 0; i < array.length; i++ )
             {
-                addProperty( properties, "maven.build.resourceDir." + i,
-                             AntBuildWriterUtil.toRelative( project.getBasedir(), array[i].getDirectory() ) );
+                addProperty( properties, "maven.build.resourceDir." + i, AntBuildWriterUtil.toRelative( project.getBasedir(),
+                                                                                               array[i].getDirectory() ) );
             }
         }
 
         // ${maven.build.dir}/test-classes
-        addProperty( properties, "maven.build.testOutputDir", "${maven.build.dir}/" + AntBuildWriterUtil.toRelative(
-            new File( project.getBasedir(), properties.getProperty( "maven.build.dir" ) ),
-            project.getBuild().getTestOutputDirectory() ) );
+        addProperty( properties, "maven.build.testOutputDir", "${maven.build.dir}/"
+            + AntBuildWriterUtil.toRelative( new File( project.getBasedir(), properties.getProperty( "maven.build.dir" ) ),
+                                    project.getBuild().getTestOutputDirectory() ) );
         // src/test/java
         if ( !project.getTestCompileSourceRoots().isEmpty() )
         {
             List var = project.getTestCompileSourceRoots();
-            String[] compileSourceRoots = (String[]) var.toArray( new String[var.size()] );
+            String[] compileSourceRoots = (String[]) var.toArray(new String[var.size()]);
             for ( int i = 0; i < compileSourceRoots.length; i++ )
             {
-                addProperty( properties, "maven.build.testDir." + i,
-                             AntBuildWriterUtil.toRelative( project.getBasedir(), compileSourceRoots[i] ) );
+                addProperty( properties, "maven.build.testDir." + i, AntBuildWriterUtil.toRelative( project.getBasedir(),
+                                                                                           compileSourceRoots[i] ) );
             }
         }
         // src/test/resources
         if ( project.getBuild().getTestResources() != null )
         {
             List<Resource> var = project.getBuild().getTestResources();
-            Resource[] array = var.toArray( new Resource[var.size()] );
+            Resource[] array = var.toArray(new Resource[var.size()]);
             for ( int i = 0; i < array.length; i++ )
             {
-                addProperty( properties, "maven.build.testResourceDir." + i,
-                             AntBuildWriterUtil.toRelative( project.getBasedir(), array[i].getDirectory() ) );
+                addProperty( properties, "maven.build.testResourceDir." + i, AntBuildWriterUtil
+                    .toRelative( project.getBasedir(), array[i].getDirectory() ) );
             }
         }
 
@@ -225,10 +225,9 @@
 
         if ( project.getProperties() != null )
         {
-            for ( Map.Entry<Object, Object> objectObjectEntry : project.getProperties().entrySet() )
-            {
+            for (Map.Entry<Object, Object> objectObjectEntry : project.getProperties().entrySet()) {
                 Map.Entry property = (Map.Entry) objectObjectEntry;
-                addProperty( properties, property.getKey().toString(), property.getValue().toString() );
+                addProperty(properties, property.getKey().toString(), property.getValue().toString());
             }
         }
 
@@ -247,8 +246,8 @@
     /**
      * Generate an <code>maven-build.xml</code>
      *
-     * @throws IOException
      * @see #DEFAULT_MAVEN_BUILD_FILENAME
+     * @throws IOException
      */
     private void writeGeneratedBuildXml()
         throws IOException
@@ -260,8 +259,8 @@
 
         OutputStreamWriter w = new OutputStreamWriter( new FileOutputStream( outputFile ), encoding );
 
-        XMLWriter writer =
-            new PrettyPrintXMLWriter( w, StringUtils.repeat( " ", DEFAULT_INDENTATION_SIZE ), encoding, null );
+        XMLWriter writer = new PrettyPrintXMLWriter( w, StringUtils.repeat( " ", DEFAULT_INDENTATION_SIZE ), encoding,
+                                                     null );
 
         // ----------------------------------------------------------------------
         // <!-- comments -->
@@ -309,8 +308,8 @@
         // <target name="compile-tests" />
         // ----------------------------------------------------------------------
 
-        List testCompileSourceRoots =
-            AntBuildWriterUtil.removeEmptyCompileSourceRoots( project.getTestCompileSourceRoots() );
+        List testCompileSourceRoots = AntBuildWriterUtil.removeEmptyCompileSourceRoots( project
+            .getTestCompileSourceRoots() );
         writeCompileTestsTarget( writer, testCompileSourceRoots );
 
         // ----------------------------------------------------------------------
@@ -346,8 +345,8 @@
     /**
      * Generate an generic <code>build.xml</code> if not already exist
      *
-     * @throws IOException
      * @see #DEFAULT_BUILD_FILENAME
+     * @throws IOException
      */
     private void writeBuildXml()
         throws IOException
@@ -363,8 +362,8 @@
 
         OutputStreamWriter w = new OutputStreamWriter( new FileOutputStream( outputFile ), encoding );
 
-        XMLWriter writer =
-            new PrettyPrintXMLWriter( w, StringUtils.repeat( " ", DEFAULT_INDENTATION_SIZE ), encoding, null );
+        XMLWriter writer = new PrettyPrintXMLWriter( w, StringUtils.repeat( " ", DEFAULT_INDENTATION_SIZE ), encoding,
+                                                     null );
 
         // ----------------------------------------------------------------------
         // <!-- comments -->
@@ -383,8 +382,8 @@
 
         XmlWriterUtil.writeLineBreak( writer );
 
-        XmlWriterUtil.writeCommentText( writer, "Import " + DEFAULT_MAVEN_BUILD_FILENAME + " into the current project",
-                                        1 );
+        XmlWriterUtil.writeCommentText( writer, "Import " + DEFAULT_MAVEN_BUILD_FILENAME
+            + " into the current project", 1 );
 
         writer.startElement( "import" );
         writer.addAttribute( "file", DEFAULT_MAVEN_BUILD_FILENAME );
@@ -453,26 +452,25 @@
 
         writer.startElement( "property" );
         writer.addAttribute( "name", "maven.build.dir" );
-        writer.addAttribute( "value",
-                             AntBuildWriterUtil.toRelative( project.getBasedir(), project.getBuild().getDirectory() ) );
+        writer.addAttribute( "value", AntBuildWriterUtil.toRelative( project.getBasedir(), project.getBuild().getDirectory() ) );
         writer.endElement(); // property
 
         writer.startElement( "property" );
         writer.addAttribute( "name", "maven.build.outputDir" );
-        writer.addAttribute( "value", "${maven.build.dir}/" + AntBuildWriterUtil.toRelative(
-            new File( project.getBuild().getDirectory() ), project.getBuild().getOutputDirectory() ) );
+        writer.addAttribute( "value", "${maven.build.dir}/"
+            + AntBuildWriterUtil.toRelative( new File( project.getBuild().getDirectory() ), project.getBuild()
+                .getOutputDirectory() ) );
         writer.endElement(); // property
 
         if ( !project.getCompileSourceRoots().isEmpty() )
         {
             List var = project.getCompileSourceRoots();
-            String[] compileSourceRoots = (String[]) var.toArray( new String[var.size()] );
+            String[] compileSourceRoots = (String[]) var.toArray(new String[var.size()]);
             for ( int i = 0; i < compileSourceRoots.length; i++ )
             {
                 writer.startElement( "property" );
                 writer.addAttribute( "name", "maven.build.srcDir." + i );
-                writer.addAttribute( "value",
-                                     AntBuildWriterUtil.toRelative( project.getBasedir(), compileSourceRoots[i] ) );
+                writer.addAttribute( "value", AntBuildWriterUtil.toRelative( project.getBasedir(), compileSourceRoots[i] ) );
                 writer.endElement(); // property
             }
         }
@@ -480,33 +478,32 @@
         if ( project.getBuild().getResources() != null )
         {
             List<Resource> var = project.getBuild().getResources();
-            Resource[] array = var.toArray( new Resource[var.size()] );
+            Resource[] array = var.toArray(new Resource[var.size()]);
             for ( int i = 0; i < array.length; i++ )
             {
                 writer.startElement( "property" );
                 writer.addAttribute( "name", "maven.build.resourceDir." + i );
-                writer.addAttribute( "value",
-                                     AntBuildWriterUtil.toRelative( project.getBasedir(), array[i].getDirectory() ) );
+                writer.addAttribute( "value", AntBuildWriterUtil.toRelative( project.getBasedir(), array[i].getDirectory() ) );
                 writer.endElement(); // property
             }
         }
 
         writer.startElement( "property" );
         writer.addAttribute( "name", "maven.build.testOutputDir" );
-        writer.addAttribute( "value", "${maven.build.dir}/" + AntBuildWriterUtil.toRelative(
-            new File( project.getBuild().getDirectory() ), project.getBuild().getTestOutputDirectory() ) );
+        writer.addAttribute( "value", "${maven.build.dir}/"
+            + AntBuildWriterUtil.toRelative( new File( project.getBuild().getDirectory() ), project.getBuild()
+                .getTestOutputDirectory() ) );
         writer.endElement(); // property
 
         if ( !project.getTestCompileSourceRoots().isEmpty() )
         {
             List var = project.getTestCompileSourceRoots();
-            String[] compileSourceRoots = (String[]) var.toArray( new String[var.size()] );
+            String[] compileSourceRoots = (String[]) var.toArray(new String[var.size()]);
             for ( int i = 0; i < compileSourceRoots.length; i++ )
             {
                 writer.startElement( "property" );
                 writer.addAttribute( "name", "maven.build.testDir." + i );
-                writer.addAttribute( "value",
-                                     AntBuildWriterUtil.toRelative( project.getBasedir(), compileSourceRoots[i] ) );
+                writer.addAttribute( "value", AntBuildWriterUtil.toRelative( project.getBasedir(), compileSourceRoots[i] ) );
                 writer.endElement(); // property
             }
         }
@@ -514,13 +511,12 @@
         if ( project.getBuild().getTestResources() != null )
         {
             List<Resource> var = project.getBuild().getTestResources();
-            Resource[] array = var.toArray( new Resource[var.size()] );
+            Resource[] array = var.toArray(new Resource[var.size()]);
             for ( int i = 0; i < array.length; i++ )
             {
                 writer.startElement( "property" );
                 writer.addAttribute( "name", "maven.build.testResourceDir." + i );
-                writer.addAttribute( "value",
-                                     AntBuildWriterUtil.toRelative( project.getBasedir(), array[i].getDirectory() ) );
+                writer.addAttribute( "value", AntBuildWriterUtil.toRelative( project.getBasedir(), array[i].getDirectory() ) );
                 writer.endElement(); // property
             }
         }
@@ -538,8 +534,8 @@
         }
         writer.startElement( "property" );
         writer.addAttribute( "name", "maven.reporting.outputDirectory" );
-        writer.addAttribute( "value", "${maven.build.dir}/" + AntBuildWriterUtil.toRelative(
-            new File( project.getBuild().getDirectory() ), reportingOutputDir ) );
+        writer.addAttribute( "value", "${maven.build.dir}/"
+            + AntBuildWriterUtil.toRelative( new File( project.getBuild().getDirectory() ), reportingOutputDir ) );
         writer.endElement(); // property
 
         // ----------------------------------------------------------------------
@@ -613,22 +609,18 @@
         writer.startElement( "path" );
         writer.addAttribute( "id", id );
 
-        for ( Object artifact1 : artifacts )
-        {
+        for (Object artifact1 : artifacts) {
             Artifact artifact = (Artifact) artifact1;
 
-            writer.startElement( "pathelement" );
+            writer.startElement("pathelement");
 
             String path;
-            if ( Artifact.SCOPE_SYSTEM.equals( artifact.getScope() ) )
-            {
-                path = getUninterpolatedSystemPath( artifact );
+            if (Artifact.SCOPE_SYSTEM.equals(artifact.getScope())) {
+                path = getUninterpolatedSystemPath(artifact);
+            } else {
+                path = "${maven.repo.local}/" + artifactResolverWrapper.getLocalArtifactPath(artifact);
             }
-            else
-            {
-                path = "${maven.repo.local}/" + artifactResolverWrapper.getLocalArtifactPath( artifact );
-            }
-            writer.addAttribute( "location", path );
+            writer.addAttribute("location", path);
 
             writer.endElement(); // pathelement
         }
@@ -640,20 +632,15 @@
     {
         String managementKey = artifact.getDependencyConflictId();
 
-        for ( Dependency dependency : project.getOriginalModel().getDependencies() )
-        {
-            if ( managementKey.equals( dependency.getManagementKey() ) )
-            {
+        for (Dependency dependency : project.getOriginalModel().getDependencies()) {
+            if (managementKey.equals(dependency.getManagementKey())) {
                 return dependency.getSystemPath();
             }
         }
 
-        for ( Profile profile : project.getOriginalModel().getProfiles() )
-        {
-            for ( Dependency dependency : profile.getDependencies() )
-            {
-                if ( managementKey.equals( dependency.getManagementKey() ) )
-                {
+        for (Profile profile : project.getOriginalModel().getProfiles()) {
+            for (Dependency dependency : profile.getDependencies()) {
+                if (managementKey.equals(dependency.getManagementKey())) {
                     return dependency.getSystemPath();
                 }
             }
@@ -668,13 +655,11 @@
         props.put( "basedir", project.getBasedir().getAbsolutePath() );
 
         SortedMap candidateProperties = new TreeMap();
-        for ( Object o : props.keySet() )
-        {
+        for (Object o : props.keySet()) {
             String key = (String) o;
-            String value = new File( props.getProperty( key ) ).getPath();
-            if ( path.startsWith( value ) && value.length() > 0 )
-            {
-                candidateProperties.put( value, key );
+            String value = new File(props.getProperty(key)).getPath();
+            if (path.startsWith(value) && value.length() > 0) {
+                candidateProperties.put(value, key);
             }
         }
         if ( !candidateProperties.isEmpty() )
@@ -706,10 +691,9 @@
         {
             if ( project.getModules() != null )
             {
-                for ( Object o : project.getModules() )
-                {
+                for (Object o : project.getModules()) {
                     String moduleSubPath = (String) o;
-                    AntBuildWriterUtil.writeAntTask( writer, project, moduleSubPath, "clean" );
+                    AntBuildWriterUtil.writeAntTask(writer, project, moduleSubPath, "clean");
                 }
             }
         }
@@ -744,10 +728,9 @@
             writer.addAttribute( "description", "Compile the code" );
             if ( project.getModules() != null )
             {
-                for ( Object o : project.getModules() )
-                {
+                for (Object o : project.getModules()) {
                     String moduleSubPath = (String) o;
-                    AntBuildWriterUtil.writeAntTask( writer, project, moduleSubPath, "compile" );
+                    AntBuildWriterUtil.writeAntTask(writer, project, moduleSubPath, "compile");
                 }
             }
             writer.endElement(); // target
@@ -787,10 +770,9 @@
             writer.addAttribute( "description", "Compile the test code" );
             if ( project.getModules() != null )
             {
-                for ( Object o : project.getModules() )
-                {
+                for (Object o : project.getModules()) {
                     String moduleSubPath = (String) o;
-                    AntBuildWriterUtil.writeAntTask( writer, project, moduleSubPath, "compile-tests" );
+                    AntBuildWriterUtil.writeAntTask(writer, project, moduleSubPath, "compile-tests");
                 }
             }
             writer.endElement(); // target
@@ -830,10 +812,9 @@
             writer.addAttribute( "description", "Run the test cases" );
             if ( project.getModules() != null )
             {
-                for ( Object o : project.getModules() )
-                {
+                for (Object o : project.getModules()) {
                     String moduleSubPath = (String) o;
-                    AntBuildWriterUtil.writeAntTask( writer, project, moduleSubPath, "test" );
+                    AntBuildWriterUtil.writeAntTask(writer, project, moduleSubPath, "test");
                 }
             }
             writer.endElement(); // target
@@ -900,7 +881,7 @@
                 writer.addAttribute( "todir", "${maven.test.reports}" );
                 writer.addAttribute( "if", "test" );
 
-                includes = Arrays.asList( new String[]{ "**/${test}.java" } );
+                includes = Arrays.asList( new String[] { "**/${test}.java" } );
 
                 writeTestFilesets( writer, testCompileSourceRoots, includes, excludes );
 
@@ -964,8 +945,7 @@
             writer.endElement(); // echo
 
             writer.startElement( "echo" );
-            writer.writeText(
-                " JUnit is not present in the test classpath or your $ANT_HOME/lib directory. Tests not executed." );
+            writer.writeText( " JUnit is not present in the test classpath or your $ANT_HOME/lib directory. Tests not executed." );
             writer.endElement(); // echo
 
             writer.startElement( "echo" );
@@ -986,11 +966,10 @@
     private List getTestIncludes()
         throws IOException
     {
-        List includes =
-            getSelectorList( AntBuildWriterUtil.getMavenSurefirePluginOptions( project, "includes", null ) );
+        List includes = getSelectorList( AntBuildWriterUtil.getMavenSurefirePluginOptions( project, "includes", null ) );
         if ( includes == null || includes.isEmpty() )
         {
-            includes = Arrays.asList( new String[]{ "**/Test*.java", "**/*Test.java", "**/*TestCase.java" } );
+            includes = Arrays.asList( new String[] { "**/Test*.java", "**/*Test.java", "**/*TestCase.java" } );
         }
         return includes;
     }
@@ -1003,11 +982,10 @@
     private List getTestExcludes()
         throws IOException
     {
-        List excludes =
-            getSelectorList( AntBuildWriterUtil.getMavenSurefirePluginOptions( project, "excludes", null ) );
+        List excludes = getSelectorList( AntBuildWriterUtil.getMavenSurefirePluginOptions( project, "excludes", null ) );
         if ( excludes == null || excludes.isEmpty() )
         {
-            excludes = Arrays.asList( new String[]{ "**/*Abstract*Test.java" } );
+            excludes = Arrays.asList( new String[] { "**/*Abstract*Test.java" } );
         }
         return excludes;
     }
@@ -1051,10 +1029,9 @@
         {
             if ( project.getModules() != null )
             {
-                for ( Object o : project.getModules() )
-                {
+                for (Object o : project.getModules()) {
                     String moduleSubPath = (String) o;
-                    AntBuildWriterUtil.writeAntTask( writer, project, moduleSubPath, "javadoc" );
+                    AntBuildWriterUtil.writeAntTask(writer, project, moduleSubPath, "javadoc");
                 }
             }
         }
@@ -1093,10 +1070,9 @@
         {
             if ( project.getModules() != null )
             {
-                for ( Object o : project.getModules() )
-                {
+                for (Object o : project.getModules()) {
                     String moduleSubPath = (String) o;
-                    AntBuildWriterUtil.writeAntTask( writer, project, moduleSubPath, "package" );
+                    AntBuildWriterUtil.writeAntTask(writer, project, moduleSubPath, "package");
                 }
             }
         }
@@ -1120,9 +1096,8 @@
             else
             {
                 writer.startElement( "echo" );
-                writer.addAttribute( "message",
-                                     "No Ant task exists for the packaging '" + project.getPackaging() + "'. "
-                                         + "You could overrided the Ant package target in your build.xml." );
+                writer.addAttribute( "message", "No Ant task exists for the packaging '" + project.getPackaging()
+                    + "'. " + "You could overrided the Ant package target in your build.xml." );
                 writer.endElement(); // echo
             }
         }
@@ -1133,8 +1108,8 @@
 
         if ( synonym != null )
         {
-            XmlWriterUtil.writeCommentText( writer, "A dummy target for the package named after the type it creates",
-                                            1 );
+            XmlWriterUtil.writeCommentText( writer,
+                                                 "A dummy target for the package named after the type it creates", 1 );
             writer.startElement( "target" );
             writer.addAttribute( "name", synonym );
             writer.addAttribute( "depends", "package" );
@@ -1145,8 +1120,8 @@
         }
     }
 
-    private void writeCompileTasks( XMLWriter writer, String outputDirectory, List compileSourceRoots, List resources,
-                                    String additionalClassesDirectory, boolean isTest )
+    private void writeCompileTasks( XMLWriter writer, String outputDirectory, List compileSourceRoots,
+                                   List resources, String additionalClassesDirectory, boolean isTest )
         throws IOException
     {
         writer.startElement( "mkdir" );
@@ -1158,56 +1133,35 @@
             writer.startElement( "javac" );
             writer.addAttribute( "destdir", outputDirectory );
             Map[] includes = AntBuildWriterUtil.getMavenCompilerPluginOptions( project, "includes", null );
-            AntBuildWriterUtil.addWrapAttribute( writer, "javac", "includes",
-                                                 getCommaSeparatedList( includes, "include" ), 3 );
+            AntBuildWriterUtil.addWrapAttribute( writer, "javac", "includes", getCommaSeparatedList( includes,
+                                                                                                     "include" ), 3 );
             Map[] excludes = AntBuildWriterUtil.getMavenCompilerPluginOptions( project, "excludes", null );
-            AntBuildWriterUtil.addWrapAttribute( writer, "javac", "excludes",
-                                                 getCommaSeparatedList( excludes, "exclude" ), 3 );
-            AntBuildWriterUtil.addWrapAttribute( writer, "javac", "encoding",
-                                                 AntBuildWriterUtil.getMavenCompilerPluginBasicOption( project,
-                                                                                                       "encoding",
-                                                                                                       null ), 3 );
-            AntBuildWriterUtil.addWrapAttribute( writer, "javac", "nowarn",
-                                                 AntBuildWriterUtil.getMavenCompilerPluginBasicOption( project,
-                                                                                                       "showWarnings",
-                                                                                                       "false" ), 3 );
-            AntBuildWriterUtil.addWrapAttribute( writer, "javac", "debug",
-                                                 AntBuildWriterUtil.getMavenCompilerPluginBasicOption( project, "debug",
-                                                                                                       "true" ), 3 );
-            AntBuildWriterUtil.addWrapAttribute( writer, "javac", "optimize",
-                                                 AntBuildWriterUtil.getMavenCompilerPluginBasicOption( project,
-                                                                                                       "optimize",
-                                                                                                       "false" ), 3 );
-            AntBuildWriterUtil.addWrapAttribute( writer, "javac", "deprecation",
-                                                 AntBuildWriterUtil.getMavenCompilerPluginBasicOption( project,
-                                                                                                       "showDeprecation",
-                                                                                                       "true" ), 3 );
-            AntBuildWriterUtil.addWrapAttribute( writer, "javac", "target",
-                                                 AntBuildWriterUtil.getMavenCompilerPluginBasicOption( project,
-                                                                                                       "target",
-                                                                                                       "1.1" ), 3 );
-            AntBuildWriterUtil.addWrapAttribute( writer, "javac", "verbose",
-                                                 AntBuildWriterUtil.getMavenCompilerPluginBasicOption( project,
-                                                                                                       "verbose",
-                                                                                                       "false" ), 3 );
-            AntBuildWriterUtil.addWrapAttribute( writer, "javac", "fork",
-                                                 AntBuildWriterUtil.getMavenCompilerPluginBasicOption( project, "fork",
-                                                                                                       "false" ), 3 );
-            AntBuildWriterUtil.addWrapAttribute( writer, "javac", "memoryMaximumSize",
-                                                 AntBuildWriterUtil.getMavenCompilerPluginBasicOption( project,
-                                                                                                       "meminitial",
-                                                                                                       null ), 3 );
-            AntBuildWriterUtil.addWrapAttribute( writer, "javac", "memoryInitialSize",
-                                                 AntBuildWriterUtil.getMavenCompilerPluginBasicOption( project,
-                                                                                                       "maxmem", null ),
-                                                 3 );
-            AntBuildWriterUtil.addWrapAttribute( writer, "javac", "source",
-                                                 AntBuildWriterUtil.getMavenCompilerPluginBasicOption( project,
-                                                                                                       "source",
-                                                                                                       "1.3" ), 3 );
+            AntBuildWriterUtil.addWrapAttribute( writer, "javac", "excludes", getCommaSeparatedList( excludes,
+                                                                                                     "exclude" ), 3 );
+            AntBuildWriterUtil.addWrapAttribute( writer, "javac", "encoding", AntBuildWriterUtil
+                .getMavenCompilerPluginBasicOption( project, "encoding", null ), 3 );
+            AntBuildWriterUtil.addWrapAttribute( writer, "javac", "nowarn", AntBuildWriterUtil
+                .getMavenCompilerPluginBasicOption( project, "showWarnings", "false" ), 3 );
+            AntBuildWriterUtil.addWrapAttribute( writer, "javac", "debug", AntBuildWriterUtil
+                .getMavenCompilerPluginBasicOption( project, "debug", "true" ), 3 );
+            AntBuildWriterUtil.addWrapAttribute( writer, "javac", "optimize", AntBuildWriterUtil
+                .getMavenCompilerPluginBasicOption( project, "optimize", "false" ), 3 );
+            AntBuildWriterUtil.addWrapAttribute( writer, "javac", "deprecation", AntBuildWriterUtil
+                .getMavenCompilerPluginBasicOption( project, "showDeprecation", "true" ), 3 );
+            AntBuildWriterUtil.addWrapAttribute( writer, "javac", "target", AntBuildWriterUtil
+                .getMavenCompilerPluginBasicOption( project, "target", "1.1" ), 3 );
+            AntBuildWriterUtil.addWrapAttribute( writer, "javac", "verbose", AntBuildWriterUtil
+                .getMavenCompilerPluginBasicOption( project, "verbose", "false" ), 3 );
+            AntBuildWriterUtil.addWrapAttribute( writer, "javac", "fork", AntBuildWriterUtil
+                .getMavenCompilerPluginBasicOption( project, "fork", "false" ), 3 );
+            AntBuildWriterUtil.addWrapAttribute( writer, "javac", "memoryMaximumSize", AntBuildWriterUtil
+                .getMavenCompilerPluginBasicOption( project, "meminitial", null ), 3 );
+            AntBuildWriterUtil.addWrapAttribute( writer, "javac", "memoryInitialSize", AntBuildWriterUtil
+                .getMavenCompilerPluginBasicOption( project, "maxmem", null ), 3 );
+            AntBuildWriterUtil.addWrapAttribute( writer, "javac", "source", AntBuildWriterUtil
+                .getMavenCompilerPluginBasicOption( project, "source", "1.3" ), 3 );
 
-            String[] compileSourceRootsArray =
-                (String[]) compileSourceRoots.toArray( new String[compileSourceRoots.size()] );
+            String[] compileSourceRootsArray = (String[]) compileSourceRoots.toArray(new String[compileSourceRoots.size()]);
             for ( int i = 0; i < compileSourceRootsArray.length; i++ )
             {
                 writer.startElement( "src" );
@@ -1259,7 +1213,7 @@
             writer.endElement(); // javac
         }
 
-        Resource[] array = (Resource[]) resources.toArray( new Resource[resources.size()] );
+        Resource[] array = (Resource[]) resources.toArray(new Resource[resources.size()]);
         for ( int i = 0; i < array.length; i++ )
         {
             Resource resource = array[i];
@@ -1330,8 +1284,7 @@
         writer.addAttribute( "name", "get-deps" );
         AntBuildWriterUtil.addWrapAttribute( writer, "target", "depends", "test-offline", 2 );
         AntBuildWriterUtil.addWrapAttribute( writer, "target", "description", "Download all dependencies", 2 );
-        AntBuildWriterUtil.addWrapAttribute( writer, "target", "unless", "maven.mode.offline",
-                                             2 ); // TODO: check, and differs from m1
+        AntBuildWriterUtil.addWrapAttribute( writer, "target", "unless", "maven.mode.offline", 2 ); // TODO: check, and differs from m1
 
         writer.startElement( "mkdir" );
         writer.addAttribute( "dir", "${maven.repo.local}" );
@@ -1340,55 +1293,45 @@
         String basedir = project.getBasedir().getAbsolutePath();
 
         // TODO: proxy - probably better to use wagon!
-        for ( Object o : project.getTestArtifacts() )
-        {
+        for (Object o : project.getTestArtifacts()) {
             Artifact artifact = (Artifact) o;
 
-            if ( Artifact.SCOPE_SYSTEM.equals( artifact.getScope() ) )
-            {
+            if (Artifact.SCOPE_SYSTEM.equals(artifact.getScope())) {
                 continue;
             }
 
-            String path = artifactResolverWrapper.getLocalArtifactPath( artifact );
+            String path = artifactResolverWrapper.getLocalArtifactPath(artifact);
 
-            if ( !new File( path ).exists() )
-            {
-                File parentDirs = new File( path ).getParentFile();
-                if ( parentDirs != null )
-                {
-                    writer.startElement( "mkdir" );
+            if (!new File(path).exists()) {
+                File parentDirs = new File(path).getParentFile();
+                if (parentDirs != null) {
+                    writer.startElement("mkdir");
                     // Replace \ with / in the parent dir path
-                    writer.addAttribute( "dir", "${maven.repo.local}/" + parentDirs.getPath().replace( '\\', '/' ) );
+                    writer.addAttribute("dir", "${maven.repo.local}/" + parentDirs.getPath().replace('\\', '/'));
                     writer.endElement(); // mkdir
                 }
 
-                for ( Object o1 : project.getRepositories() )
-                {
+                for (Object o1 : project.getRepositories()) {
                     Repository repository = (Repository) o1;
                     String url = repository.getUrl();
 
-                    String localDir = getProjectRepoDirectory( url, basedir );
-                    if ( localDir != null )
-                    {
-                        if ( localDir.length() > 0 && !localDir.endsWith( "/" ) )
-                        {
+                    String localDir = getProjectRepoDirectory(url, basedir);
+                    if (localDir != null) {
+                        if (localDir.length() > 0 && !localDir.endsWith("/")) {
                             localDir += '/';
                         }
 
-                        writer.startElement( "copy" );
-                        writer.addAttribute( "file", localDir + path );
-                        AntBuildWriterUtil.addWrapAttribute( writer, "copy", "tofile", "${maven.repo.local}/" + path,
-                                                             3 );
-                        AntBuildWriterUtil.addWrapAttribute( writer, "copy", "failonerror", "false", 3 );
+                        writer.startElement("copy");
+                        writer.addAttribute("file", localDir + path);
+                        AntBuildWriterUtil.addWrapAttribute(writer, "copy", "tofile", "${maven.repo.local}/" + path, 3);
+                        AntBuildWriterUtil.addWrapAttribute(writer, "copy", "failonerror", "false", 3);
                         writer.endElement(); // copy
-                    }
-                    else
-                    {
-                        writer.startElement( "get" );
-                        writer.addAttribute( "src", url + '/' + path );
-                        AntBuildWriterUtil.addWrapAttribute( writer, "get", "dest", "${maven.repo.local}/" + path, 3 );
-                        AntBuildWriterUtil.addWrapAttribute( writer, "get", "usetimestamp", "false", 3 );
-                        AntBuildWriterUtil.addWrapAttribute( writer, "get", "ignoreerrors", "true", 3 );
+                    } else {
+                        writer.startElement("get");
+                        writer.addAttribute("src", url + '/' + path);
+                        AntBuildWriterUtil.addWrapAttribute(writer, "get", "dest", "${maven.repo.local}/" + path, 3);
+                        AntBuildWriterUtil.addWrapAttribute(writer, "get", "usetimestamp", "false", 3);
+                        AntBuildWriterUtil.addWrapAttribute(writer, "get", "ignoreerrors", "true", 3);
                         writer.endElement(); // get
                     }
                 }
@@ -1404,8 +1347,8 @@
      * Gets the relative path to a repository that is rooted in the project. The returned path (if any) will always use
      * the forward slash ('/') as the directory separator. For example, the path "target/it-repo" will be returned for a
      * repository constructed from the URL "file://${basedir}/target/it-repo".
-     *
-     * @param repoUrl    The URL to the repository, must not be <code>null</code>.
+     * 
+     * @param repoUrl The URL to the repository, must not be <code>null</code>.
      * @param projectDir The absolute path to the base directory of the project, must not be <code>null</code>
      * @return The path to the repository (relative to the project base directory) or <code>null</code> if the
      *         repository is not rooted in the project.
@@ -1459,7 +1402,7 @@
      *
      * @param properties not null
      * @param name
-     * @param value      not null
+     * @param value not null
      */
     private static void addProperty( Properties properties, String name, String value )
     {
@@ -1468,7 +1411,7 @@
 
     /**
      * @param includes an array of includes or exludes map
-     * @param key      a key wanted in the map, like <code>include</code> or <code>exclude</code>
+     * @param key a key wanted in the map, like <code>include</code> or <code>exclude</code>
      * @return a String with comma-separated value of a key in each map
      */
     private static String getCommaSeparatedList( Map[] includes, String key )
@@ -1505,13 +1448,13 @@
 
     /**
      * Flattens the specified file selector options into a simple string list. For instance, the input
-     * <p/>
+     *
      * <pre>
      * [ {include=&quot;*Test.java&quot;}, {include=&quot;*TestCase.java&quot;} ]
      * </pre>
-     * <p/>
+     *
      * is converted to
-     * <p/>
+     *
      * <pre>
      * [ &quot;*Test.java&quot;, &quot;*TestCase.java&quot; ]
      * </pre>
@@ -1524,9 +1467,8 @@
         List list = new ArrayList();
         if ( options != null && options.length > 0 )
         {
-            for ( Map option : options )
-            {
-                list.addAll( option.values() );
+            for (Map option : options) {
+                list.addAll(option.values());
             }
         }
         return list;
diff --git a/src/main/java/org/apache/maven/plugin/ant/AntBuildWriterUtil.java b/src/main/java/org/apache/maven/plugin/ant/AntBuildWriterUtil.java
index c40be9b..15aafc5 100644
--- a/src/main/java/org/apache/maven/plugin/ant/AntBuildWriterUtil.java
+++ b/src/main/java/org/apache/maven/plugin/ant/AntBuildWriterUtil.java
@@ -63,12 +63,10 @@
         if ( compileSourceRoots != null )
         {
             // copy as I may be modifying it
-            for ( Object compileSourceRoot : compileSourceRoots )
-            {
+            for (Object compileSourceRoot : compileSourceRoots) {
                 String srcDir = (String) compileSourceRoot;
-                if ( new File( srcDir ).exists() )
-                {
-                    newCompileSourceRootsList.add( srcDir );
+                if (new File(srcDir).exists()) {
+                    newCompileSourceRootsList.add(srcDir);
                 }
             }
         }
@@ -79,7 +77,7 @@
     /**
      * Convenience method to write <code>&lt;include/&gt;</code> and <code>&lt;exclude/&gt;</code>
      *
-     * @param writer   not null
+     * @param writer not null
      * @param includes
      * @param excludes
      */
@@ -87,21 +85,19 @@
     {
         if ( includes != null )
         {
-            for ( Object include1 : includes )
-            {
+            for (Object include1 : includes) {
                 String include = (String) include1;
-                writer.startElement( "include" );
-                writer.addAttribute( "name", include );
+                writer.startElement("include");
+                writer.addAttribute("name", include);
                 writer.endElement(); // include
             }
         }
         if ( excludes != null )
         {
-            for ( Object exclude1 : excludes )
-            {
+            for (Object exclude1 : excludes) {
                 String exclude = (String) exclude1;
-                writer.startElement( "exclude" );
-                writer.addAttribute( "name", exclude );
+                writer.startElement("exclude");
+                writer.addAttribute("name", exclude);
                 writer.endElement(); // exclude
             }
         }
@@ -117,16 +113,15 @@
         writeAntVersionHeader( writer );
 
         XmlWriterUtil.writeCommentLineBreak( writer );
-        XmlWriterUtil.writeComment( writer,
-                                    StringUtils.repeat( "=", 21 ) + " - DO NOT EDIT THIS FILE! - " + StringUtils.repeat(
-                                        "=", 21 ) );
+        XmlWriterUtil.writeComment( writer, StringUtils.repeat( "=", 21 ) + " - DO NOT EDIT THIS FILE! - "
+            + StringUtils.repeat( "=", 21 ) );
         XmlWriterUtil.writeCommentLineBreak( writer );
         XmlWriterUtil.writeComment( writer, " " );
         XmlWriterUtil.writeComment( writer, "Any modifications will be overwritten." );
         XmlWriterUtil.writeComment( writer, " " );
         DateFormat dateFormat = DateFormat.getDateTimeInstance( DateFormat.SHORT, DateFormat.SHORT, Locale.US );
-        XmlWriterUtil.writeComment( writer, "Generated by Maven Ant Plugin on " + dateFormat.format(
-            new Date( System.currentTimeMillis() ) ) );
+        XmlWriterUtil.writeComment( writer, "Generated by Maven Ant Plugin on "
+            + dateFormat.format( new Date( System.currentTimeMillis() ) ) );
         XmlWriterUtil.writeComment( writer, "See: http://maven.apache.org/plugins/maven-ant-plugin/" );
         XmlWriterUtil.writeComment( writer, " " );
         XmlWriterUtil.writeCommentLineBreak( writer );
@@ -147,10 +142,10 @@
     /**
      * Convenience method to write XML ant task
      *
-     * @param writer        not null
-     * @param project       not null
+     * @param writer not null
+     * @param project not null
      * @param moduleSubPath not null
-     * @param tasks         not null
+     * @param tasks not null
      */
     public static void writeAntTask( XMLWriter writer, MavenProject project, String moduleSubPath, String tasks )
     {
@@ -164,7 +159,7 @@
     /**
      * Convenience method to write XML Ant javadoc task
      *
-     * @param writer  not null
+     * @param writer not null
      * @param project not null
      * @param wrapper not null
      * @throws IOException if any
@@ -173,13 +168,11 @@
         throws IOException
     {
         List sources = new ArrayList();
-        for ( Object o : project.getCompileSourceRoots() )
-        {
+        for (Object o : project.getCompileSourceRoots()) {
             String source = (String) o;
 
-            if ( new File( source ).exists() )
-            {
-                sources.add( source );
+            if (new File(source).exists()) {
+                sources.add(source);
             }
         }
 
@@ -194,7 +187,7 @@
         if ( sourcepath == null )
         {
             StringBuilder sb = new StringBuilder();
-            String[] compileSourceRoots = (String[]) sources.toArray( new String[sources.size()] );
+            String[] compileSourceRoots = (String[]) sources.toArray(new String[sources.size()]);
             for ( int i = 0; i < compileSourceRoots.length; i++ )
             {
                 sb.append( "${maven.build.srcDir." ).append( i ).append( "}" );
@@ -211,67 +204,68 @@
         {
             writer.addAttribute( "sourcepath", sourcepath );
         }
-        addWrapAttribute( writer, "javadoc", "destdir", getMavenJavadocPluginBasicOption( project, "destdir",
-                                                                                          "${maven.reporting.outputDirectory}/apidocs" ),
-                          3 );
-        addWrapAttribute( writer, "javadoc", "extdirs", getMavenJavadocPluginBasicOption( project, "extdirs", null ),
-                          3 );
+        addWrapAttribute( writer, "javadoc", "destdir",
+                          getMavenJavadocPluginBasicOption( project, "destdir",
+                                                            "${maven.reporting.outputDirectory}/apidocs" ), 3 );
+        addWrapAttribute( writer, "javadoc", "extdirs", getMavenJavadocPluginBasicOption( project, "extdirs", null ), 3 );
 
         addWrapAttribute( writer, "javadoc", "overview", getMavenJavadocPluginBasicOption( project, "overview", null ),
                           3 );
-        addWrapAttribute( writer, "javadoc", "access", getMavenJavadocPluginBasicOption( project, "show", "protected" ),
-                          3 );
+        addWrapAttribute( writer, "javadoc", "access",
+                          getMavenJavadocPluginBasicOption( project, "show", "protected" ), 3 );
         addWrapAttribute( writer, "javadoc", "old", getMavenJavadocPluginBasicOption( project, "old", "false" ), 3 );
-        addWrapAttribute( writer, "javadoc", "verbose", getMavenJavadocPluginBasicOption( project, "verbose", "false" ),
-                          3 );
+        addWrapAttribute( writer, "javadoc", "verbose",
+                          getMavenJavadocPluginBasicOption( project, "verbose", "false" ), 3 );
         addWrapAttribute( writer, "javadoc", "locale", getMavenJavadocPluginBasicOption( project, "locale", null ), 3 );
         addWrapAttribute( writer, "javadoc", "encoding", getMavenJavadocPluginBasicOption( project, "encoding", null ),
                           3 );
         addWrapAttribute( writer, "javadoc", "version", getMavenJavadocPluginBasicOption( project, "version", "true" ),
                           3 );
         addWrapAttribute( writer, "javadoc", "use", getMavenJavadocPluginBasicOption( project, "use", "true" ), 3 );
-        addWrapAttribute( writer, "javadoc", "author", getMavenJavadocPluginBasicOption( project, "author", "true" ),
-                          3 );
-        addWrapAttribute( writer, "javadoc", "splitindex",
-                          getMavenJavadocPluginBasicOption( project, "splitindex", "false" ), 3 );
-        addWrapAttribute( writer, "javadoc", "windowtitle",
-                          getMavenJavadocPluginBasicOption( project, "windowtitle", null ), 3 );
-        addWrapAttribute( writer, "javadoc", "nodeprecated",
-                          getMavenJavadocPluginBasicOption( project, "nodeprecated", "false" ), 3 );
-        addWrapAttribute( writer, "javadoc", "nodeprecatedlist",
-                          getMavenJavadocPluginBasicOption( project, "nodeprecatedlist", "false" ), 3 );
+        addWrapAttribute( writer, "javadoc", "author", getMavenJavadocPluginBasicOption( project, "author", "true" ), 3 );
+        addWrapAttribute( writer, "javadoc", "splitindex", getMavenJavadocPluginBasicOption( project, "splitindex",
+                                                                                             "false" ), 3 );
+        addWrapAttribute( writer, "javadoc", "windowtitle", getMavenJavadocPluginBasicOption( project, "windowtitle",
+                                                                                              null ), 3 );
+        addWrapAttribute( writer, "javadoc", "nodeprecated", getMavenJavadocPluginBasicOption( project, "nodeprecated",
+                                                                                               "false" ), 3 );
+        addWrapAttribute( writer, "javadoc", "nodeprecatedlist", getMavenJavadocPluginBasicOption( project,
+                                                                                                   "nodeprecatedlist",
+                                                                                                   "false" ), 3 );
         addWrapAttribute( writer, "javadoc", "notree", getMavenJavadocPluginBasicOption( project, "notree", "false" ),
                           3 );
-        addWrapAttribute( writer, "javadoc", "noindex", getMavenJavadocPluginBasicOption( project, "noindex", "false" ),
-                          3 );
+        addWrapAttribute( writer, "javadoc", "noindex",
+                          getMavenJavadocPluginBasicOption( project, "noindex", "false" ), 3 );
         addWrapAttribute( writer, "javadoc", "nohelp", getMavenJavadocPluginBasicOption( project, "nohelp", "false" ),
                           3 );
         addWrapAttribute( writer, "javadoc", "nonavbar",
                           getMavenJavadocPluginBasicOption( project, "nonavbar", "false" ), 3 );
-        addWrapAttribute( writer, "javadoc", "serialwarn",
-                          getMavenJavadocPluginBasicOption( project, "serialwarn", "false" ), 3 );
+        addWrapAttribute( writer, "javadoc", "serialwarn", getMavenJavadocPluginBasicOption( project, "serialwarn",
+                                                                                             "false" ), 3 );
         addWrapAttribute( writer, "javadoc", "helpfile", getMavenJavadocPluginBasicOption( project, "helpfile", null ),
                           3 );
         addWrapAttribute( writer, "javadoc", "stylesheetfile",
                           getMavenJavadocPluginBasicOption( project, "stylesheetfile", null ), 3 );
-        addWrapAttribute( writer, "javadoc", "charset",
-                          getMavenJavadocPluginBasicOption( project, "charset", "ISO-8859-1" ), 3 );
-        addWrapAttribute( writer, "javadoc", "docencoding",
-                          getMavenJavadocPluginBasicOption( project, "docencoding", null ), 3 );
+        addWrapAttribute( writer, "javadoc", "charset", getMavenJavadocPluginBasicOption( project, "charset",
+                                                                                          "ISO-8859-1" ), 3 );
+        addWrapAttribute( writer, "javadoc", "docencoding", getMavenJavadocPluginBasicOption( project, "docencoding",
+                                                                                              null ), 3 );
         addWrapAttribute( writer, "javadoc", "excludepackagenames",
                           getMavenJavadocPluginBasicOption( project, "excludepackagenames", null ), 3 );
         addWrapAttribute( writer, "javadoc", "source", getMavenJavadocPluginBasicOption( project, "source", null ), 3 );
-        addWrapAttribute( writer, "javadoc", "linksource",
-                          getMavenJavadocPluginBasicOption( project, "linksource", "false" ), 3 );
-        addWrapAttribute( writer, "javadoc", "breakiterator",
-                          getMavenJavadocPluginBasicOption( project, "breakiterator", "false" ), 3 );
-        addWrapAttribute( writer, "javadoc", "noqualifier",
-                          getMavenJavadocPluginBasicOption( project, "noqualifier", null ), 3 );
+        addWrapAttribute( writer, "javadoc", "linksource", getMavenJavadocPluginBasicOption( project, "linksource",
+                                                                                             "false" ), 3 );
+        addWrapAttribute( writer, "javadoc", "breakiterator", getMavenJavadocPluginBasicOption( project,
+                                                                                                "breakiterator",
+                                                                                                "false" ), 3 );
+        addWrapAttribute( writer, "javadoc", "noqualifier", getMavenJavadocPluginBasicOption( project, "noqualifier",
+                                                                                              null ), 3 );
         // miscellaneous
         addWrapAttribute( writer, "javadoc", "maxmemory",
                           getMavenJavadocPluginBasicOption( project, "maxmemory", null ), 3 );
-        addWrapAttribute( writer, "javadoc", "additionalparam",
-                          getMavenJavadocPluginBasicOption( project, "additionalparam", null ), 3 );
+        addWrapAttribute( writer, "javadoc", "additionalparam", getMavenJavadocPluginBasicOption( project,
+                                                                                                  "additionalparam",
+                                                                                                  null ), 3 );
 
         // Nested arg
         String doctitle = getMavenJavadocPluginBasicOption( project, "doctitle", null );
@@ -306,10 +300,9 @@
         Map[] links = getMavenJavadocPluginOptions( project, "links", null );
         if ( links != null )
         {
-            for ( Map link : links )
-            {
-                writer.startElement( "link" );
-                writer.addAttribute( "href", (String) link.get( "link" ) );
+            for (Map link : links) {
+                writer.startElement("link");
+                writer.addAttribute("href", (String) link.get("link"));
                 writer.endElement(); // link
             }
         }
@@ -317,11 +310,10 @@
         Map[] offlineLinks = getMavenJavadocPluginOptions( project, "offlineLinks", null );
         if ( offlineLinks != null )
         {
-            for ( Map offlineLink : offlineLinks )
-            {
-                writer.startElement( "link" );
-                writer.addAttribute( "href", (String) offlineLink.get( "url" ) );
-                addWrapAttribute( writer, "javadoc", "offline", "true", 4 );
+            for (Map offlineLink : offlineLinks) {
+                writer.startElement("link");
+                writer.addAttribute("href", (String) offlineLink.get("url"));
+                addWrapAttribute(writer, "javadoc", "offline", "true", 4);
                 writer.endElement(); // link
             }
         }
@@ -329,12 +321,11 @@
         Map[] groups = getMavenJavadocPluginOptions( project, "groups", null );
         if ( groups != null )
         {
-            for ( Map group1 : groups )
-            {
-                Map group = (Map) group1.get( "group" );
-                writer.startElement( "group" );
-                writer.addAttribute( "title", (String) group.get( "title" ) );
-                addWrapAttribute( writer, "javadoc", "package", (String) group.get( "package" ), 4 );
+            for (Map group1 : groups) {
+                Map group = (Map) group1.get("group");
+                writer.startElement("group");
+                writer.addAttribute("title", (String) group.get("title"));
+                addWrapAttribute(writer, "javadoc", "package", (String) group.get("package"), 4);
                 writer.endElement(); // group
             }
         }
@@ -396,13 +387,12 @@
         Map[] tags = getMavenJavadocPluginOptions( project, "tags", null );
         if ( tags != null )
         {
-            for ( Map tag : tags )
-            {
-                Map props = (Map) tag.get( "tag" );
-                writer.startElement( "tag" );
-                writer.addAttribute( "name", (String) props.get( "name" ) );
-                addWrapAttribute( writer, "javadoc", "scope", (String) props.get( "placement" ), 4 );
-                addWrapAttribute( writer, "javadoc", "description", (String) props.get( "head" ), 4 );
+            for (Map tag : tags) {
+                Map props = (Map) tag.get("tag");
+                writer.startElement("tag");
+                writer.addAttribute("name", (String) props.get("name"));
+                addWrapAttribute(writer, "javadoc", "scope", (String) props.get("placement"), 4);
+                addWrapAttribute(writer, "javadoc", "description", (String) props.get("head"), 4);
                 writer.endElement(); // tag
             }
         }
@@ -413,7 +403,7 @@
     /**
      * Convenience method to write XML Ant jar task
      *
-     * @param writer  not null
+     * @param writer not null
      * @param project not null
      * @throws IOException if any
      */
@@ -424,12 +414,12 @@
         writer.addAttribute( "jarfile", "${maven.build.dir}/${maven.build.finalName}.jar" );
         addWrapAttribute( writer, "jar", "compress",
                           getMavenJarPluginBasicOption( project, "archive//compress", "true" ), 3 );
-        addWrapAttribute( writer, "jar", "index", getMavenJarPluginBasicOption( project, "archive//index", "false" ),
-                          3 );
+        addWrapAttribute( writer, "jar", "index", getMavenJarPluginBasicOption( project, "archive//index", "false" ), 3 );
         if ( getMavenJarPluginBasicOption( project, "archive//manifestFile", null ) != null )
         {
-            addWrapAttribute( writer, "jar", "manifest",
-                              getMavenJarPluginBasicOption( project, "archive//manifestFile", null ), 3 );
+            addWrapAttribute( writer, "jar", "manifest", getMavenJarPluginBasicOption( project,
+                                                                                       "archive//manifestFile", null ),
+                              3 );
         }
         addWrapAttribute( writer, "jar", "basedir", "${maven.build.outputDir}", 3 );
         addWrapAttribute( writer, "jar", "excludes", "**/package.html", 3 );
@@ -449,8 +439,8 @@
     /**
      * Convenience method to write XML Ant ear task
      *
-     * @param writer                  not null
-     * @param project                 not null
+     * @param writer not null
+     * @param project not null
      * @param artifactResolverWrapper not null
      * @throws IOException if any
      */
@@ -488,8 +478,8 @@
     /**
      * Convenience method to write XML Ant war task
      *
-     * @param writer                  not null
-     * @param project                 not null
+     * @param writer not null
+     * @param project not null
      * @param artifactResolverWrapper not null
      * @throws IOException if any
      */
@@ -497,14 +487,14 @@
                                      ArtifactResolverWrapper artifactResolverWrapper )
         throws IOException
     {
-        String webXml = getMavenWarPluginBasicOption( project, "webXml", "${basedir}/src/main/webapp/WEB-INF/web.xml" );
+        String webXml =
+            getMavenWarPluginBasicOption( project, "webXml", "${basedir}/src/main/webapp/WEB-INF/web.xml" );
         if ( webXml.startsWith( "${basedir}/" ) )
         {
             webXml = webXml.substring( "${basedir}/".length() );
         }
-
-        writeCopyLib( writer, project, artifactResolverWrapper,
-                      "${maven.build.dir}/${maven.build.finalName}/WEB-INF/lib" );
+        
+        writeCopyLib( writer, project, artifactResolverWrapper, "${maven.build.dir}/${maven.build.finalName}/WEB-INF/lib" );
 
         writer.startElement( "war" );
         writer.addAttribute( "destfile", "${maven.build.dir}/${maven.build.finalName}.war" );
@@ -533,9 +523,9 @@
      * Convenience method to wrap long element tags for a given attribute.
      *
      * @param writer not null
-     * @param tag    not null
-     * @param name   not null
-     * @param value  not null
+     * @param tag not null
+     * @param name not null
+     * @param value not null
      * @param indent positive value
      */
     public static void addWrapAttribute( XMLWriter writer, String tag, String name, String value, int indent )
@@ -551,8 +541,9 @@
         }
         else
         {
-            writer.addAttribute( "\n" + StringUtils.repeat( " ", ( StringUtils.isEmpty( tag ) ? 0 : tag.length() )
-                + indent * XmlWriterUtil.DEFAULT_INDENTATION_SIZE ) + name, value );
+            writer.addAttribute( "\n"
+                + StringUtils.repeat( " ", ( StringUtils.isEmpty( tag ) ? 0 : tag.length() ) + indent
+                    * XmlWriterUtil.DEFAULT_INDENTATION_SIZE ) + name, value );
         }
     }
 
@@ -567,14 +558,17 @@
 
     /**
      * @param mavenProject
-     * @return true if project packaging equals one of several packaging types
+     * @return true if project packaging equals one of several packaging types 
      *         including  <code>jar</code>, <code>maven-plugin</code>, <code>ejb</code>, or
      *         <code>bundle</code>
      */
     public static boolean isJarPackaging( MavenProject mavenProject )
     {
-        return "jar".equals( mavenProject.getPackaging() ) || isEjbPackaging( mavenProject ) || isMavenPluginPackaging(
-            mavenProject ) || isBundlePackaging( mavenProject );
+        return "jar".equals( mavenProject.getPackaging() )
+            || isEjbPackaging( mavenProject )
+            || isMavenPluginPackaging( mavenProject )
+            || isBundlePackaging( mavenProject )
+            ;
     }
 
     /**
@@ -625,14 +619,13 @@
     /**
      * Return the <code>optionName</code> value defined in a project for the "maven-compiler-plugin" plugin.
      *
-     * @param project      not null
-     * @param optionName   the option name wanted
+     * @param project not null
+     * @param optionName the option name wanted
      * @param defaultValue a default value
      * @return the value for the option name or the default value. Could be null if not found.
      * @throws IOException if any
      */
-    public static String getMavenCompilerPluginBasicOption( MavenProject project, String optionName,
-                                                            String defaultValue )
+    public static String getMavenCompilerPluginBasicOption( MavenProject project, String optionName, String defaultValue )
         throws IOException
     {
         return getMavenPluginBasicOption( project, "maven-compiler-plugin", optionName, defaultValue );
@@ -641,8 +634,8 @@
     /**
      * Return the map of <code>optionName</code> value defined in a project for the "maven-compiler-plugin" plugin.
      *
-     * @param project      not null
-     * @param optionName   the option name wanted
+     * @param project not null
+     * @param optionName the option name wanted
      * @param defaultValue a default value
      * @return the map for the option name or the default value. Could be null if not found.
      * @throws IOException if any
@@ -656,8 +649,8 @@
     /**
      * Return an array of map of <code>optionName</code> value defined in a project for the "maven-compiler-plugin" plugin.
      *
-     * @param project      not null
-     * @param optionName   the option name wanted
+     * @param project not null
+     * @param optionName the option name wanted
      * @param defaultValue a default value
      * @return the array of option name or the default value. Could be null if not found.
      * @throws IOException if any
@@ -671,14 +664,13 @@
     /**
      * Return the <code>optionName</code> value defined in a project for the "maven-surefire-plugin" plugin.
      *
-     * @param project      not null
-     * @param optionName   the option name wanted
+     * @param project not null
+     * @param optionName the option name wanted
      * @param defaultValue a default value
      * @return the value for the option name or the default value. Could be null if not found.
      * @throws IOException if any
      */
-    public static String getMavenSurefirePluginBasicOption( MavenProject project, String optionName,
-                                                            String defaultValue )
+    public static String getMavenSurefirePluginBasicOption( MavenProject project, String optionName, String defaultValue )
         throws IOException
     {
         return getMavenPluginBasicOption( project, "maven-surefire-plugin", optionName, defaultValue );
@@ -687,8 +679,8 @@
     /**
      * Return the map of <code>optionName</code> value defined in a project for the "maven-surefire-plugin" plugin.
      *
-     * @param project      not null
-     * @param optionName   the option name wanted
+     * @param project not null
+     * @param optionName the option name wanted
      * @param defaultValue a default value
      * @return the map for the option name or the default value. Could be null if not found.
      * @throws IOException if any
@@ -702,8 +694,8 @@
     /**
      * Return an array of map of <code>optionName</code> value defined in a project for the "maven-surefire-plugin" plugin.
      *
-     * @param project      not null
-     * @param optionName   the option name wanted
+     * @param project not null
+     * @param optionName the option name wanted
      * @param defaultValue a default value
      * @return the array of option name or the default value. Could be null if not found.
      * @throws IOException if any
@@ -717,14 +709,13 @@
     /**
      * Return the <code>optionName</code> value defined in a project for the "maven-javadoc-plugin" plugin.
      *
-     * @param project      not null
-     * @param optionName   the option name wanted
+     * @param project not null
+     * @param optionName the option name wanted
      * @param defaultValue a default value
      * @return the value for the option name or the default value. Could be null if not found.
      * @throws IOException if any
      */
-    public static String getMavenJavadocPluginBasicOption( MavenProject project, String optionName,
-                                                           String defaultValue )
+    public static String getMavenJavadocPluginBasicOption( MavenProject project, String optionName, String defaultValue )
         throws IOException
     {
         return getMavenPluginBasicOption( project, "maven-javadoc-plugin", optionName, defaultValue );
@@ -733,8 +724,8 @@
     /**
      * Return a map of <code>optionName</code> value defined in a project for the "maven-javadoc-plugin" plugin.
      *
-     * @param project      not null
-     * @param optionName   the option name wanted
+     * @param project not null
+     * @param optionName the option name wanted
      * @param defaultValue a default value
      * @return the map for the option name or the default value. Could be null if not found.
      * @throws IOException if any
@@ -748,8 +739,8 @@
     /**
      * Return an array of map of <code>optionName</code> value defined in a project for the "maven-javadoc-plugin" plugin.
      *
-     * @param project      not null
-     * @param optionName   the option name wanted
+     * @param project not null
+     * @param optionName the option name wanted
      * @param defaultValue a default value
      * @return an array of option name. Could be null if not found.
      * @throws IOException if any
@@ -763,8 +754,8 @@
     /**
      * Return the <code>optionName</code> value defined in a project for the "maven-jar-plugin" plugin.
      *
-     * @param project      not null
-     * @param optionName   the option name wanted
+     * @param project not null
+     * @param optionName the option name wanted
      * @param defaultValue a default value
      * @return the value for the option name or the default value. Could be null if not found.
      * @throws IOException if any
@@ -778,8 +769,8 @@
     /**
      * Return the <code>optionName</code> value defined in a project for the "maven-ear-plugin" plugin.
      *
-     * @param project      not null
-     * @param optionName   the option name wanted
+     * @param project not null
+     * @param optionName the option name wanted
      * @param defaultValue a default value
      * @return the value for the option name or the default value. Could be null if not found.
      * @throws IOException if any
@@ -793,8 +784,8 @@
     /**
      * Return the <code>optionName</code> value defined in a project for the "maven-war-plugin" plugin.
      *
-     * @param project      not null
-     * @param optionName   the option name wanted
+     * @param project not null
+     * @param optionName the option name wanted
      * @param defaultValue a default value
      * @return the value for the option name or the default value. Could be null if not found.
      * @throws IOException if any
@@ -815,29 +806,29 @@
      * <br/>
      * Example:
      * <table>
-     * <tr>
-     * <td>Configuration</td>
-     * <td>Result</td>
-     * </tr>
-     * <tr>
-     * <td><pre>&lt;option&gt;value&lt;/option&gt;</pre></td>
-     * <td><pre>value</pre></td>
-     * </tr>
+     *   <tr>
+     *     <td>Configuration</td>
+     *     <td>Result</td>
+     *   </tr>
+     *   <tr>
+     *     <td><pre>&lt;option&gt;value&lt;/option&gt;</pre></td>
+     *     <td><pre>value</pre></td>
+     *   </tr>
      * </table>
      *
-     * @param project          not null
+     * @param project not null
      * @param pluginArtifactId not null
-     * @param optionName       an <code>Xpath</code> expression from the plugin <code>&lt;configuration/&gt;</code>
-     * @param defaultValue     could be null
+     * @param optionName an <code>Xpath</code> expression from the plugin <code>&lt;configuration/&gt;</code>
+     * @param defaultValue could be null
      * @return the value for the option name or null if not found
      * @throws IOException if any
      */
     private static String getMavenPluginBasicOption( MavenProject project, String pluginArtifactId, String optionName,
-                                                     String defaultValue )
+                                                    String defaultValue )
         throws IOException
     {
-        return (String) getMavenPluginConfigurationsImpl( project, pluginArtifactId, optionName, defaultValue ).get(
-            optionName );
+        return (String) getMavenPluginConfigurationsImpl( project, pluginArtifactId, optionName, defaultValue )
+            .get( optionName );
     }
 
     /**
@@ -846,34 +837,34 @@
      * <br/>
      * Example:
      * <table>
-     * <tr>
-     * <td>Configuration</td>
-     * <td>Result</td>
-     * </tr>
-     * <tr>
-     * <td><pre>
+     *   <tr>
+     *     <td>Configuration</td>
+     *     <td>Result</td>
+     *   </tr>
+     *   <tr>
+     *     <td><pre>
      * &lt;option&gt;
      *  &lt;param1&gt;value1&lt;/param1&gt;
      *  &lt;param2&gt;value2&lt;/param2&gt;
      * &lt;/option&gt;
      * </pre></td>
-     * <td><pre>{param1=value1, param2=value2}<pre></td>
+     *     <td><pre>{param1=value1, param2=value2}<pre></td>
      *   </tr>
      * </table>
      *
-     * @param project          not null
+     * @param project not null
      * @param pluginArtifactId not null
-     * @param optionName       an <code>Xpath</code> expression from the plugin <code>&lt;configuration/&gt;</code>
-     * @param defaultValue     could be null
+     * @param optionName an <code>Xpath</code> expression from the plugin <code>&lt;configuration/&gt;</code>
+     * @param defaultValue could be null
      * @return the value for the option name or null if not found
      * @throws IOException if any
      */
     private static Map getMavenPluginOption( MavenProject project, String pluginArtifactId, String optionName,
-                                             String defaultValue )
+                                            String defaultValue )
         throws IOException
     {
-        return (Map) getMavenPluginConfigurationsImpl( project, pluginArtifactId, optionName, defaultValue ).get(
-            optionName );
+        return (Map) getMavenPluginConfigurationsImpl( project, pluginArtifactId, optionName, defaultValue )
+            .get( optionName );
     }
 
     /**
@@ -882,12 +873,12 @@
      * <br/>
      * Example:
      * <table>
-     * <tr>
-     * <td>Configuration</td>
-     * <td>Result</td>
-     * </tr>
-     * <tr>
-     * <td><pre>
+     *   <tr>
+     *     <td>Configuration</td>
+     *     <td>Result</td>
+     *   </tr>
+     *   <tr>
+     *     <td><pre>
      * &lt;options&gt;
      *   &lt;option&gt;
      *    &lt;param1&gt;value1&lt;/param1&gt;
@@ -899,23 +890,23 @@
      *   &lt;/option&gt;
      * &lt;/options&gt;
      * </pre></td>
-     * <td><pre>[{option=[{param1=value1, param2=value2}]}, {option=[{param1=value1, param2=value2}]<pre></td>
+     *     <td><pre>[{option=[{param1=value1, param2=value2}]}, {option=[{param1=value1, param2=value2}]<pre></td>
      *   </tr>
      * </table>
      *
-     * @param project          not null
+     * @param project not null
      * @param pluginArtifactId not null
-     * @param optionName       an <code>Xpath</code> expression from the plugin <code>&lt;configuration/&gt;</code>
-     * @param defaultValue     could be null
+     * @param optionName an <code>Xpath</code> expression from the plugin <code>&lt;configuration/&gt;</code>
+     * @param defaultValue could be null
      * @return the value for the option name  or null if not found
      * @throws IOException if any
      */
     private static Map[] getMavenPluginOptions( MavenProject project, String pluginArtifactId, String optionName,
-                                                String defaultValue )
+                                               String defaultValue )
         throws IOException
     {
-        return (Map[]) getMavenPluginConfigurationsImpl( project, pluginArtifactId, optionName, defaultValue ).get(
-            optionName );
+        return (Map[]) getMavenPluginConfigurationsImpl( project, pluginArtifactId, optionName, defaultValue )
+            .get( optionName );
     }
 
     /**
@@ -924,22 +915,22 @@
      * <br/>
      * Example:
      * <table>
-     * <tr>
-     * <td>Configuration</td>
-     * <td>Result</td>
-     * </tr>
-     * <tr>
-     * <td><pre>&lt;option&gt;value&lt;/option&gt;</pre></td>
-     * <td><pre>{option=value}</pre></td>
-     * </tr>
-     * <tr>
-     * <td><pre>
+     *   <tr>
+     *     <td>Configuration</td>
+     *     <td>Result</td>
+     *   </tr>
+     *   <tr>
+     *     <td><pre>&lt;option&gt;value&lt;/option&gt;</pre></td>
+     *     <td><pre>{option=value}</pre></td>
+     *   </tr>
+     *   <tr>
+     *     <td><pre>
      * &lt;option&gt;
      *  &lt;param1&gt;value1&lt;/param1&gt;
      *  &lt;param2&gt;value2&lt;/param2&gt;
      * &lt;/option&gt;
      * </pre></td>
-     * <td><pre>{option={param1=value1, param2=value2}}<pre></td>
+     *     <td><pre>{option={param1=value1, param2=value2}}<pre></td>
      *   </tr>
      *   <tr>
      *     <td><pre>
@@ -958,83 +949,71 @@
      *   </tr>
      * </table>
      *
-     * @param project          not null
+     * @param project not null
      * @param pluginArtifactId not null
-     * @param optionName       an <code>Xpath</code> expression from the plugin <code>&lt;configuration/&gt;</code>
-     * @param defaultValue     could be null
+     * @param optionName an <code>Xpath</code> expression from the plugin <code>&lt;configuration/&gt;</code>
+     * @param defaultValue could be null
      * @return a map with the options found
      * @throws IOException if any
      */
     private static Map getMavenPluginConfigurationsImpl( MavenProject project, String pluginArtifactId,
-                                                         String optionName, String defaultValue )
+                                                        String optionName, String defaultValue )
         throws IOException
     {
         List plugins = new ArrayList();
-        for ( ReportPlugin reportPlugin1 : project.getModel().getReporting().getPlugins() )
-        {
-            plugins.add( reportPlugin1 );
+        for (ReportPlugin reportPlugin1 : project.getModel().getReporting().getPlugins()) {
+            plugins.add(reportPlugin1);
         }
-        for ( Plugin plugin1 : project.getModel().getBuild().getPlugins() )
-        {
-            plugins.add( plugin1 );
+        for (Plugin plugin1 : project.getModel().getBuild().getPlugins()) {
+            plugins.add(plugin1);
         }
         if ( project.getBuild().getPluginManagement() != null )
         {
-            for ( Plugin plugin : project.getBuild().getPluginManagement().getPlugins() )
-            {
-                plugins.add( plugin );
+            for (Plugin plugin : project.getBuild().getPluginManagement().getPlugins()) {
+                plugins.add(plugin);
             }
         }
 
-        for ( Object next : plugins )
-        {
+        for (Object next : plugins) {
             Object pluginConf = null;
 
-            if ( next instanceof Plugin )
-            {
+            if (next instanceof Plugin) {
                 Plugin plugin = (Plugin) next;
 
                 // using out-of-box Maven plugins
-                if ( !( ( plugin.getGroupId().equals( "org.apache.maven.plugins" ) ) && ( plugin.getArtifactId().equals(
-                    pluginArtifactId ) ) ) )
-                {
+                if (!((plugin.getGroupId().equals("org.apache.maven.plugins")) && (plugin.getArtifactId()
+                        .equals(pluginArtifactId)))) {
                     continue;
                 }
 
                 pluginConf = plugin.getConfiguration();
             }
 
-            if ( next instanceof ReportPlugin )
-            {
+            if (next instanceof ReportPlugin) {
                 ReportPlugin reportPlugin = (ReportPlugin) next;
 
                 // using out-of-box Maven plugins
-                if ( !( ( reportPlugin.getGroupId().equals( "org.apache.maven.plugins" ) )
-                    && ( reportPlugin.getArtifactId().equals( pluginArtifactId ) ) ) )
-                {
+                if (!((reportPlugin.getGroupId().equals("org.apache.maven.plugins")) && (reportPlugin
+                        .getArtifactId().equals(pluginArtifactId)))) {
                     continue;
                 }
 
                 pluginConf = reportPlugin.getConfiguration();
             }
 
-            if ( pluginConf == null )
-            {
+            if (pluginConf == null) {
                 continue;
             }
 
-            try
-            {
-                Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(
-                    new ByteArrayInputStream( pluginConf.toString().getBytes( "UTF-8" ) ) );
+            try {
+                Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder()
+                        .parse(new ByteArrayInputStream(pluginConf.toString().getBytes("UTF-8")));
 
-                NodeList nodeList = XPathAPI.eval( doc, "//configuration/" + optionName ).nodelist();
-                if ( nodeList.getLength() > 0 )
-                {
-                    Node optionNode = nodeList.item( 0 );
+                NodeList nodeList = XPathAPI.eval(doc, "//configuration/" + optionName).nodelist();
+                if (nodeList.getLength() > 0) {
+                    Node optionNode = nodeList.item(0);
 
-                    if ( isList( optionNode ) )
-                    {
+                    if (isList(optionNode)) {
                         /*
                          * <optionNames>
                          *   <optionName>
@@ -1047,46 +1026,37 @@
 
                         List optionNames = new ArrayList();
                         NodeList childs = optionNode.getChildNodes();
-                        for ( int i = 0; i < childs.getLength(); i++ )
-                        {
-                            Node child = childs.item( i );
-                            if ( child.getNodeType() == Node.ELEMENT_NODE )
-                            {
+                        for (int i = 0; i < childs.getLength(); i++) {
+                            Node child = childs.item(i);
+                            if (child.getNodeType() == Node.ELEMENT_NODE) {
                                 Map option = new HashMap();
 
-                                if ( isElementContent( child ) )
-                                {
+                                if (isElementContent(child)) {
                                     Map properties = new HashMap();
                                     NodeList childs2 = child.getChildNodes();
-                                    if ( childs2.getLength() > 0 )
-                                    {
-                                        for ( int j = 0; j < childs2.getLength(); j++ )
-                                        {
-                                            Node child2 = childs2.item( j );
-                                            if ( child2.getNodeType() == Node.ELEMENT_NODE )
-                                            {
-                                                properties.put( child2.getNodeName(), getTextContent( child2 ) );
+                                    if (childs2.getLength() > 0) {
+                                        for (int j = 0; j < childs2.getLength(); j++) {
+                                            Node child2 = childs2.item(j);
+                                            if (child2.getNodeType() == Node.ELEMENT_NODE) {
+                                                properties.put(child2.getNodeName(), getTextContent(child2));
                                             }
                                         }
-                                        option.put( child.getNodeName(), properties );
+                                        option.put(child.getNodeName(), properties);
                                     }
-                                }
-                                else
-                                {
-                                    option.put( child.getNodeName(), getTextContent( child ) );
+                                } else {
+                                    option.put(child.getNodeName(), getTextContent(child));
                                 }
 
-                                optionNames.add( option );
+                                optionNames.add(option);
                             }
                         }
 
-                        options.put( optionName, optionNames.toArray( new Map[optionNames.size()] ) );
+                        options.put(optionName, optionNames.toArray(new Map[optionNames.size()]));
 
                         return options;
                     }
 
-                    if ( isElementContent( optionNode ) )
-                    {
+                    if (isElementContent(optionNode)) {
                         /*
                          * <optionName>
                          *  <param1>value1</param1>
@@ -1096,40 +1066,33 @@
                         Map option = new HashMap();
 
                         NodeList childs = optionNode.getChildNodes();
-                        if ( childs.getLength() > 1 )
-                        {
+                        if (childs.getLength() > 1) {
                             Map parameters = new HashMap();
 
-                            for ( int i = 0; i < childs.getLength(); i++ )
-                            {
-                                Node child = childs.item( i );
-                                if ( child.getNodeType() == Node.ELEMENT_NODE )
-                                {
-                                    parameters.put( child.getNodeName(), getTextContent( child ) );
+                            for (int i = 0; i < childs.getLength(); i++) {
+                                Node child = childs.item(i);
+                                if (child.getNodeType() == Node.ELEMENT_NODE) {
+                                    parameters.put(child.getNodeName(), getTextContent(child));
                                 }
                             }
 
-                            option.put( optionName, parameters );
+                            option.put(optionName, parameters);
                         }
 
                         return option;
-                    }
-                    else
-                    {
+                    } else {
                         /*
                          * <optionName>value1</optionName>
                          */
                         Map option = new HashMap();
 
-                        option.put( optionName, getTextContent( optionNode ) );
+                        option.put(optionName, getTextContent(optionNode));
 
                         return option;
                     }
                 }
-            }
-            catch ( Exception e )
-            {
-                throw new IOException( "Exception occured: " + e.getMessage() );
+            } catch (Exception e) {
+                throw new IOException("Exception occured: " + e.getMessage());
             }
         }
 
@@ -1143,10 +1106,10 @@
      * Write copy tasks in an outputDir for EAR and WAR targets for project depencies without
      * <code>provided</code> or <code>test</code> as scope
      *
-     * @param writer                  not null
-     * @param project                 not null
+     * @param writer not null
+     * @param project not null
      * @param artifactResolverWrapper not null
-     * @param outputDir               not null
+     * @param outputDir not null
      */
     private static void writeCopyLib( XMLWriter writer, MavenProject project,
                                       ArtifactResolverWrapper artifactResolverWrapper, String outputDir )
@@ -1157,22 +1120,19 @@
 
         if ( project.getArtifacts() != null )
         {
-            for ( Object o : project.getArtifacts() )
-            {
+            for (Object o : project.getArtifacts()) {
                 Artifact artifact = (Artifact) o;
 
-                if ( Artifact.SCOPE_COMPILE.equals( artifact.getScope() ) || Artifact.SCOPE_RUNTIME.equals(
-                    artifact.getScope() ) )
-                {
-                    String path = artifactResolverWrapper.getLocalArtifactPath( artifact );
-                    if ( !new File( path ).isAbsolute() )
-                    {
+                if (Artifact.SCOPE_COMPILE.equals(artifact.getScope())
+                        || Artifact.SCOPE_RUNTIME.equals(artifact.getScope())) {
+                    String path = artifactResolverWrapper.getLocalArtifactPath(artifact);
+                    if (!new File(path).isAbsolute()) {
                         path = "${maven.repo.local}/" + path;
                     }
 
-                    writer.startElement( "copy" );
-                    writer.addAttribute( "file", path );
-                    addWrapAttribute( writer, "copy", "todir", outputDir, 3 );
+                    writer.startElement("copy");
+                    writer.addAttribute("file", path);
+                    addWrapAttribute(writer, "copy", "todir", outputDir, 3);
                     writer.endElement(); // copy
                 }
             }
@@ -1183,7 +1143,7 @@
      * Check if a given <code>node</code> is a list of nodes or not.
      * <br/>
      * For instance, the node <code>options</code> is a list of <code>option</code> in the following case:
-     * <pre>
+     *<pre>
      * &lt;options&gt;
      *   &lt;option&gt;
      *    &lt;param1&gt;value1&lt;/param1&gt;
@@ -1277,7 +1237,7 @@
 
     /**
      * Gets the singular form of the specified (English) plural form. For example:
-     * <p/>
+     *
      * <pre>
      * properties -&gt; property
      * branches   -&gt; branch
@@ -1347,9 +1307,9 @@
      * </table>
      * The returned path will always use the forward slash ('/') as the file separator regardless of the current
      * platform. Also, the result path will have a trailing slash if the input path has a trailing file separator.
-     *
+     * 
      * @param basedir The base directory to relativize the path against, must not be <code>null</code>.
-     * @param path    The path to relativize, must not be <code>null</code>.
+     * @param path The path to relativize, must not be <code>null</code>.
      * @return The relativized path, never <code>null</code>.
      */
     static String toRelative( File basedir, String path )
diff --git a/src/test/java/org/apache/maven/plugin/ant/stubs/AbstractAntTestMavenProjectStub.java b/src/test/java/org/apache/maven/plugin/ant/stubs/AbstractAntTestMavenProjectStub.java
index 6be6b30..5d4090c 100644
--- a/src/test/java/org/apache/maven/plugin/ant/stubs/AbstractAntTestMavenProjectStub.java
+++ b/src/test/java/org/apache/maven/plugin/ant/stubs/AbstractAntTestMavenProjectStub.java
@@ -131,8 +131,7 @@
      */
     public List getCompileSourceRoots()
     {
-        File src =
-            new File( PlexusTestCase.getBasedir() + "/src/test/resources/unit/" + getProjetPath() + "src/main/java" );
+        File src = new File( PlexusTestCase.getBasedir() + "/src/test/resources/unit/" + getProjetPath() + "src/main/java" );
         return Collections.singletonList( src.getAbsolutePath() );
     }
 
@@ -141,8 +140,7 @@
      */
     public List getTestCompileSourceRoots()
     {
-        File test =
-            new File( PlexusTestCase.getBasedir() + "/src/test/resources/unit/" + getProjetPath() + "src/test/java" );
+        File test = new File( PlexusTestCase.getBasedir() + "/src/test/resources/unit/" + getProjetPath() + "src/test/java" );
         return Collections.singletonList( test.getAbsolutePath() );
     }
 
@@ -151,9 +149,9 @@
      */
     public List getCompileArtifacts()
     {
-        Artifact junit =
-            new DefaultArtifact( "junit", "junit", VersionRange.createFromVersion( "3.8.2" ), Artifact.SCOPE_TEST,
-                                 "jar", null, new DefaultArtifactHandler( "jar" ), false );
+        Artifact junit = new DefaultArtifact( "junit", "junit", VersionRange.createFromVersion( "3.8.2" ),
+                                              Artifact.SCOPE_TEST, "jar", null, new DefaultArtifactHandler( "jar" ),
+                                              false );
         junit.setFile( new File( "junit/junit/3.8.2/junit-3.8.2.jar" ) );
 
         return Collections.singletonList( junit );
@@ -164,9 +162,9 @@
      */
     public List getTestArtifacts()
     {
-        Artifact junit =
-            new DefaultArtifact( "junit", "junit", VersionRange.createFromVersion( "3.8.2" ), Artifact.SCOPE_TEST,
-                                 "jar", null, new DefaultArtifactHandler( "jar" ), false );
+        Artifact junit = new DefaultArtifact( "junit", "junit", VersionRange.createFromVersion( "3.8.2" ),
+                                              Artifact.SCOPE_TEST, "jar", null, new DefaultArtifactHandler( "jar" ),
+                                              false );
         junit.setFile( new File( "junit/junit/3.8.2/junit-3.8.2.jar" ) );
 
         return Collections.singletonList( junit );