maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aherit...@apache.org
Subject [33/50] git commit: [MNG-5380] check that whitespace can be preserved in Maven plugin configuration when building MavenProject (still need to check if content is not trimmed when injected into plugin)
Date Sat, 01 Dec 2012 14:50:03 GMT
[MNG-5380] check that whitespace can be preserved in Maven plugin configuration when building
MavenProject (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@1412310 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/a286f120
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/a286f120
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/a286f120

Branch: refs/heads/feature/colorized-console/log4j2
Commit: a286f120d6f584ca1970cf6e94c361d6bb313c3f
Parents: d831e1e
Author: Herve Boutemy <hboutemy@apache.org>
Authored: Wed Nov 21 21:36:19 2012 +0000
Committer: Arnaud HeĢritier <aheritier@exoplatform.com>
Committed: Sat Dec 1 13:51:02 2012 +0100

----------------------------------------------------------------------
 .../apache/maven/project/PomConstructionTest.java  |    3 ++-
 .../maven/project/harness/Xpp3DomNodePointer.java  |    4 ++--
 .../reporting-plugin-config/sub/pom.xml            |    5 +++--
 3 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/a286f120/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java
----------------------------------------------------------------------
diff --git a/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java b/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java
index 26990d3..8012124 100644
--- a/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java
+++ b/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java
@@ -1083,9 +1083,10 @@ public class PomConstructionTest
     {
         PomTestWrapper pom = buildPom( "reporting-plugin-config/sub" );
 
-        assertEquals( 2, ( (List<?>) pom.getValue( "reporting/plugins[1]/configuration/stringParams"
) ).size() );
+        assertEquals( 3, ( (List<?>) pom.getValue( "reporting/plugins[1]/configuration/stringParams"
) ).size() );
         assertEquals( "parentParam", pom.getValue( "reporting/plugins[1]/configuration/stringParams[1]/stringParam[1]"
) );
         assertEquals( "childParam", pom.getValue( "reporting/plugins[1]/configuration/stringParams[1]/stringParam[2]"
) );
+        assertEquals( "  preserve space  ", pom.getValue( "reporting/plugins[1]/configuration/stringParams[1]/stringParam[3]"
) );
         assertEquals( "true", pom.getValue( "reporting/plugins[1]/configuration/booleanParam"
) );
     }    
     

http://git-wip-us.apache.org/repos/asf/maven/blob/a286f120/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomNodePointer.java
----------------------------------------------------------------------
diff --git a/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomNodePointer.java
b/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomNodePointer.java
index a628edc..59ce300 100644
--- a/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomNodePointer.java
+++ b/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomNodePointer.java
@@ -78,14 +78,14 @@ class Xpp3DomNodePointer
     @Override
     public Object getValue()
     {
-        return getValue(node);
+        return getValue( node );
     }
 
     private static Object getValue( Xpp3Dom node )
     {
         if ( node.getValue() != null )
         {
-            return node.getValue().trim();
+            return node.getValue();
         }
         else
         {

http://git-wip-us.apache.org/repos/asf/maven/blob/a286f120/maven-core/src/test/resources-project-builder/reporting-plugin-config/sub/pom.xml
----------------------------------------------------------------------
diff --git a/maven-core/src/test/resources-project-builder/reporting-plugin-config/sub/pom.xml
b/maven-core/src/test/resources-project-builder/reporting-plugin-config/sub/pom.xml
index e6018dd..b076827 100644
--- a/maven-core/src/test/resources-project-builder/reporting-plugin-config/sub/pom.xml
+++ b/maven-core/src/test/resources-project-builder/reporting-plugin-config/sub/pom.xml
@@ -36,8 +36,9 @@
         <artifactId>maven-it-plugin-configuration</artifactId>
         <version>2.1-SNAPSHOT</version>
         <configuration>
-            <stringParams combine.children="append">
-            <stringParam>childParam</stringParam>
+          <stringParams combine.children="append">
+            <stringParam>  childParam  </stringParam>
+            <stringParam xml:space="preserve">  preserve space  </stringParam>
           </stringParams>
         </configuration>
       </plugin>


Mime
View raw message