Index: src/java/org/apache/maven/jelly/JellyPropsHandler.java =================================================================== RCS file: /home/cvspublic/maven/src/java/org/apache/maven/jelly/JellyPropsHandler.java,v retrieving revision 1.7.4.3 diff -u -r1.7.4.3 JellyPropsHandler.java --- src/java/org/apache/maven/jelly/JellyPropsHandler.java 28 Mar 2004 21:27:27 -0000 1.7.4.3 +++ src/java/org/apache/maven/jelly/JellyPropsHandler.java 9 May 2004 17:31:03 -0000 @@ -19,6 +19,9 @@ import org.apache.commons.grant.DefaultPropsHandler; import org.apache.commons.jelly.JellyContext; +import org.apache.commons.jelly.expression.Expression; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import java.util.Hashtable; import java.util.Iterator; @@ -33,6 +36,9 @@ public class JellyPropsHandler extends DefaultPropsHandler { + /** Logger */ + private static final Log log = LogFactory.getLog( JellyPropsHandler.class ); + /** The JellyContext. */ private JellyContext context; @@ -65,6 +71,7 @@ */ public String getProperty( String name ) { + log.debug("getProperty(" + name + ")"); if ( name == null ) { return null; @@ -78,7 +85,18 @@ } else { - return value.toString(); + if (log.isDebugEnabled()) + { + log.debug("Queried: " + name + ", returned: " + value + ", a " + value.getClass().getName()); + } + if (value instanceof Expression) + { + return ((Expression) value).evaluateAsString(context); + } + else + { + return value.toString(); + } } } @@ -89,12 +107,13 @@ */ public Hashtable getProperties() { + log.debug("getProperties()"); Hashtable h = new Hashtable(); for ( Iterator i = this.context.getVariableNames(); i.hasNext();) { String name = (String) i.next(); - Object value = this.context.getVariable( name ); - if ( value != null && value.toString() != null ) + Object value = getProperty(name); + if (value != null) { h.put( name, value.toString() ); }