Chapter 11. “But It Works on My Machine!”
Benjamin Muschko
Have you ever joined a new team or project and had to try to find your way around the infrastructure needed to build the source code on your developer’s machine? You’re not alone, and you may have had questions:
-
What JDK version and distribution are required to compile the code?
-
What if I’m running Linux, but everyone else is on Windows?
-
What IDE do you use, and which version do I need?
-
What version of Maven or other build tool do I need to install to properly run through developer workflows?
I hope the answer you got to these questions wasn’t “Let me have a look at the tools installed on my machine”—every project should have a clearly defined set of tools that are compatible with the technical requirements to compile, test, execute, and package the code. If you’re lucky, these requirements are documented in a playbook or wiki, although as we all know, documentation easily becomes outdated, and keeping the instructions in sync with the latest changes takes concerted effort.
There’s a better way to solve the problem. In the spirit of infrastructure as code, tooling providers came up with the wrapper, a solution that helps with provisioning a standardized version of the build tool runtime without manual intervention. It wraps the instructions required to download and install the runtime. In the Java space, you’ll ...