We do something similar but for creating the classpath entry. That is I think we default to ~/.m2 and not the symlink unless some env variable is present (I'll have to look later).
However if you are saying have Maven execute that is surprisingly annoying and slow as Maven start up is slow. Even with mvnd however I will do that at times as well (the execute plugin).
If speed of building the uber jar is your concern,
Do know (which I assume you do) that uber jars because of Maven Shade stripping manifest and module-info behave differently unless you do something similar to Spring Boot where you package the jars inside another jar. That is kind of the other reason we stopped doing uber jars. Also the shade plugin requires forking to work correctly (I'll find bug link later).
View all comments
Show parent comment
6
u/repeating_bears Jan 02 '25
If speed of building the uber jar is your concern, you can just put it behind a maven profile and only run it on CI