if ( src.indexOf( "${" ) < 0 )
{
return src;
}
Logger logger = getLogger();
String result = src;
synchronized( this )
{
for ( ValueSource vs : valueSources )
{
interpolator.addValueSource( vs );
}
for ( InterpolationPostProcessor postProcessor : postProcessors )
{
interpolator.addPostProcessor( postProcessor );
}
try
{
try
{
result = interpolator.interpolate( result, recursionInterceptor );
}
catch( InterpolationException e )
{
throw new ModelInterpolationException( e.getMessage(), e );
}
if ( debug )
{
List<Object> feedback = interpolator.getFeedback();
if ( feedback != null && !feedback.isEmpty() )
{
logger.debug( "Maven encountered the following problems during initial POM interpolation:" );
Object last = null;
for ( Object next : feedback )
{
if ( next instanceof Throwable )
{
if ( last == null )
{
logger.debug( "", ( (Throwable) next ) );
}
else
{
logger.debug( String.valueOf( last ), ( (Throwable) next ) );
}
}
else
{
if ( last != null )
{
logger.debug( String.valueOf( last ) );
}
last = next;
}
}
if ( last != null )
{
logger.debug( String.valueOf( last ) );
}
}
}
interpolator.clearFeedback();