You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jv...@apache.org on 2013/03/18 22:47:28 UTC

[28/50] git commit: [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)

[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)

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@1412261 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/cbcda629
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/cbcda629
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/cbcda629

Branch: refs/heads/master
Commit: cbcda629dc78e3f74b8d93d998d82fa2541199e6
Parents: c401d36
Author: Herve Boutemy <hb...@apache.org>
Authored: Wed Nov 21 19:59:14 2012 +0000
Committer: Herve Boutemy <hb...@apache.org>
Committed: Wed Nov 21 19:59:14 2012 +0000

----------------------------------------------------------------------
 .../building/DefaultModelBuilderFactoryTest.java   |    6 ++++++
 .../src/test/resources/poms/factory/simple.xml     |    4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/cbcda629/maven-model-builder/src/test/java/org/apache/maven/model/building/DefaultModelBuilderFactoryTest.java
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/building/DefaultModelBuilderFactoryTest.java b/maven-model-builder/src/test/java/org/apache/maven/model/building/DefaultModelBuilderFactoryTest.java
index f85996d..142e062 100644
--- a/maven-model-builder/src/test/java/org/apache/maven/model/building/DefaultModelBuilderFactoryTest.java
+++ b/maven-model-builder/src/test/java/org/apache/maven/model/building/DefaultModelBuilderFactoryTest.java
@@ -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 DefaultModelBuilderFactoryTest
         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() );
     }
 
 }

http://git-wip-us.apache.org/repos/asf/maven/blob/cbcda629/maven-model-builder/src/test/resources/poms/factory/simple.xml
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/test/resources/poms/factory/simple.xml b/maven-model-builder/src/test/resources/poms/factory/simple.xml
index 8912298..7190073 100644
--- a/maven-model-builder/src/test/resources/poms/factory/simple.xml
+++ b/maven-model-builder/src/test/resources/poms/factory/simple.xml
@@ -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>