Statistics
| Revision:

root / tmp / org.txm.core / src / groovy / org / txm / ant / Build3.groovy @ 187

History | View | Annotate | Download (648 Bytes)

1
package org.txm.ant;
2

    
3
import java.io.IOException;
4

    
5
import groovy.lang.Binding;
6
import groovy.util.GroovyScriptEngine;
7
import groovy.util.ResourceException;
8
import groovy.util.ScriptException;
9

    
10
                String userdir = System.getProperty("user.home");
11
                String[] roots = [ userdir+"/TXM/scripts", userdir+"/TXM/scripts/test"];
12
                GroovyScriptEngine gse = new GroovyScriptEngine(roots, this.getClass().getClassLoader());
13
                //gse.loadScriptByName("test/B.groovy");
14
                //System.out.println("B: " +gse.getResourceConnection("test/B.groovy"));
15
                Binding binding = new Binding();
16
                binding.setVariable("input", "world");
17
                gse.run("test/A.groovy", binding);
18
                
19