Maven features I wish Gradle had: inlined plugins

Since the early days of Maven the development team recognized that they couldn’t (and shouldn’t) provide a solution for every problem we as consumers may face with our builds. In order to cater for our every whim and emerging requirements the Maven build tool added a pluggable mechanism to provide behavior as needed, and thus Maven plugins were born. Maven plugins are typically configured inside a <build> block found in the pom.xml file, which lets them contribute goals that may bind to lifecycle phases by default, or just providing goals that you can invoke at any time. But what if Read More


Gum 0.8.0 is out!

Whoa, 2 Gum releases in the same month? I’m having so much fun working with and on Gum that I just couldn’t resist posting another release. Last time I mentioned that Gum is capable of launching JBang with explicit and implicit targets; in the case of implicit a strict file order was to be followed: .java, .jsh, and .jar. Well no more, Gum 0.8.0 let’s you configure the resolution order as you deem necessary. The configuration may be per directory (project) or global. Which brings me to the second major feature added to this release, how do you know which Read More


Maven features I wish Gradle had: override task properties

It’s no secret that one of the most common properties ever set on a Maven build is -DskipTests which as the name implies, instructs Maven to skip running tests. As a matter of fact that property is read by the maven-surefire-plugin to figure out if it should run tests or not. As it turns out there’s a separate property named skip that instructs Maven to skip compiling and running tests. If you’re curious and peek at the documentation you may notice that the field/property names for skipTest match but for skip you’ll find a property named maven.test.skip. As it happens, Read More


Maven features I wish Gradle had: summary reports

For quite some time now, Maven users have grown accustomed to seeing a summary report when a build is run. The report appears at two locations: at the beginning of the build where Maven shows the projects that participate in the current session (or Reactor if you prefer) which gives you a clue of how many projects, their packaging selection (jar, pom, etc), and perhaps more importantly, in which order they will be processed. The second location is at the end of the build where each project display its status (SUCCESS, FAILURE, SKIPPED) plus the time it took to execute Read More


Gum 0.7.2 delivers more bang for your buck

A bang, like in JBang! That’s right, JBang is the new kid on the block in the Java command line tool space. Initially taking advantage of JEP-330 that enhances the Java launcher to support single source files, JBang builds on top of that idea and adds dependency resolution, JShell integration, launch executable JARs, launch scripts from trusted URLs, and a few other goodies. In other words, JBang is not constrained by JEP-330 (which requires Java 11) as it also let’s you run scripts with Java 8. Taking a hint from Gradle and Maven, JBang also adds a wrapper to help Read More


Gum 0.4.0 latest tricks

Gum 0.4.0 is out and it comes with a few goodies! If you’re like me you may see yourself switching between Maven and Gradle projects, a lot. This constant switching makes it very likely that I’ll mess up the command invocation and send Maven goals to a Gradle project, or send Gradle tasks to a Maven project. This results in a wasted JVM iteration as the command fails. But what if there was a way to make it work given certain mappings? What if Maven’s compile goal could be translated into Gradle’s classes or viceversa? What if these mappings were Read More


Declarative Gradle builds, is it possible?

I’ve been thinking about 100% declarative Gradle builds for quite some time now. As of June 2020 Gradle offers not one but two different DSLs based on programming languages (Groovy and Kotlin) for defining the steps that the build should take to do its thing. For years developers were used to adding whatever code was “necessary” to make the build turn its gears, regardless of the consequences. In recent times the push has been to move those pieces of code into plugins, simplifying the build files themselves, and also promising less actual code in the build files. Yet, one can 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


ˆ Back To Top