Why do the Gradle/Maven wrappers matter?

Indeed, why do these tool exist and why should I use them? After all installing Gradle or Maven is a simple task. Just download a ZIP file, configure an environment variable and voilĂ ! Or use a package manager such as SdkMan! Well to understand these questions we must travel back in time, to a moment when Gradle was just getting started and Maven 3 was just a few months of being released. Gradle’s inception happened sometime in late 2007. In comparison Maven was at 2.0.7 or 2.0.8 (see history of Maven release notes). Everyone knew Maven at that time but Read More


Jumping into Go

I finally did it. I jumped into Go and I like it. Many years ago (7 or so?) a dear friend of mine told me about Go and that I should give it a try. He did warn me that the language felt like Java of the olden days, back when Java was 1.0, but despite this Go was a pretty good language. I did give Go a try a few times in the past, even presented a couple of times (at work and abroad) about the similarities and differences between Java and Go from a Java developer’s POV, yet Read More


Gum: the Gradle/Maven wrapper

I’m happy to announce the immediate availability of Gum, a Gradle/Maven wrapper written in Go. Gum is inspired on the popular gdub script by Doug Borg, which was ported to Go by Sten Roger Sandvik some time ago. The main difference from Sten’s version is that Gum also supports the Maven wrapper, coming up as part of Maven core 3.7! The basic idea behind Gum is to prefer the tool wrapper over the plain tool, if the wrapper is configured. It also allows you invoke the build tool from any place withing the project’s codebase. There are a few additions Read More


Publishing artifacts to Maven Central with Bintray & Gradle

Recently I joined a conversation on Twitter where the OP complained to spending hours to get a brand new computer setup to publish artifacts to Maven Central. The issue stemmed from having PGP signature files moved from one location to another. There are other issues that may arise when uploading artifacts to Maven Central, specially when doing it for the first time. The rules for publishing artifacts are stated here. A common mistake is to omit one of the required POM elements, which will likely trigger a series of back-and-forth revisions until you get it right. This can be frustrating Read More


Does Gradle need build profile support?

The need for customizing a build based on a particular environment is a prevalent one. Maven offers an option called build profiles which lets you customize certain aspects of the build but not all. However on the Gradle side of things, there’s no such feature found in core, with the argument being that contrasted to what Maven offers as means for defining build files (a limited XML based DSL), Gradle offers not one but two DSLs based on full programming languages. This allows developers use the same control flows they’re used to in production and test code but on build Read More


Announcing the PomChecker project

I’m happy to announce the immediate availability of the PomChecker suite! What is it you ask? It’s a small set of utilities to verify that a POM or BOM file complies with the minimum requirements for being uploaded to Maven Central. I wish an utility like this existed years ago when I started publishing artifacts to Maven Central. It took me a few tries in the beginning to get the POM files just right. Recently I’ve seen other developers struggling with these rules as well. Hopefully these utilities can help them and others get on the road much faster. There Read More


Detecting duplicate dependencies in Maven

In late March 2020 I ran a quiz on Maven Dependency Resolution which turned out to be an eye opener for some people (including myself!). You can read the whole questionnaire, results, and analysis here. One of the surprising results was found in the very first question, a rather innocuous one but it resulted in a major stumbling block for 2/3 of respondents! Here’s the question What’s surprising is that only 36% people chose the correct answer and a similar percentage chose the “Build error” option because clearly duplicate dependencies ought to cause a build error, right? Wrong! Maven does Read More


Announcing the Gradle Enforcer Plugin

Inspired by the popular Maven Enforcer plugin I’m happy to announce that its Gradle counterpart has been released, say hello to the enforcer-gradle-plugin! The behavior provided by Gradle Enforcer plugin is very similar to what the Maven Enforcer plugin provides, in the sense that rules will be executed during a particular phase of the build; any rule violations result in a build failure. Rules are typically setup to check for preconditions and requirements. The Maven Enforcer plugin provides a set of core rules and extra rules. In turn, the Gradle Enforcer plugin provides a similar set plus a few rules Read More


Maven Dependencies Pop Quiz – Results

A couple of weeks ago I posted a link to a pop quiz regarding dependency resolution in Apache Maven. 509 brave souls took the challenge; now is the time to share the results. The quiz is comprised of 14 questions split between 3 sections based on context: A single project A project with a parent POM A project with a BOM Each question revolves around figuring out what would be the selected version of a particular dependency, in this case Guava, because as many developers know, whenever there’s a classpath issue Guava is always to blame (What?!) To be fair, Read More


Configuring the OCI Gradle Build Cache plugin with GitHub Actions

Following up on the previous post that explains how to setup the OCI Gradle Build Cache plugin on Travis-CI today I’d like to show how to do the same with GitHub Actions. The steps to follow are quite similar; if you do not already have an OCI account and/or a configured compartment then please follow steps 1, 2, and 3 as explained in this post, then proceed with the next steps Step 4: Apply the plugin to your project Paste the following into your settings.gradle file Notice that the location of the config file is local to the project. There’s Read More


ˆ Back To Top