maven-doxia-tools (1.2-3) plexus-interpolation.diff

Summary

 src/main/java/org/apache/maven/doxia/tools/DefaultSiteTool.java |   19 +++++++---
 1 file changed, 14 insertions(+), 5 deletions(-)

    
download this patch

Patch contents

--- a/src/main/java/org/apache/maven/doxia/tools/DefaultSiteTool.java
+++ b/src/main/java/org/apache/maven/doxia/tools/DefaultSiteTool.java
@@ -45,10 +45,11 @@
 import org.codehaus.plexus.util.IOUtil;
 import org.codehaus.plexus.util.ReaderFactory;
 import org.codehaus.plexus.util.StringUtils;
-import org.codehaus.plexus.util.interpolation.EnvarBasedValueSource;
-import org.codehaus.plexus.util.interpolation.MapBasedValueSource;
-import org.codehaus.plexus.util.interpolation.ObjectBasedValueSource;
-import org.codehaus.plexus.util.interpolation.RegexBasedInterpolator;
+import org.codehaus.plexus.interpolation.InterpolationException;
+import org.codehaus.plexus.interpolation.EnvarBasedValueSource;
+import org.codehaus.plexus.interpolation.MapBasedValueSource;
+import org.codehaus.plexus.interpolation.ObjectBasedValueSource;
+import org.codehaus.plexus.interpolation.RegexBasedInterpolator;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 
 import java.io.File;
@@ -672,7 +673,15 @@
 
         interpolator.addValueSource( new MapBasedValueSource( aProject.getProperties() ) );
 
-        siteDescriptorContent = interpolator.interpolate( siteDescriptorContent, "project" );
+	try
+	{
+            siteDescriptorContent = interpolator.interpolate( siteDescriptorContent, "project" );
+	}
+	catch ( InterpolationException e )
+	{
+	     throw new SiteToolException( "IOException: cannot interpolate siteDescriptorContent: " + e.getMessage(),
+                                         e );
+	}
 
         props.put( "inputEncoding", inputEncoding );