Description: Adapts codegen.groovy to run without the groovy-maven-plugin (not in Debian yet) Author: Emmanuel Bourg <ebourg@apache.org> Forwarded: not-needed --- a/common/src/main/script/codegen.groovy +++ b/common/src/main/script/codegen.groovy @@ -1,7 +1,7 @@ -String[] templateDirs = [properties["collection.template.dir"], - properties["collection.template.test.dir"]] -String[] outputDirs = [properties["collection.src.dir"], - properties["collection.testsrc.dir"]] +String[] templateDirs = [System.properties["collection.template.dir"], + System.properties["collection.template.test.dir"]] +String[] outputDirs = [System.properties["collection.src.dir"], + System.properties["collection.testsrc.dir"]] templateDirs.eachWithIndex { templateDir, i -> convertSources templateDir, outputDirs[i] @@ -26,6 +26,7 @@ def replaceFrom = "(^.*)K([^.]+)\\.template\$" def replaceTo = "\\1" + keyName + "\\2.java" def hashCodeFn = keyPrimitive.equals("long") ? "(int) (key ^ (key >>> 32))" : "(int) key" + def ant = new AntBuilder() ant.copy(todir: outputDir) { fileset(dir: templateDir) { include(name: "**/*.template")