[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
This commit is contained in:
Herve Boutemy 2012-11-21 19:59:14 +00:00
parent 0098ceb9fc
commit 6417401054
2 changed files with 8 additions and 2 deletions

View File

@ -21,6 +21,8 @@
import java.io.File;
import org.codehaus.plexus.util.xml.Xpp3Dom;
import junit.framework.TestCase;
/**
@ -49,6 +51,10 @@ public void testCompleteWiring()
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() );
}
}

View File

@ -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>