Home » JVM Languages

JVM Languages

Groovy 2.5 CliBuilder Renewal (Part 2)

The CliBuilder class for quickly and concisely building command line applications has been renewed in Apache Groovy 2.5. This is the second of a two-part article series that highlights what is new. In case you missed it, Part 1 is here. This article shows some of the advanced features of the underlying libraries from CliBuilder. A quick recap of part ...

Read More »

Groovy 2.5 CliBuilder Renewal (Part 1)

The CliBuilder class for quickly and concisely building command line applications has been renewed in Apache Groovy 2.5. This two-part article highlights what is new. Part 2 explains how to leverage some of the advanced features of the underlying libraries from CliBuilder. The groovy.util.CliBuilder Class is Deprecated Previous versions of CliBuilder used Apache Commons CLI as the underlying parser library. ...

Read More »

A tale of Emacs, Clojure and pinned packages

It’s like trying to pin down a kangaroo on a trampoline. – Sid Waddel If you do any clojure[script] development, chances are that you do so through Emacs and CIDER. The experience is generally nothing short of awesome, but every now and then you bump into some quirks. That was the case for me when the latest CIDER came out, ...

Read More »

Creating a YARN Application using Scala

I have been recently playing with Apache Amaterasu, which is an amazing project that helps to deploy data pipelines. It’s still incubating and has a super-friendly team of engineers working on it. Some exciting features are lined up. Don’t take my word for it. Please check it out yourself. Amaterasu launches containers (on YARN/Mesos) all by itself for each of ...

Read More »

Scala Syntax: 7 points

A few years back I dipped into some Scala as a hobby language. But, one aspect I found challenging was just getting my head around Scala syntax again. Some of it, yeah the basic stuff can be counter intuitive depending on your perspective. 1. Method / Function Definition Typing on the right rather than the left. Consider this simple function definition: def ...

Read More »

Dockerize your Scala application

Dockerizing a Scala application is pretty easy. The first concern is creating a fat jar. Now we all come from different backgrounds including maven/gradle and different plugins that handle this issue. If you use sbt the way to go is to use the sbt-assembly plugin. To use it we should add it to our project/plugins.sbt file. If the file does ...

Read More »

Kotlin and JUnit 5 @BeforeAll

Introduction In Kotlin, classes do not have static methods. A Java equivalent semantic can be provided to callers using the concept of a companion object though. This post will go into details of what it takes to support a JUnit 5 @BeforeAll and @AfterAll annotation which depend on the precense of a static methods in test classes. BeforeAll and AfterAll in Java Junit ...

Read More »

Testing Kotlin with Spock Part 1 – Object

The object keyword in Kotlin creates singleton in a very convenient way. It can be used for example as a state of an operation. Spock Framework is one of the most expressive and readable test framework available in the Java ecosystem. Let’s see how Kotlin object can be used in the Spock tests. What do we want to test? We ...

Read More »