What you suggest fails, at least with JDK7:

```
[INFO] Executing tasks

main:

clean:

copy-files:

modules:
     [echo] Initializing module -> org.infinispan
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.455s
[INFO] Finished at: Tue Feb 18 17:14:27 CET 2014
[INFO] Final Memory: 47M/340M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (build-dist-dir) on project infinispan-as-modules: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] /Users/g/Go/test/infinispan.git/as-modules/build.xml:31: The following error occurred while executing this line:
[ERROR] /Users/g/Go/test/infinispan.git/as-modules/lib.xml:20: javax.script.ScriptException: sun.org.mozilla.javascript.internal.EvaluatorException: The choice of Java constructor replace matching JavaScript argument types (function,string) is ambiguous; candidate constructors are:
[ERROR] class java.lang.String replace(java.lang.CharSequence,java.lang.CharSequence)
[ERROR] class java.lang.String replace(char,char) (<Unknown source>#6) in <Unknown source> at line number 6
[ERROR] around Ant part ...<ant antfile="build.xml" inheritRefs="true">... @ 4:47 in /Users/g/Go/test/infinispan.git/as-modules/target/antrun/build-main.xml
```