Run git commit id Maven plugin only once#10521
Conversation
How much % it takes now? |
Can we simply update to 5.0? |
Around 1%
I can give it a try, I'll open up a PR in airbase. |
|
Thanks! |
|
@kokosing we can't update git-commit-id to 5.0.0 since it drops support for Java 8 and Airbase still supports it: https://github.com/airlift/airbase#projectbuildtargetjdk |
Does it matter for Trino? The default Java version for all modules except some client-facing ones is 11, and it's the version used to build that actually matters anyway, I think. |
|
No, but there are no other significant changes in the plugin. The change in the major version reflects a refactor/reorg so I don't think we should override the version only in Trino, because then we'd have to remember to make it in sync with Airbase again in the future. |
I ran a profiler and it turns out that this plugin takes up 10% of the wall time when building the whole project.
I'm also setting
offlinetotruewhich is the default in the 5.0 version of this plugin: https://github.com/git-commit-id/git-commit-id-maven-plugin/releases/tag/v5.0.0 - this avoids talking to any remotes during the build, which we should not need.From the docs: