News for hackers. Stuff that matters.
Re:Faster Maven Builds by bpodgursky on Monday October 04, 2021 @02:35AM (#28743736)
You are coming from a good place but... please god no, not another build system.

They are complicated because they do a fuckton of things. Please don't give me another proof-of-concept build system which then turns out to do 5% of what I needa and have no plugins available.

Gradle is fine, just use it. It's not the best. It's OK. If you hate it, use Maven. It's also OK. Just copy-paste some answers off stackoverflow and move on... we'll all be better off.

Re:Faster Maven Builds by iamcreasy on Monday October 04, 2021 @03:48AM (#28744180)
I sometimes contribute to a jMonkeyEngine, it is an open source game engine written in Java. This was my workflow in the past: fork > clone > added engine feature > deploy locally > added local deployment to my game's Gradle build file to test the newly added feature.

I recently found out that I can just use Github cli to clone from upstream, and add one line in my game's Gradle build file to tell Gradle to use the cloned folder instead of looking at local cache. In Gradle world it is known as Composite build and, it has really make me like Gradle despite their convoluted build files.

Re:Faster Maven Builds by chii on Monday October 04, 2021 @03:50AM (#28744190)
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.

Re:Faster Maven Builds by lmm on Monday October 04, 2021 @04:43AM (#28744484)
Usually 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.)

Re:Faster Maven Builds by nfrankel on Monday October 04, 2021 @08:47AM (#28745959)
> 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?