You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2017/12/20 09:28:06 UTC

[maven-ant-plugin] 08/42: MANT-42: Update to p-u 1.5.4

This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to annotated tag maven-ant-plugin-2.1.1
in repository https://gitbox.apache.org/repos/asf/maven-ant-plugin.git

commit b72ec8c392b52894b11916c12176ef85c0d58cfb
Author: Vincent Siveton <vs...@apache.org>
AuthorDate: Tue Jun 17 18:55:39 2008 +0000

    MANT-42: Update to p-u 1.5.4
    
    o uses the snapshot of 1.5.4
    o removed moved codes
    
    git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-ant-plugin@668794 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                            |   2 +-
 .../apache/maven/plugin/ant/AntBuildWriter.java    |  89 +++++------
 .../maven/plugin/ant/AntBuildWriterUtil.java       | 171 +++------------------
 .../maven/plugin/ant/AntBuildWriterUtilTest.java   |   9 +-
 4 files changed, 69 insertions(+), 202 deletions(-)

diff --git a/pom.xml b/pom.xml
index b5eb7ad..472c9e1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -84,7 +84,7 @@ under the License.
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
-      <version>1.5.1</version>
+      <version>1.5.4-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>ant</groupId>
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 d7d6636..33d5283 100644
--- a/src/main/java/org/apache/maven/plugin/ant/AntBuildWriter.java
+++ b/src/main/java/org/apache/maven/plugin/ant/AntBuildWriter.java
@@ -41,6 +41,7 @@ import org.codehaus.plexus.util.IOUtil;
 import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter;
 import org.codehaus.plexus.util.xml.XMLWriter;
+import org.codehaus.plexus.util.xml.XmlWriterUtil;
 
 /**
  * Write Ant build files from <code>Maven Project</code> for <a href="http://ant.apache.org">Ant</a> 1.6.2 or above:
@@ -59,7 +60,7 @@ public class AntBuildWriter
     /**
      * The default line indenter
      */
-    protected static final int DEFAULT_INDENTATION_SIZE = 2;
+    protected static final int DEFAULT_INDENTATION_SIZE = XmlWriterUtil.DEFAULT_INDENTATION_SIZE;
 
     /**
      * The default build file name (build.xml)
@@ -257,7 +258,7 @@ public class AntBuildWriter
         writer.addAttribute( "default", "package" );
         writer.addAttribute( "basedir", "." );
 
-        AntBuildWriterUtil.writeLineBreak( writer );
+        XmlWriterUtil.writeLineBreak( writer );
 
         // ----------------------------------------------------------------------
         // <property/>
@@ -313,11 +314,11 @@ public class AntBuildWriter
         // ----------------------------------------------------------------------
         writeGetDepsTarget( writer );
 
-        AntBuildWriterUtil.writeLineBreak( writer );
+        XmlWriterUtil.writeLineBreak( writer );
 
         writer.endElement(); // project
 
-        AntBuildWriterUtil.writeLineBreak( writer );
+        XmlWriterUtil.writeLineBreak( writer );
 
         IOUtil.close( w );
     }
@@ -360,18 +361,18 @@ public class AntBuildWriter
         writer.addAttribute( "default", "package" );
         writer.addAttribute( "basedir", "." );
 
-        AntBuildWriterUtil.writeLineBreak( writer );
+        XmlWriterUtil.writeLineBreak( writer );
 
-        AntBuildWriterUtil.writeCommentText( writer, "Import " + DEFAULT_MAVEN_BUILD_FILENAME
+        XmlWriterUtil.writeCommentText( writer, "Import " + DEFAULT_MAVEN_BUILD_FILENAME
             + " into the current project", 1 );
 
         writer.startElement( "import" );
         writer.addAttribute( "file", DEFAULT_MAVEN_BUILD_FILENAME );
         writer.endElement(); // import
 
-        AntBuildWriterUtil.writeLineBreak( writer, 1, 1 );
+        XmlWriterUtil.writeLineBreak( writer, 1, 1 );
 
-        AntBuildWriterUtil.writeCommentText( writer, "Help target", 1 );
+        XmlWriterUtil.writeCommentText( writer, "Help target", 1 );
 
         writer.startElement( "target" );
         writer.addAttribute( "name", "help" );
@@ -382,11 +383,11 @@ public class AntBuildWriter
 
         writer.endElement(); // target
 
-        AntBuildWriterUtil.writeLineBreak( writer, 2 );
+        XmlWriterUtil.writeLineBreak( writer, 2 );
 
         writer.endElement(); // project
 
-        AntBuildWriterUtil.writeLineBreak( writer );
+        XmlWriterUtil.writeLineBreak( writer );
 
         IOUtil.close( w );
     }
@@ -405,7 +406,7 @@ public class AntBuildWriter
 
         // TODO: optional in m1
         // TODO: USD properties
-        AntBuildWriterUtil.writeCommentText( writer, "Build environment properties", 1 );
+        XmlWriterUtil.writeCommentText( writer, "Build environment properties", 1 );
 
         // ----------------------------------------------------------------------
         // File properties to override local properties
@@ -423,7 +424,7 @@ public class AntBuildWriter
         // Build properties
         // ----------------------------------------------------------------------
 
-        AntBuildWriterUtil.writeLineBreak( writer, 2, 1 );
+        XmlWriterUtil.writeLineBreak( writer, 2, 1 );
 
         writer.startElement( "property" );
         writer.addAttribute( "name", "maven.build.finalName" );
@@ -518,7 +519,7 @@ public class AntBuildWriter
         // Setting properties
         // ----------------------------------------------------------------------
 
-        AntBuildWriterUtil.writeLineBreak( writer, 2, 1 );
+        XmlWriterUtil.writeLineBreak( writer, 2, 1 );
 
         writer.startElement( "property" );
         writer.addAttribute( "name", "maven.repo.local" );
@@ -535,7 +536,7 @@ public class AntBuildWriter
         writer.addAttribute( "value", String.valueOf( settings.isInteractiveMode() ) );
         writer.endElement(); // property
 
-        AntBuildWriterUtil.writeLineBreak( writer );
+        XmlWriterUtil.writeLineBreak( writer );
     }
 
     /**
@@ -570,7 +571,7 @@ public class AntBuildWriter
             return;
         }
 
-        AntBuildWriterUtil.writeCommentText( writer, "Defining classpaths", 1 );
+        XmlWriterUtil.writeCommentText( writer, "Defining classpaths", 1 );
 
         writer.startElement( "path" );
         writer.addAttribute( "id", "build.classpath" );
@@ -618,7 +619,7 @@ public class AntBuildWriter
         writer.endElement(); // fileset
         writer.endElement(); // path
 
-        AntBuildWriterUtil.writeLineBreak( writer );
+        XmlWriterUtil.writeLineBreak( writer );
     }
 
     /**
@@ -628,7 +629,7 @@ public class AntBuildWriter
      */
     private void writeCleanTarget( XMLWriter writer )
     {
-        AntBuildWriterUtil.writeCommentText( writer, "Cleaning up target", 1 );
+        XmlWriterUtil.writeCommentText( writer, "Cleaning up target", 1 );
 
         writer.startElement( "target" );
         writer.addAttribute( "name", "clean" );
@@ -654,7 +655,7 @@ public class AntBuildWriter
 
         writer.endElement(); // target
 
-        AntBuildWriterUtil.writeLineBreak( writer );
+        XmlWriterUtil.writeLineBreak( writer );
     }
 
     /**
@@ -667,7 +668,7 @@ public class AntBuildWriter
     private void writeCompileTarget( XMLWriter writer, List compileSourceRoots )
         throws IOException
     {
-        AntBuildWriterUtil.writeCommentText( writer, "Compilation target", 1 );
+        XmlWriterUtil.writeCommentText( writer, "Compilation target", 1 );
 
         if ( AntBuildWriterUtil.isPomPackaging( project ) )
         {
@@ -697,7 +698,7 @@ public class AntBuildWriter
             writer.endElement(); // target
         }
 
-        AntBuildWriterUtil.writeLineBreak( writer );
+        XmlWriterUtil.writeLineBreak( writer );
     }
 
     /**
@@ -710,7 +711,7 @@ public class AntBuildWriter
     private void writeCompileTestsTarget( XMLWriter writer, List testCompileSourceRoots )
         throws IOException
     {
-        AntBuildWriterUtil.writeCommentText( writer, "Test-compilation target", 1 );
+        XmlWriterUtil.writeCommentText( writer, "Test-compilation target", 1 );
 
         if ( AntBuildWriterUtil.isPomPackaging( project ) )
         {
@@ -741,7 +742,7 @@ public class AntBuildWriter
             writer.endElement(); // target
         }
 
-        AntBuildWriterUtil.writeLineBreak( writer );
+        XmlWriterUtil.writeLineBreak( writer );
     }
 
     /**
@@ -753,7 +754,7 @@ public class AntBuildWriter
     private void writeTestTargets( XMLWriter writer, List testCompileSourceRoots )
         throws IOException
     {
-        AntBuildWriterUtil.writeCommentText( writer, "Run all tests", 1 );
+        XmlWriterUtil.writeCommentText( writer, "Run all tests", 1 );
 
         if ( AntBuildWriterUtil.isPomPackaging( project ) )
         {
@@ -842,7 +843,7 @@ public class AntBuildWriter
             }
             writer.endElement(); // target
 
-            AntBuildWriterUtil.writeLineBreak( writer, 2, 1 );
+            XmlWriterUtil.writeLineBreak( writer, 2, 1 );
 
             writer.startElement( "target" );
             writer.addAttribute( "name", "test-junit-present" );
@@ -854,7 +855,7 @@ public class AntBuildWriter
 
             writer.endElement(); // target
 
-            AntBuildWriterUtil.writeLineBreak( writer, 2, 1 );
+            XmlWriterUtil.writeLineBreak( writer, 2, 1 );
 
             writer.startElement( "target" );
             writer.addAttribute( "name", "test-junit-status" );
@@ -883,7 +884,7 @@ public class AntBuildWriter
             writer.endElement(); // condition
             writer.endElement(); // target
 
-            AntBuildWriterUtil.writeLineBreak( writer, 2, 1 );
+            XmlWriterUtil.writeLineBreak( writer, 2, 1 );
 
             writer.startElement( "target" );
             writer.addAttribute( "name", "junit-missing" );
@@ -905,12 +906,12 @@ public class AntBuildWriter
             writer.endElement(); // target
         }
 
-        AntBuildWriterUtil.writeLineBreak( writer );
+        XmlWriterUtil.writeLineBreak( writer );
     }
 
     /**
      * Gets the include patterns for the unit tests.
-     * 
+     *
      * @return A list of strings with include patterns, might be empty but never <code>null</code>.
      */
     private List getTestIncludes()
@@ -926,7 +927,7 @@ public class AntBuildWriter
 
     /**
      * Gets the exclude patterns for the unit tests.
-     * 
+     *
      * @return A list of strings with exclude patterns, might be empty but never <code>null</code>.
      */
     private List getTestExcludes()
@@ -942,7 +943,7 @@ public class AntBuildWriter
 
     /**
      * Write the <code>&lt;fileset&gt;</code> elements for the test compile source roots.
-     * 
+     *
      * @param writer
      * @param testCompileSourceRoots
      * @param includes
@@ -969,7 +970,7 @@ public class AntBuildWriter
     private void writeJavadocTarget( XMLWriter writer )
         throws IOException
     {
-        AntBuildWriterUtil.writeCommentText( writer, "Javadoc target", 1 );
+        XmlWriterUtil.writeCommentText( writer, "Javadoc target", 1 );
 
         writer.startElement( "target" );
         writer.addAttribute( "name", "javadoc" );
@@ -993,7 +994,7 @@ public class AntBuildWriter
 
         writer.endElement(); // target
 
-        AntBuildWriterUtil.writeLineBreak( writer );
+        XmlWriterUtil.writeLineBreak( writer );
     }
 
     /**
@@ -1006,7 +1007,7 @@ public class AntBuildWriter
         throws IOException
     {
         String synonym = null; // type of the package we are creating (for example jar)
-        AntBuildWriterUtil.writeCommentText( writer, "Package target", 1 );
+        XmlWriterUtil.writeCommentText( writer, "Package target", 1 );
 
         writer.startElement( "target" );
         writer.addAttribute( "name", "package" );
@@ -1056,11 +1057,11 @@ public class AntBuildWriter
 
         writer.endElement(); // target
 
-        AntBuildWriterUtil.writeLineBreak( writer );
+        XmlWriterUtil.writeLineBreak( writer );
 
         if ( synonym != null )
         {
-            AntBuildWriterUtil.writeCommentText( writer,
+            XmlWriterUtil.writeCommentText( writer,
                                                  "A dummy target for the package named after the type it creates", 1 );
             writer.startElement( "target" );
             writer.addAttribute( "name", synonym );
@@ -1068,7 +1069,7 @@ public class AntBuildWriter
             writer.addAttribute( "description", "Builds the " + synonym + " for the application" );
             writer.endElement(); //target
 
-            AntBuildWriterUtil.writeLineBreak( writer );
+            XmlWriterUtil.writeLineBreak( writer );
         }
     }
 
@@ -1216,7 +1217,7 @@ public class AntBuildWriter
             return;
         }
 
-        AntBuildWriterUtil.writeCommentText( writer, "Download dependencies target", 1 );
+        XmlWriterUtil.writeCommentText( writer, "Download dependencies target", 1 );
 
         writer.startElement( "target" );
         writer.addAttribute( "name", "test-offline" );
@@ -1230,7 +1231,7 @@ public class AntBuildWriter
         writer.endElement(); // condition
         writer.endElement(); // target
 
-        AntBuildWriterUtil.writeLineBreak( writer, 2, 1 );
+        XmlWriterUtil.writeLineBreak( writer, 2, 1 );
 
         writer.startElement( "target" );
         writer.addAttribute( "name", "get-deps" );
@@ -1301,7 +1302,7 @@ public class AntBuildWriter
 
         writer.endElement(); // target
 
-        AntBuildWriterUtil.writeLineBreak( writer );
+        XmlWriterUtil.writeLineBreak( writer );
     }
 
     // ----------------------------------------------------------------------
@@ -1356,20 +1357,20 @@ public class AntBuildWriter
 
         return sb.toString();
     }
-    
+
     /**
      * Flattens the specified file selector options into a simple string list. For instance, the input
-     * 
+     *
      * <pre>
      * [ {include=&quot;*Test.java&quot;}, {include=&quot;*TestCase.java&quot;} ]
      * </pre>
-     * 
+     *
      * is converted to
-     * 
+     *
      * <pre>
      * [ &quot;*Test.java&quot;, &quot;*TestCase.java&quot; ]
      * </pre>
-     * 
+     *
      * @param options The file selector options to flatten, may be <code>null</code>.
      * @return The string list, might be empty but never <code>null</code>.
      */
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 b0aa3c7..0da93f8 100644
--- a/src/main/java/org/apache/maven/plugin/ant/AntBuildWriterUtil.java
+++ b/src/main/java/org/apache/maven/plugin/ant/AntBuildWriterUtil.java
@@ -41,6 +41,7 @@ import org.apache.maven.wagon.PathUtils;
 import org.apache.xpath.XPathAPI;
 import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.xml.XMLWriter;
+import org.codehaus.plexus.util.xml.XmlWriterUtil;
 import org.codehaus.plexus.util.xml.Xpp3Dom;
 import org.w3c.dom.Document;
 import org.w3c.dom.Node;
@@ -117,21 +118,21 @@ public class AntBuildWriterUtil
     {
         writeAntVersionHeader( writer );
 
-        writeCommentLineBreak( writer );
-        writeComment( writer, StringUtils.repeat( "=", 21 ) + " - DO NOT EDIT THIS FILE! - "
+        XmlWriterUtil.writeCommentLineBreak( writer );
+        XmlWriterUtil.writeComment( writer, StringUtils.repeat( "=", 21 ) + " - DO NOT EDIT THIS FILE! - "
             + StringUtils.repeat( "=", 21 ) );
-        writeCommentLineBreak( writer );
-        writeComment( writer, " " );
-        writeComment( writer, "Any modifications will be overwritten." );
-        writeComment( writer, " " );
+        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 );
-        writeComment( writer, "Generated by Maven Ant Plugin on "
+        XmlWriterUtil.writeComment( writer, "Generated by Maven Ant Plugin on "
             + dateFormat.format( new Date( System.currentTimeMillis() ) ) );
-        writeComment( writer, "See: http://maven.apache.org/plugins/maven-ant-plugin/" );
-        writeComment( writer, " " );
-        writeCommentLineBreak( writer );
+        XmlWriterUtil.writeComment( writer, "See: http://maven.apache.org/plugins/maven-ant-plugin/" );
+        XmlWriterUtil.writeComment( writer, " " );
+        XmlWriterUtil.writeCommentLineBreak( writer );
 
-        writeLineBreak( writer );
+        XmlWriterUtil.writeLineBreak( writer );
     }
 
     /**
@@ -141,143 +142,7 @@ public class AntBuildWriterUtil
      */
     public static void writeAntVersionHeader( XMLWriter writer )
     {
-        writeCommentText( writer, "Ant build file (http://ant.apache.org/) for Ant 1.6.2 or above.", 0 );
-    }
-
-    /**
-     * Convenience method to write one <code>CRLF</code>
-     *
-     * @param writer not null writer
-     */
-    public static void writeLineBreak( XMLWriter writer )
-    {
-        writeLineBreak( writer, 1 );
-    }
-
-    /**
-     * Convenience method to repeat <code>CRLF</code>
-     *
-     * @param writer not null
-     * @param repeat
-     */
-    public static void writeLineBreak( XMLWriter writer, int repeat )
-    {
-        for ( int i = 0; i < repeat; i++ )
-        {
-            writer.writeMarkup( "\n" );
-        }
-    }
-
-    /**
-     * Convenience method to repeat <code>CRLF</code> and to indent the writer
-     *
-     * @param writer not null
-     * @param repeat
-     * @param indent postive number
-     */
-    public static void writeLineBreak( XMLWriter writer, int repeat, int indent )
-    {
-        writeLineBreak( writer, repeat );
-
-        if ( indent < 0 )
-        {
-            indent = 0;
-        }
-
-        writer.writeText( StringUtils.repeat( " ", indent * AntBuildWriter.DEFAULT_INDENTATION_SIZE ) );
-    }
-
-    /**
-     * Convenience method to write XML comment line break. Its size is 80.
-     *
-     * @param writer not null
-     */
-    public static void writeCommentLineBreak( XMLWriter writer )
-    {
-        writer.writeMarkup( "<!-- " + StringUtils.repeat( "=", 70 ) + " -->\n" );
-    }
-
-    /**
-     * Convenience method to write XML comment line. The <code>comment</code> is splitted to have a size of 80.
-     *
-     * @param writer not null
-     * @param comment
-     */
-    public static void writeComment( XMLWriter writer, String comment )
-    {
-        if ( comment == null )
-        {
-            comment = "null";
-        }
-
-        String[] words = StringUtils.split( comment, " " );
-
-        StringBuffer line = new StringBuffer( "<!-- " );
-        for ( int i = 0; i < words.length; i++ )
-        {
-            String[] sentences = StringUtils.split( words[i], "\n" );
-            if ( sentences.length > 1 )
-            {
-                for ( int j = 0; j < sentences.length - 1; j++ )
-                {
-                    line.append( sentences[j] ).append( ' ' );
-                    line.append( StringUtils.repeat( " ", 76 - line.length() ) ).append( "-->" ).append( '\n' );
-                    writer.writeMarkup( line.toString() );
-                    line = new StringBuffer( "<!-- " );
-                }
-                line.append( sentences[sentences.length - 1] ).append( ' ' );
-            }
-            else
-            {
-                StringBuffer sentenceTmp = new StringBuffer( line.toString() );
-                sentenceTmp.append( words[i] ).append( ' ' );
-                if ( sentenceTmp.length() > 76 )
-                {
-                    line.append( StringUtils.repeat( " ", 76 - line.length() ) ).append( "-->" ).append( '\n' );
-                    writer.writeMarkup( line.toString() );
-                    line = new StringBuffer( "<!-- " );
-                    line.append( words[i] ).append( ' ' );
-                }
-                else
-                {
-                    line.append( words[i] ).append( ' ' );
-                }
-            }
-        }
-        if ( line.length() <= 76 )
-        {
-            line.append( StringUtils.repeat( " ", 76 - line.length() ) ).append( "-->" ).append( '\n' );
-        }
-        writer.writeMarkup( line.toString() );
-    }
-
-    /**
-     * Convenience method to write XML comment between two comment line break.
-     * The XML comment block is also indented.
-     *
-     * @param writer not null
-     * @param comment
-     * @param indent
-     */
-    public static void writeCommentText( XMLWriter writer, String comment, int indent )
-    {
-        if ( indent < 0 )
-        {
-            indent = 0;
-        }
-
-        writeLineBreak( writer, 1 );
-
-        writer.writeMarkup( StringUtils.repeat( " ", indent * AntBuildWriter.DEFAULT_INDENTATION_SIZE ) );
-        writeCommentLineBreak( writer );
-
-        writer.writeMarkup( StringUtils.repeat( " ", indent * AntBuildWriter.DEFAULT_INDENTATION_SIZE ) );
-        writeComment( writer, comment );
-
-        writer.writeMarkup( StringUtils.repeat( " ", indent * AntBuildWriter.DEFAULT_INDENTATION_SIZE ) );
-        writeCommentLineBreak( writer );
-
-        writeLineBreak( writer, 1, indent );
+        XmlWriterUtil.writeCommentText( writer, "Ant build file (http://ant.apache.org/) for Ant 1.6.2 or above.", 0 );
     }
 
     /**
@@ -691,7 +556,7 @@ public class AntBuildWriterUtil
         {
             writer.addAttribute( "\n"
                 + StringUtils.repeat( " ", ( StringUtils.isEmpty( tag ) ? 0 : tag.length() ) + indent
-                    * AntBuildWriter.DEFAULT_INDENTATION_SIZE ) + name, value );
+                    * XmlWriterUtil.DEFAULT_INDENTATION_SIZE ) + name, value );
         }
     }
 
@@ -1324,7 +1189,7 @@ public class AntBuildWriterUtil
 
     /**
      * Checks whether the specified node has element content or consists only of character data.
-     * 
+     *
      * @param node The node to test, may be <code>null</code>.
      * @return <code>true</code> if any child node is an element, <code>false</code> otherwise.
      */
@@ -1348,7 +1213,7 @@ public class AntBuildWriterUtil
 
     /**
      * Gets the text content of the specified node.
-     * 
+     *
      * @param node The node whose text contents should be retrieved, may be <code>null</code>.
      * @return The text content of the node, can be empty but never <code>null</code>.
      */
@@ -1372,13 +1237,13 @@ public class AntBuildWriterUtil
 
     /**
      * Gets the singular form of the specified (English) plural form. For example:
-     * 
+     *
      * <pre>
      * properties -&gt; property
      * branches   -&gt; branch
      * reports    -&gt; report
      * </pre>
-     * 
+     *
      * @param pluralForm The plural form for which to derive the singular form, may be <code>null</code>.
      * @return The corresponding singular form or an empty string if the input string was not recognized as a plural
      *         form.
diff --git a/src/test/java/org/apache/maven/plugin/ant/AntBuildWriterUtilTest.java b/src/test/java/org/apache/maven/plugin/ant/AntBuildWriterUtilTest.java
index e1b7cb7..56f22af 100644
--- a/src/test/java/org/apache/maven/plugin/ant/AntBuildWriterUtilTest.java
+++ b/src/test/java/org/apache/maven/plugin/ant/AntBuildWriterUtilTest.java
@@ -29,6 +29,7 @@ import org.apache.maven.project.MavenProject;
 import org.codehaus.plexus.PlexusTestCase;
 import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter;
 import org.codehaus.plexus.util.xml.XMLWriter;
+import org.codehaus.plexus.util.xml.XmlWriterUtil;
 
 /**
  * Test cases for 'org.apache.maven.plugin.ant.AntBuildWriterUtil'
@@ -46,7 +47,7 @@ public class AntBuildWriterUtilTest
     {
         StringWriter s = new StringWriter();
         XMLWriter writer = new PrettyPrintXMLWriter( s );
-        AntBuildWriterUtil.writeComment( writer, null );
+        XmlWriterUtil.writeComment( writer, null );
         StringBuffer sb = new StringBuffer();
         sb.append( "<!-- null                                                                   -->" ).append( '\n' );
         assertTrue( s.toString().equals( sb.toString() ) );
@@ -59,7 +60,7 @@ public class AntBuildWriterUtilTest
     {
         StringWriter s = new StringWriter();
         XMLWriter writer = new PrettyPrintXMLWriter( s );
-        AntBuildWriterUtil.writeComment( writer, "This is a short text" );
+        XmlWriterUtil.writeComment( writer, "This is a short text" );
         StringBuffer sb = new StringBuffer();
         sb.append( "<!-- This is a short text                                                   -->" ).append( '\n' );
         assertTrue( s.toString().equals( sb.toString() ) );
@@ -72,7 +73,7 @@ public class AntBuildWriterUtilTest
     {
         StringWriter s = new StringWriter();
         XMLWriter writer = new PrettyPrintXMLWriter( s );
-        AntBuildWriterUtil.writeComment( writer, "Maven is a software project management and comprehension tool. "
+        XmlWriterUtil.writeComment( writer, "Maven is a software project management and comprehension tool. "
             + "Based on the concept of a project object model (POM), Maven can manage a project's build, reporting "
             + "and documentation from a central piece of information." );
         StringBuffer sb = new StringBuffer();
@@ -180,7 +181,7 @@ public class AntBuildWriterUtilTest
 
     /**
      * Test method for {@link AntBuildWriterUtil#getSingularForm(String)}.
-     * 
+     *
      * @throws Exception
      */
     public static void testGetSingularForm()

-- 
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.