-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split the shaded jar out of application #6267
Split the shaded jar out of application #6267
Conversation
I build a shaded jar several times per day but I can easily update my scripts. |
What do you use it for - development or deployment? I think we should aim to make the developer experience as fast/good as possible and then automate deployment/CI. |
I use it for local development as that's how I build my instances. All configuration is in this repo and everything is scripted: https://github.com/leonardehrenfried/otp2-setup/ For deployments I use the container images: https://hub.docker.com/r/opentripplanner/opentripplanner/tags?page=1&page_size=&name=&ordering= |
This is the command line that builds the jar and copies it: https://github.com/leonardehrenfried/otp2-setup/blob/main/Makefile#L410-L411 |
So, this is not a problem for you, you change one line are good. I never use the one-jar to run OTP locally, most of the time I use the InteractiveOtpMain. For me the important ting is to run all unit test more or less continuously - as fast as possible. I can also add a profile to turn OFF the shaded-jar. |
Yes, I just have to change one line. I'm curious though: |
There is an error in the |
Another question - Should we prefix each maven module with
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #6267 +/- ##
=============================================
+ Coverage 69.71% 69.76% +0.04%
- Complexity 17696 17749 +53
=============================================
Files 2008 2010 +2
Lines 75834 75948 +114
Branches 7765 7784 +19
=============================================
+ Hits 52866 52983 +117
- Misses 20256 20257 +1
+ Partials 2712 2708 -4 ☔ View full report in Codecov by Sentry. |
To only build The shaded-jar should be bound to the |
After merging this the speed tests started failing: https://github.com/opentripplanner/OpenTripPlanner/actions/runs/12150654267/job/33883827698 |
When I run |
The shaded jar is now located at |
I thought this was somehow backwards compatible. |
Summary
Creating the
otp-2.7.0-SNAPSHOT-shaded.jar
takes a bit of time (12.5s) on my machine. Most developers never uses this, at least during regular development. So, I think this should go into a separate maven module and I will enable developers to skip it using-DskipShadeJar
.Issue
No issue exist.
Unit tests
🟥 This is changing the build configuration only.
Documentation
✅ I added some comments to the Maven
pom.xml
files to explain "non standard" config.Changelog
🟥 Skip
Bumping the serialization version id
🟥 Not needed.