3 ms·
Maven is great as long as you buy into their philosophy of how builds ought to work - phases and actions happening at a particular phase. If your build has rea
by chii 5y ago
Maven is great as long as you buy into their philosophy of how builds ought to work - phases and actions happening at a particular phase.
If your build has really custom stuff, and you cannot fit your custom work into those phases (e.g., it interferes with some other custom stuff), then you have a maven problem that's hard to solve. One usually resolve this by writing a maven plugin, and that kinda sucks. But hey, at least if you do it, you can contribute this to the whole plugin ecosystem and thus, improve it for somebody else.
- nfrankel 5y ago> If your build has really custom stuff That's the biggest problem. Nearly every developer thinks their build has *really* custom stuff whereas it's wrong in 99% of the cases. Then comes Gradle with its so-much-vaunted flexibility and deliver you exactly what you think you need. And who is going to maintain the clusterfuck of spaghetti code that your build has become?
- lmm 5y agoUsually the solution is to break your project into smaller modules, each of which can follow the normal lifecycle, and express your special-case requirement through module dependencies (e.g. maybe you have an integration test module). IME the benefits of fixed phases outweigh the costs: any developer can pick up any maven project and immediately know how to build it, how to run the tests, and so on. A lot of other build systems are really bad for knowing where to start; allowing arbitrary task names and arbitrary relationships between what runs when just ends up with projects having pointless differences between what they call things - do I need to run "gradle build", "gradle install", or what? (and similarly for sbt etc.)