Groovy

  • submit to reddit

Spocklight: Support for Hamcrest Matchers

Spock has support for Hamcrest matchers and adds some extra syntactic sugar. In an expect: block in a Spock specification method we can use the following...

0 replies - 1302 views - 05/18/13 by Hubert Klein Ikkink in Articles

Gradle Goodness: Running a Single Test

We can run test code with Gradle using the test task that is added by the Java plugin. By default all tests found in the project are executed. If we...

0 replies - 2611 views - 05/16/13 by Hubert Klein Ikkink in Articles

Gradle Goodness: Show More Information About Failed Tests

Running tests in Gradle is easy. Normally if one of the tests fails the build fails as well. But we don't see immediately in the command-line output why a...

0 replies - 3303 views - 05/14/13 by Hubert Klein Ikkink in Articles

Browsing the COS Naming Service Namespace with Groovy

There was a time when CORBA was all the rage and was as trendy and popular as any favored technology that has come along since. Although CORBA does not get...

0 replies - 2002 views - 04/22/13 by Dustin Marx in Articles

Grails Goodness: Using Wrapper for Running Grails Commands Without Grails Installation

Since Grails 2.1 we can create a Grails wrapper. The wrapper allows developer to run Grails commands in a project without installing Grails first. The...

0 replies - 92 views - 04/16/13 by Hubert Klein Ikkink in Articles

Mocking Static Methods in Groovy

Using Groovy to test not only other Groovy classes but also Java classes is an increasing popular approach given frameworks like Spock which facilitate...

0 replies - 4597 views - 04/15/13 by Geraint Jones in Articles

Execution of Groovy Scripts from Java - XmlSlurper and MarkupBuilder in Mapping Issues

Problem with mappings In our project we came across a really big problem related to mapping. Having two systems that initially were defined by the BA to...

0 replies - 3628 views - 04/11/13 by Marcin Grzejszczak in Articles

Detecting Java Threads in Deadlock with Groovy and JMX

Unfortunately, Java applications taking advantage of multiple threads can at times run into the dreaded deadlock condition. Fortunately, the Java Platform...

0 replies - 3125 views - 04/02/13 by Dustin Marx in Articles

Monitoring Key JVM Characteristics with Groovy, JMX, and RuntimeMXBean

Since J2SE 5, Platform MBeans have been available that allow some key characteristics regarding the JVM to be monitored and (even managed in some cases) via...

0 replies - 1081 views - 03/26/13 by Dustin Marx in Articles

Grails Goodness: Set Property Values of Spring Beans in resources.groovy

We can configure Spring beans using several methods in Grails. We can for example add them to grails-app/conf/spring/resources.xml using Spring's XML syntax....

0 replies - 3976 views - 03/25/13 by Hubert Klein Ikkink in Articles

Upgrading Grails from 2.0 to 2.2

In preparation for my Grails vs. Play Smackdown at Devoxx France next week, I recently upgraded my Grails version of Happy Trails from Grails 2.0.3 to Grails...

0 replies - 1298 views - 03/25/13 by Matt Raible in Articles

Grails Goodness: Use Constructor Argument Based Dependency Injection with resources.groovy

We can define extra Spring beans for our Grails application in grails-app/conf/spring/resources.groovy using a DSL. For example we want to use third-party...

0 replies - 2574 views - 03/18/13 by Hubert Klein Ikkink in Articles

Grails Goodness: Using Spring Bean Aliases

Grails uses dependency injection by convention. This means if we have a property messageService then a Spring bean or Grails service with the name...

0 replies - 1093 views - 03/14/13 by Hubert Klein Ikkink in Articles

Grails Goodness: Conditionally Load Bean Definitions from resources.groovy

We can define new bean definitions in several ways with Grails. One of them is via the grails-app/conf/spring/resources.groovy file. This file is parsed and...

0 replies - 2847 views - 03/12/13 by Hubert Klein Ikkink in Articles

JSON, POJOs and Groovy's HTTPBuilder class

Whilst previous posts have looked at the use of RESTClient, this post will concentrate on its parent class, HTTPBuilder and also touch briefly on the...

0 replies - 1103 views - 03/12/13 by Geraint Jones in Articles