chore!: Using the conventional app script generated by gradle instead…#482
chore!: Using the conventional app script generated by gradle instead…#482
Conversation
… of the raw java + jar command
There was a problem hiding this comment.
Pull request overview
This PR refactors the Docker build and runtime configuration to use Gradle's conventional application distribution scripts instead of manually constructing java -jar commands. This aligns with Gradle best practices by leveraging the application plugin's generated startup scripts which properly handle classpath configuration and environment variables.
Key changes:
- Switched from copying only JAR libraries to copying the complete Gradle distribution directory
- Updated Dockerfile to use the generated
bin/appentrypoint script - Refactored docker-compose to use JAVA_OPTS environment variable for JVM configuration
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| app/Dockerfile | Added ENTRYPOINT using Gradle-generated script at /opt/consensys/maru/bin/app and updated COPY to include full app distribution |
| docker/compose.dev.yaml | Migrated Java options to JAVA_OPTS environment variable and simplified command to pass only application arguments; updated comment to reflect correct make target |
| Makefile | Changed build-context from libs= to app= to copy entire Gradle distribution directory |
| chaos-testing/helm.mk | Changed build-context from libs= to app= to copy entire Gradle distribution directory |
| .github/workflows/maru-build-and-publish.yml | Updated both build and publish steps to use app= build-context for full distribution |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #482 +/- ##
============================================
- Coverage 83.84% 83.74% -0.10%
+ Complexity 1140 1139 -1
============================================
Files 229 229
Lines 8128 8128
Branches 639 639
============================================
- Hits 6815 6807 -8
- Misses 984 991 +7
- Partials 329 330 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
| # '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005' | ||
| # '-Dvertx.configurationFile=/opt/consensys/maru/configs/vertx-options.json', | ||
| JAVA_OPTS: '-Dlog4j2.configurationFile=configs/log4j.xml' | ||
| command: [ '--maru-genesis-file', 'configs/genesis.json', |
There was a problem hiding this comment.
Just a reminder, we'd need to update this to the maru container in linea-monorepo local stack
There was a problem hiding this comment.
Yes. Everywhere really
… of the raw java + jar command
Note
Replaces java -jar with the Gradle-generated app launcher across Dockerfile, Helm, and Compose, and updates CI/Makefiles to use the app installDist as the Docker build context with JAVA_OPTS support.
build-context appand setENTRYPOINTto/opt/consensys/maru/bin/app.JAVA_OPTSenv and simplifycommandargs.app=./app/build/install/app/for test and push jobs.helm.mk: update local image builds to use--build-context app=./app/build/install/app/./opt/consensys/maru/bin/appwith existing CLI args.envwithJAVA_OPTSfor Log4j config.Written by Cursor Bugbot for commit 1f4b0ab. This will update automatically on new commits. Configure here.