mirror of https://github.com/apache/maven.git
Some ITs were failing because of the new interpolation code. Certains code paths were failing because they did not add CDATA sections to the pom. Added CDATA support directly to ModelProperty so path doesn't matter.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@694999 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9fff4c0612
commit
c5f52578f5
|
@ -132,18 +132,7 @@ public final class PomClassicTransformer
|
|||
throw new IllegalArgumentException( "properties: null" );
|
||||
}
|
||||
|
||||
List<ModelProperty> props = new ArrayList<ModelProperty>();
|
||||
for ( ModelProperty mp : properties )
|
||||
{ //TODO: Resolved values
|
||||
if ( mp.getResolvedValue() != null && ( mp.getResolvedValue().contains( "=" ) || mp.getResolvedValue().contains( "<" ) ) )
|
||||
{
|
||||
props.add( new ModelProperty( mp.getUri(), "<![CDATA[" + mp.getResolvedValue() + "]]>" ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
props.add( mp );
|
||||
}
|
||||
}
|
||||
List<ModelProperty> props = new ArrayList<ModelProperty>( properties );
|
||||
|
||||
//dependency management
|
||||
ModelDataSource source = new DefaultModelDataSource();
|
||||
|
@ -496,6 +485,7 @@ public final class PomClassicTransformer
|
|||
}
|
||||
|
||||
interpolateModelProperties( modelProperties, interpolatorProperties, ((PomClassicDomainModel) domainModels.get(0)) );
|
||||
|
||||
return modelProperties;
|
||||
}
|
||||
|
||||
|
|
|
@ -124,12 +124,17 @@ public final class ModelProperty
|
|||
}
|
||||
|
||||
/**
|
||||
* Value of this model property after interpolation.
|
||||
* Value of this model property after interpolation. CDATA section will be added if needed.
|
||||
*
|
||||
* @return value of this model property after interpolation
|
||||
*/
|
||||
public String getResolvedValue()
|
||||
{
|
||||
if( resolvedValue != null && !resolvedValue.startsWith ("<![CDATA[")
|
||||
&& (resolvedValue.contains( "=" ) || resolvedValue.contains( "<" )))
|
||||
{
|
||||
resolvedValue = "<![CDATA[" + resolvedValue + "]]>";
|
||||
}
|
||||
return resolvedValue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue