geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r507395 - /geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PlanProcessorMojo.java
Date Wed, 14 Feb 2007 05:36:24 GMT
Author: jdillon
Date: Tue Feb 13 21:36:23 2007
New Revision: 507395

URL: http://svn.apache.org/viewvc?view=rev&rev=507395
Log:
Use null logging for velocity

Modified:
    geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PlanProcessorMojo.java

Modified: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PlanProcessorMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PlanProcessorMojo.java?view=diff&rev=507395&r1=507394&r2=507395
==============================================================================
--- geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PlanProcessorMojo.java
(original)
+++ geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PlanProcessorMojo.java
Tue Feb 13 21:36:23 2007
@@ -40,6 +40,7 @@
 
 import org.apache.velocity.Template;
 import org.apache.velocity.VelocityContext;
+import org.apache.velocity.app.Velocity;
 import org.apache.velocity.app.VelocityEngine;
 
 import org.apache.xmlbeans.XmlCursor;
@@ -112,11 +113,19 @@
         //        could use resources plugin to do this for us, or
         //        implement what resources plugin does here
         //
+        //        Also velocity does not handle property expansion of expressions like
+        //        ${foo.bar} to the value of the "foo.bar" property :-(
+        //
+        //        Might be better of just hand rolling something...
+        //
         
         VelocityContext context = createContext();
 
         VelocityEngine velocity = new VelocityEngine();
-        velocity.setProperty(VelocityEngine.FILE_RESOURCE_LOADER_PATH, sourceDir.getAbsolutePath());
+        velocity.setProperty(Velocity.FILE_RESOURCE_LOADER_PATH, sourceDir.getAbsolutePath());
+        
+        // Don't spit out any logs
+        velocity.setProperty(Velocity.RUNTIME_LOG_LOGSYSTEM_CLASS, "org.apache.velocity.runtime.log.NullLogSystem");
         velocity.init();
 
         Template template = velocity.getTemplate(planFileName);



Mime
View raw message