Groovy
Neat Delicious trick – keywords combination
The real beauty of Delicious lies in keywords combinations. I mentioned already that Delicious is my #2 most favorite productivity tool. Within time I developed a set of the most frequently-used keywords in the right column that can be combined with tags in the left column: “hudson” – Mailing list – “ml” “spring” – Issue [...]
Ant FTP task: adding progress indicator and timeout
Ant FTP task provides no option to display how much the download has progressed so far, similarly to wget or curl verbose options. Setting connection timeout isn’t possible either. But I had to implement it one day and here is what I have found out: Ant FTP task uses org.apache.commons.net.ftp.FTPClient Keeping track of download progress [...]
JFrog: To Build or Not to Be
JFrog’s “To Build or Not to Be” seminar was an exceptional one. Usually, there are very few events fully devoted to the subject of builds and build tools. Lucky us we had this one with so many key people of today’s build arena: Hans Dockter: Gradle, @Gradleware, Gradle Inc. Frederic Simon and Yoav Landman: Artifactory, [...]
Groovy 1.7.3: AnnoMojo + GroovyMojo!
I waited a lot. Oh boy, I did. .. Rewind back half a year .. Writing Maven plugins, or MOJOs, is a real need when you work with Maven. It just feels unnatural not to. Default Maven behavior and set of plugins is only good for common situations and the moment you’re doing [...]
Groovy++ goes APL 2.0!
Groovy++ goes APL 2.0! This is obviously great news to Groovy/Groovy++ community.
Multi-level ternary operator
Love one. Can’t be easily debugged, probably .. But reads very nicely: Still, standard mapping is usually better – it allows to dump all known options:
Using Groovy++ with Maven – an update
In his comment to “Using Groovy++ with Maven” Joern Schimmelpfeng has correctly pointed out about transitive dependencies that may be added to groovypp POM, eliminating the need to specify them explicitly. He’s right! That’s what we have Maven dependencies mechanism for. It is now fixed so you can use or Full examples: groovypp-all version groovypp [...]
Using Groovy++ with Maven
Note, an update is available. Groovy++ artifacts are now deployed in Maven repository at: http://groovypp.artifactoryonline.com/groovypp/libs-releases-local/ and http://groovypp.artifactoryonline.com/groovypp/libs-snapshots-local/ So you can compile your Groovy++ sources with Maven. As in Groovy, where you pick up either groovy.jar or groovy-all.jar – you can do the same here: Use groovy + groovypp + asm + antlr + commons-cli: [...]
Hashcode, Adler, CRC collisions in action!
If you want to see String’s hashcode, CRC32 or Adler32 colliding (producing same results for different Strings) – run this Groovy script: Those functions aren’t supposed to generate unique numbers, of course (that’s what we have strong hash functions for). Just thought I’d like to publish some of those collisions ..
Groovy/Maven – Multiline Strings
Groovy multiline Strings are always using “\n” as line terminator and sometimes this may be a problem but a simple replace() solves it: """ <?xml version="1.0" encoding="UTF-8"?> <project xmlns = "http://maven.apache.org/POM/4.0.0" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation = "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" """.replace( "\n", "\r\n" ) I had this issue when ran the above multi-line replacement today (yeah, I’d [...]


