maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1412261 - in /maven/maven-3/trunk/maven-model-builder/src/test: java/org/apache/maven/model/building/DefaultModelBuilderFactoryTest.java resources/poms/factory/simple.xml
Date Wed, 21 Nov 2012 19:59:15 GMT
Author: hboutemy
Date: Wed Nov 21 19:59:14 2012
New Revision: 1412261

URL: http://svn.apache.org/viewvc?rev=1412261&view=rev
Log:
[MNG-5380] check that whitespace can be preserved in Maven plugin configuration when reading
pom (still need to check if content is not trimmed when injected into plugin)

Modified:
    maven/maven-3/trunk/maven-model-builder/src/test/java/org/apache/maven/model/building/DefaultModelBuilderFactoryTest.java
    maven/maven-3/trunk/maven-model-builder/src/test/resources/poms/factory/simple.xml

Modified: maven/maven-3/trunk/maven-model-builder/src/test/java/org/apache/maven/model/building/DefaultModelBuilderFactoryTest.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-model-builder/src/test/java/org/apache/maven/model/building/DefaultModelBuilderFactoryTest.java?rev=1412261&r1=1412260&r2=1412261&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-model-builder/src/test/java/org/apache/maven/model/building/DefaultModelBuilderFactoryTest.java
(original)
+++ maven/maven-3/trunk/maven-model-builder/src/test/java/org/apache/maven/model/building/DefaultModelBuilderFactoryTest.java
Wed Nov 21 19:59:14 2012
@@ -21,6 +21,8 @@ package org.apache.maven.model.building;
 
 import java.io.File;
 
+import org.codehaus.plexus.util.xml.Xpp3Dom;
+
 import junit.framework.TestCase;
 
 /**
@@ -49,6 +51,10 @@ public class DefaultModelBuilderFactoryT
         assertNotNull( result );
         assertNotNull( result.getEffectiveModel() );
         assertEquals( "activated", result.getEffectiveModel().getProperties().get( "profile.file"
) );
+        Xpp3Dom conf = (Xpp3Dom) result.getEffectiveModel().getBuild().getPlugins().get(
0 ).getConfiguration();
+        System.out.println( conf );
+        assertEquals( "1.5", conf.getChild( "source" ).getValue() );
+        assertEquals( "  1.5  ", conf.getChild( "target" ).getValue() );
     }
 
 }

Modified: maven/maven-3/trunk/maven-model-builder/src/test/resources/poms/factory/simple.xml
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-model-builder/src/test/resources/poms/factory/simple.xml?rev=1412261&r1=1412260&r2=1412261&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-model-builder/src/test/resources/poms/factory/simple.xml (original)
+++ maven/maven-3/trunk/maven-model-builder/src/test/resources/poms/factory/simple.xml Wed
Nov 21 19:59:14 2012
@@ -37,8 +37,8 @@ under the License.
           <artifactId>maven-compiler-plugin</artifactId>
           <version>2.1</version>
           <configuration>
-            <source>1.5</source>
-            <target>1.5</target>
+            <source>  1.5  </source>
+            <target xml:space="preserve">  1.5  </target>
           </configuration>
         </plugin>
       </plugins>



Mime
View raw message