final ModelBuildingRequest config,
final ModelProblemCollector problems )
{
Properties modelProperties = model.getProperties();
ValueSource modelValueSource1 = new PrefixedObjectValueSource( PROJECT_PREFIXES, model, false );
if ( config.getValidationLevel() >= ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_2_0 )
{
modelValueSource1 = new ProblemDetectingValueSource( modelValueSource1, "pom.", "project.", problems );
}
ValueSource modelValueSource2 = new ObjectBasedValueSource( model );
if ( config.getValidationLevel() >= ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_2_0 )
{
modelValueSource2 = new ProblemDetectingValueSource( modelValueSource2, "", "project.", problems );
}
// NOTE: Order counts here!
List<ValueSource> valueSources = new ArrayList<ValueSource>( 9 );
if ( projectDir != null )
{
ValueSource basedirValueSource = new PrefixedValueSourceWrapper( new AbstractValueSource( false )
{
public Object getValue( String expression )
{
if ( "basedir".equals( expression ) )
{
return projectDir.getAbsolutePath();
}
return null;
}
}, PROJECT_PREFIXES, true );
valueSources.add( basedirValueSource );
ValueSource baseUriValueSource = new PrefixedValueSourceWrapper( new AbstractValueSource( false )
{
public Object getValue( String expression )
{
if ( "baseUri".equals( expression ) )
{