Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
Here's an example:
path = [ "C:/dev", "C:/java" ]
ant = new AntBuilder();
ant.echo(path);
ant.javac(srcdir:"src",
destdir:"classes") {
classpath {
for (p in path)
}
}
What I'm trying to do is create a generic build script where I'm passing variables in from Java code, but executing the code gives me a error saying that the method 'classpath' does not exist (which isn't true, the actual error is that the property 'path' doesn't exist).
As a workaround, I subclassed AntBuilder and override getProperty() to return values from the script object. This solution doesn't seem to work in the current CVS version.
Attachments
Issue Links
- is duplicated by
-
GROOVY-214 nested closures seem to have a problem with variable passing
- Closed