3 ms·
I disagree. Having complete control just gives you the chance to micromanage build steps and get bogged down in the details. I start with the most minimal POM
by lmm 6y ago
I disagree. Having complete control just gives you the chance to micromanage build steps and get bogged down in the details.
I start with the most minimal POM possible - just listing dependencies - and firmly resist any custom build steps or even custom configuration. That way everything is standard, my build will be cross-platform and IDE-agnostic, and anyone else who picks up the codebase can immediately understand the build and be productive.
If I absolutely need some custom build step, then I'll go all the way to making a proper, first-class maven plugin. I'll write it in proper production-quality Java with unit tests, code coverage and all the rest of it.
IMO customising build steps in a scripting language (whether that's shell, Gradle, or even something like Python) is exactly the middle ground that you want to avoid. You can waste lots of time fiddling with how your build is structured, and it's still going to be less maintainable.