Language : groovy

Title User Language Tags Description Date
Groovy IsIpAddressLocal laurenceosx Groovy

See: // http://stackoverflow.com/questions/2406341/how-to-check-if-an-ip-address-is-the-local-host-on-a-multi-homed-system

Thursday
Groovy ActiveMQ 5.8 Embedded Broker laurenceosx Groovy

ActiveMQ 5.8 Groovy Embeded Broker Example - Laurence Toenjes - 5/14/2013 This example overcomes some limitations of the basic ActiveMQ embedded brokers examples I found online

Some of the challenges were:
    # Multiple instances on same machine and be able to use JMX.
    # Running on a machine with less than 50G or 100G disk space 
      caused combinations of ActiveMQ errors or warnings.
    # Groovy Grapes/Grab syntax to use that would work on pc and mac.

The broker in this example uses a nonpersistent store and 
is multicast discoverable and should allow you to run multiple instances 
of it (in separate processes of course) which is the reason for all the 
code snips containing random port nums and random thread sleeps 
to increase the odds of success of each new embedded broker process 
to get a working set of port nums.
Wednesday
install_camel-jgroups_2.11-SNAPSHOT laurenceosx Groovy

// file: installcamel-jgroups2.11-SNAPSHOT.groovy // url: http://faroe228.googlecode.com/svn/trunk/SvnAndMvnInstallForcamel-jgroups2.11-SNAPSHOT/InstallScript/installcamel-jgroups2.11-SNAPSHOT.groovy

May 13
Groovy - Get BeanInfo Props for name, type and value laurenceosx Groovy

Get obj props using java.beans.Introspector.getBeanInfo()

April 25
Groovy - KillCvs.groovy - Recursive Kill of Cvs Turd Files and Folders laurenceosx Groovy

Drop this in your project dir and run it. This will recursively kill CVS files and folders.

April 12
Groovy - file to md5 using Groovy and AntBuilder laurenceosx Groovy

Groovy file to md5 using Groovy and AntBuilder

April 10
Groovy - threadedPrintStringBuffer laurenceosx Groovy

/* Example use: def pb = new ProcessBuilder( 'cmd', '/c', 'dir' ); def process = pb.start(); def sb1 = new StringBuffer(); process.waitForProcessOutput( sb1, sb1 ); def stop = threadedPrintStringBuffer( sb1 ); process.waitFor(); stop = true; */

April 5
Groovy - EDT Inspect and Kill All InspectionWindows laurenceosx Groovy

see http://groovy.codehaus.org/gapi/groovy/inspect/swingui/ObjectBrowser.html

April 2
Groovy Gradle - Do SVN Commands without having SVN installed. laurenceosx Groovy

Sample SVN call from gradle: doSvnMain( 'your', 'svn', 'args', 'go', 'here' );

April 1
Groovy Spring Refreshable Script Bean - findScriptResourcePath laurenceosx Groovy

Created this to generate file:/ script path for Groovy Refreshable Spring Beans for use in applicationContext.groovy because refresh feature wouldn't work when Groovy script is looked up on classpath.

March 29
Groovy Gradle - isOsWindows laurenceosx Groovy

When this snippet is added to a class it provides the boolean property: osWindows

March 28
Groovy - stopJetty laurenceosx Groovy

See: http://grepcode.com/file/repo1.maven.org/maven2/org.eclipse.jetty/jetty-start/7.1.1.v20100517/org/eclipse/jetty/start/Main.java#Main.stop%28int%2Cjava.lang.String%29

March 26
Jar with dependencies task for build.gradle alces Groovy

Custom task using gradle java plugin for build runnable jar file with full dependencies set

March 12
Groovy - Freemind - getModeController() laurenceosx Groovy

Groovy - Freemind - getModeController()

March 10
Print maven version for all Hudson jobs alces Groovy

Ant or JDK versions printing makes via the same way. Use 'antName' or 'jdk' instead 'mavenName' string.

March 6