diff -up melati-0.7.8.RC2/melati/src/test/java/org/melati/template/velocity/WebMacroConverterTest.java melati-0.7.8.RC2/melati/src/test/java/org/melati/template/velocity/WebMacroConverterTest.java
--- melati-0.7.8.RC2/melati/src/test/java/org/melati/template/velocity/WebMacroConverterTest.java	1970-01-01 01:00:00.000000000 +0100
+++ melati-0.7.8.RC2/melati/src/test/java/org/melati/template/velocity/WebMacroConverterTest.java	2010-04-02 06:41:45.321408768 +0200
@@ -0,0 +1,74 @@
+/**
+ * This is not really a test but a dirty hack.
+ *
+ * <p>Purpose: get Maven and rpmbuild to convert all WebMacro templates to Velocity between compiling Java and creating the JAR.</p>
+ *
+ * <p>Once we are building from a release that includes all Velocity templates already, this will not be necessary.</p>
+ */
+package org.melati.template.velocity;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FilenameFilter;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintStream;
+
+import junit.framework.TestCase;
+
+/**
+ * @author jim@wright.cz
+ * @since 1 April 2010
+ */
+public class WebMacroConverterTest extends TestCase {
+
+	public WebMacroConverterTest(String name) {
+		super(name);
+	}
+
+	public void testConvertAll() throws IOException {
+		processDirectory(new File("."), true);
+	}
+
+	void processDirectory(File directory, boolean convertingThisDir) throws IOException {
+		// convertingThisDir = convertingThisDir ||
+		//		directory.getName().equals("classes") && directory.getParentFile().getName().equals("target");
+		for (File d : directory.listFiles(new FileFilter() {
+				public boolean accept(File f) {
+					return f.isDirectory();
+				}
+			})) {
+			processDirectory(d, convertingThisDir);
+		}
+		if (convertingThisDir) {
+		   for (File f : directory.listFiles(new FilenameFilter() {
+		   			 public boolean accept(File d, String f) {
+					 		return f.endsWith(".wm");
+					}
+				})) {
+				processWm(f);
+			}
+		}
+	}
+
+	void processWm(File wmFile) throws IOException {
+		String wmPath = wmFile.getPath();
+		// This duplicate logic in WebMacroClasspathReourceLoader
+		String vmPath = wmPath.substring(0, wmPath.length() - 3) + ".vm";
+		File vmFile = new File(vmPath);
+		if (! vmFile.exists()) {
+			InputStream converted = WebMacroConverter.convert(new FileInputStream(wmFile));
+			// System.err.println(vmPath);
+			PrintStream ps = new PrintStream(new FileOutputStream(vmFile));
+			int nextChar = converted.read();
+			while (nextChar > 0) {
+				ps.write((char)nextChar);
+				nextChar = converted.read();
+			}
+			ps.print("\n## " + getClass().getName() + " converted\n## " + wmFile + '\n');
+			ps.close();
+		}
+	}
+}
