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 configurable so that you can define as many as needed? Well that's precisely what Gum 0.4.0 lets you do with a brand new configuration facility based on TOML.
A configuration file named
.gm.toml may be placed at the root of your project structure; this lets you define per project configuration. You may also define a global configuration file, for Linux/OSX this file must be placed in
$HOME/.gm.toml while on Windows it goes in
%APPDATA%\Gum\gm.toml. Project configuration has precedence over global configuration. Here's an example of the configuration file
In this case the
gradle.mappings table specifies 2 mappings from Maven goal to Gradle task. Notice that you can map a goal prefixed with it's owning plugin, such as it's the case with the
java goal of the
exec maven plugin. The
maven.mappings table performs translation in the opposite direction, from Gradle task to Maven goal, you may also map to goals prefixed by plugins. Given that default settings are in place one can invoke
gm verify on either a Gradle or Maven project and get a full build. Or maybe you'd like to invoke
gm build instead, in which case you also get a full build on either project as the following recording shows
Another improvement is that Gum will show additional information when querying for its version, such as the time it was built and the commit hash
I'm quite happy with how Gum has turned out, I'm also enjoying the Go programming language. If you give Gum a try and you find that's something is amiss or it's not working properly do let me know by posting a ticket in the issue tracker. Feedback is always welcome.
Keep on coding!
Image by phillmarley from Pixabay