Groovy AntBuilder build script
1
/**
* GOAL: Write a quick-and-dirty DSL in Groovy that emulates Bruce Tate's
* example "acts_as_statemachine" Ruby code at
* http://www-128.ibm.com/developerworks/java/library/j-cb03137/index.html,
* within 20 minutes or less (i.e. steer clear of MOP-magic engineering ;).
*
* For more context, see the Apr'07 "Symbols" thread on the groovy-user mailing
* list.
*/
* GOAL: Write a quick-and-dirty DSL in Groovy that emulates Bruce Tate's
* example "acts_as_statemachine" Ruby code at
* http://www-128.ibm.com/developerworks/java/library/j-cb03137/index.html,
* within 20 minutes or less (i.e. steer clear of MOP-magic engineering ;).
*
* For more context, see the Apr'07 "Symbols" thread on the groovy-user mailing
* list.
*/
7
if you use the same buildfiles on your local codebase and your continuous integration buildserver, the if-attribute for ant's targets comes in handy...
for this ant buildfile snippet to only create+publish javadoc when executed on the buildserver, the buildserver only has to set the referred system property, e.g. on its startup by using a Java D-option "-Dcontinuous.build=true" ...
ant buildtool website
for this ant buildfile snippet to only create+publish javadoc when executed on the buildserver, the buildserver only has to set the referred system property, e.g. on its startup by using a Java D-option "-Dcontinuous.build=true" ...
ant buildtool website
5
SQL-like DSL for finding classes and methods
10
Sudoku solver in Groovy.
6
Using a JGroups ReplicatedHashtable from Groovy
6
Recursively iterate over folders and files to check for differences.
7
Using the SwingX JXMapViewer and using a special tile factory to retrieve Google Maps tiles, from a Groovy SwingBuilder.
2
Try to create a DSL for a finite state machine.
Inspired by Chris vanBuskirk version on this site and the Ruby article at
http://www-128.ibm.com/developerworks/java/library/j-cb03137/index.html
Inspired by Chris vanBuskirk version on this site and the Ruby article at
http://www-128.ibm.com/developerworks/java/library/j-cb03137/index.html
2
A possible implementation of the Sieve of Eratosthenes for generating prime numbers below some limit.
5
Generate prime numbers blow some limit using the Sieve of Eratosthenes algorithm. This snippet uses some object abstractions to simplify the algorithm.









