Convention over Configuration - Maven
After understanding what the purpose of an automatic built is, another great concept is Convention over Configuration (CoC).

A long time ago, I started trying to automate the build using ANT. It’s a great tool that helps you on many repetitive tasks. I used it for a while. But if you aren’t a lone developer, you might have problems with ANT target names.

Let me explain. ANT enables you to create targets to execute specific kind of tasks. So, I want to configure the cleanup of all generated files from my build. I write a target using the name cleanup that execute this task. Good. But one of my teammates thinks different. He prefers the name clean. Another likes the name cleanall.

Look how it can be confusing to configure a simple task? And it’s only the cleanup part. It can happen with build, packaging, and others software life cycle parts. Every new ANT project you start to maintain will demand learning what each task does due to this diversity of configuration.

A common configuration would help you to avoid all these software management problems. Maven has a well-defined structure. A workflow that is generally supported in all projects.

Once you understand the concept, you can apply to any kind of Maven project. A clean command will always define the cleanup, the same way as build, package, and test, regardless of the project.

We know that in the software industry we always have exceptions, unique scenarios. For these unconventional cases, Maven provides plugins extensions. They handle specific problems that some projects have, not all. And it generates a community of plugins that solve similar problems. All applied to any project, in a conventional way.

Comment below what kind of problems you already had on your project due to these configurations. And if you are still having any, let’s try to solve it. Will be great to help you on your journey.

Let’s automate!


Leave a Reply

Your email address will not be published.