Issue Details (XML | Word | Printable)

Key: GROOVY-1066
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Paul King
Reporter: John Lewis
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
groovy

Task.execute() not called when expected within a sequential closure

Created: 16/Sep/05 02:06 PM   Updated: 22/Nov/07 05:25 AM
Component/s: Ant integration
Affects Version/s: 1.0-JSR-3
Fix Version/s: 1.1-rc-2

Time Tracking:
Not Specified

Environment: All


 Description  « Hide
If using the AntBuilder and the sequential task, the Task.execute() does
not seem to be called when expected.

For instance in the example below, the mkdir.execute() is not called
before the fileset is processed in the junitreport task. So, you get
an error message saying the fileset dir is not there. But, if the mkdir
was created when expected, it would be there.

This did work as expected in earlier versions of Groovy (sometime before jsr-03).
I tested it with a cvs snapshot I had done yesterday, and this behavior is in it.

class ATest extends GroovyTestCase {
 
	def reportXmlDir = "/temp/reports/xml"
	def reportHtmlDir = new File("/temp/reports/html")
 
	void testSomething() {
		def ant = new AntBuilder()
 
		//uncomment the following two lines to fix it
		//ant.mkdir(dir:reportXmlDir)
		//ant.mkdir(dir:reportHtmlDir)
 
		ant.sequential() {
 
			//these mkdirs are NOT done before the next fileset is processed!
			//It seems the mkdir.execute method should be called before the
			//fileset is processed
			mkdir(dir:reportXmlDir)
			mkdir(dir:reportHtmlDir)
 
			//junit task snipped (same error occurs with or without it)
 
			//Merge xml files and create report
			junitreport(toDir:"${reportHtmlDir}") {
				fileset(dir:"${reportXmlDir}") {
					include(name:"TEST-*.xml")
				}
				report(format:"frames", todir:"${reportHtmlDir}")
			}
		}
	}
}


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Paul King added a comment - 19/Oct/07 10:19 PM
Added wiki code tags to the issue description

Paul King added a comment - 20/Oct/07 12:38 AM
I would like to close this issue. I have just tried this with the latest version of Groovy and it seems to work fine.

Paul King added a comment - 31/Oct/07 03:39 AM
No further feedback, assuming fixed.