tags:

views:

208

answers:

1
+1  Q: 

groovy ant task

Hi,

I'm using the groovy ant task to compile my groovy files, but it seems like groovy locks the jar file so it can't be moved, deleted, signed, etc. Has anyone run into this bug before and have a workaround? Seems weird that if I run the groovy ant task and compile to a jar file that groovy doesn't release that jar file.

thanks,

Jeff

+1  A: 

Does the file get released once the ant build is complete? If this is the case try setting fork="true" on the groovy task so that another JVM is created, rather than Groovy sharing Ant's JVM. This means once Groovy is complete the forked JVM will be disposed and the lock should be freed.

If the lock persists after the Ant build completes, could you provide a bit more detail on what you're doing with Groovy?

Rich Seller
While the fork didn't fix it, it did get me looking around and I realized I had another error in my classpath causing this problem. Wasn't a groovy issue at all. Thanks for the response.
Jeff Storey
glad to not have helped too much. What was the issue? might be worth posting it for others
Rich Seller
It's confusing but basically one ant task created a jar in a directory and then another ant task tried to rename that jar but that second and task actually had the jar in its classpath, which made it "in use" and it could not be renamed.
Jeff Storey