groovy -e ‘def printout = { it.consumeProcessOutput(System.out, System.err); it.waitFor() }; new File(/./).eachDirMatch ({ new File(it, /pom.xml/).exists() }) { printout(“mvn -f $it/pom.xml clean”.execute()) }’
Which can be simplified from Groovy 1.5 to Groovy 1.6.5 speak:
groovy -e ‘new File(/./).eachDirMatch ({ new File(it, /pom.xml/).exists() }) {“mvn -f $it/pom.xml clean”.execute(). waitForProcessOutput(System.out,System.err)}’
which only fits in a tweet if you don’t care for errors when a directory isn’t a maven project:
groovy -e ‘new File(/./).eachDir {“mvn -f $it/pom.xml clean”.execute(). waitForProcessOutput(System.out,System.err)}’
For those of you looking puzzled, it’s a Groovy way to clean a bunch of Maven project subfolders you plan to add into Subversion. It’ll work for ant too just by changing “mvn” to “ant” and changing “pom.xml” to “build.xml” in case you have a bunch of Ant projects that need to be added into svn.

What y’all think about me…