Hi Paul, Thanks for sharing this!
Wouldn't it be more useful, though, if you tried to implement this as a feature of Maven itself? I'm not known to be the biggest fan of Gradle, but Gradle does know what needs to be rebuilt upon a change and will build incrementally. I'm really impressed how the Gradle folks are contributing fixes to Maven that will make a huge impact when calculating the build order for large projects (and so on)! Despite all the great ideas that they have, I'm still more of a fan of how Maven does things. However, I think that it's about time Maven becomes more sophisticated in regards to incremental builds and figuring out what sets of tests are required to be executed, when a certain change has been made. Scripting things outside of Maven and using them externally, is perhaps an option, but it's not following Maven's own philosophy of being "portable". The books on Maven have all been preaching this for quite a long time and moving away from this principle will, in my opinion, have an adverse effect. Is it not perhaps time that these issues and ideas get collected and an action plan gets drafted on how to implement them as built-in features? Kind regards, Martin On Tue, Oct 22, 2019 at 3:53 PM Nathan Fisher <nfis...@junctionbox.ca> wrote: > Hi Paul, > > Looks great! Thanks for sharing. > > I've been wondering how difficult it is to make Maven behave more like > Buck/Bazel (e.g. better build caching, employ a DAG, remote > execution/caching, etc). There's obviously a whole lot of gaps in the > current Maven process that would need to be closed (e.g. banning circular > deps) but would be nice if the rich ecosystem of tooling around maven could > still be employed insitui. > > I've heard the folks at Gradle have contributed an early contribution to > remote caches but haven't had the opportunity to dig into it much. > > To be honest though my initial wanderings into Maven's dependency graph > resolution left me wanting. There appears to be a few different > implementations in the Maven Github org to build the graph. Even in maven > itself there appears to be the M2 fallback and the newer M3 approach which > change based on context. Some others seem to be experiments but are unused > in Maven itself, it's all a little messy coming from the outside. > > From the mailing list sounds like it's a small band of developers that are > seriously understaffed with a large tract of land to cover. > > Cheers, > Nathan > > On Mon, Oct 21, 2019 at 1:50 PM Jason Young <jason.yo...@procentive.com> > wrote: > > > This is definitely a helpful thing to be able to do. I wish Maven would > > make some effort to keep up with what jobs it's already done and doesn't > > need to repeat vs. what it has left to do. This is a fundamentally > > automatable job that is very difficult for people to do correctly, so > > everyone just `mvn clean install` on the root project every time, or > avoids > > using Maven from the command line altogether. > > > > Similar tool: https://github.com/vackosar/gitflow-incremental-builder - > > works well overall for my team's workflow, thought I don't think devs > have > > played with it; it's only used in CI for certain jobs right now. > > > > Note that some plugins at some versions don't work correctly if you skip > > some projects, e.g. we mitigate > > https://issues.apache.org/jira/browse/MENFORCER-306 by ensuring the root > > pom is in the build and disable maven-enforcer-plugin by default on dev > > machines; another way to avoid the problem is to use any previous version > > of enforcer (we need the latest because of > > https://issues.apache.org/jira/browse/MENFORCER-268). > > > > (Replying here as I'm not a Reddit user - sorry!) > > > > On Sun, Oct 20, 2019 at 11:44 AM Paul Hammant <p...@hammant.org> wrote: > > > > > > > > https://www.reddit.com/r/Maven/comments/dklz1e/quicker_local_maven_builds/ > > > > > > ^ A small script to help you have quicker Maven invocations for changes > > in > > > your (Git) checkout on your dev workstation. > > > > > > Also, a reminder that there is a sub-reddit for Maven now - > > > https://www.reddit.com/r/Maven/ > > > > > > - Paul > > > > > > > > -- > Nathan Fisher > w: http://junctionbox.ca/ >