mirror of https://github.com/apache/maven.git
[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:
parent
0098ceb9fc
commit
6417401054
|
@ -21,6 +21,8 @@ package org.apache.maven.model.building;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
|
import org.codehaus.plexus.util.xml.Xpp3Dom;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -49,6 +51,10 @@ public class DefaultModelBuilderFactoryTest
|
||||||
assertNotNull( result );
|
assertNotNull( result );
|
||||||
assertNotNull( result.getEffectiveModel() );
|
assertNotNull( result.getEffectiveModel() );
|
||||||
assertEquals( "activated", result.getEffectiveModel().getProperties().get( "profile.file" ) );
|
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() );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,8 +37,8 @@ under the License.
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>2.1</version>
|
<version>2.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.5</source>
|
<source> 1.5 </source>
|
||||||
<target>1.5</target>
|
<target xml:space="preserve"> 1.5 </target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
|
|
Loading…
Reference in New Issue