majialoong opened a new issue, #7425: URL: https://github.com/apache/rocketmq-dashboard/issues/7425
### Before Creating the Bug Report - [x] I have searched the [open issues](https://github.com/apache/rocketmq-dashboard/issues) of this repository and believe that this is not a duplicate. - [x] This is a defect in RocketMQ Studio, not a usage question and not a defect in another Apache RocketMQ repository. - [x] I can reproduce this on the current `master` branch, or I have stated the exact version I am running below. ### Studio Version branch: master ### Runtime Environment OS: macOS ### Connected RocketMQ Cluster N/A (build-time failure before startup) ### Build Toolchain Docker: 28.4.0 ### Describe the Bug In `server/Dockerfile`'s `build` stage, `pom.xml` is at `/app`, so `${project.basedir}/..` resolves to `/`: 1. `RUN mvn package -DskipTests` does not skip repo-root plugins (`apache-rat-plugin`, `maven-assembly-plugin`), causing `docker build` / `docker compose build` to fail as RAT scans `/` and assembly tries to archive the container root filesystem. 2. `--build-arg LEGAL_GATE=0` is not honored in the `build` stage, so opting out of the license gate for non-release Docker builds does not work on the default `runtime` target. ### Steps to Reproduce 1. Run `docker build -f server/Dockerfile .` (or `docker compose -f deploy/docker-compose.yml build rocketmq-server`) and observe `mvn package -DskipTests` in the `build` stage running `apache-rat-plugin` / `maven-assembly-plugin` against `/`. 2. Run `docker build --build-arg LEGAL_GATE=0 -f server/Dockerfile .` and observe that the `build` stage still runs Maven's `binary-license-gate` instead of honoring `LEGAL_GATE=0`. ### What Did You Expect to See? 1. The `build` stage skips `rat` and `source-release` assembly (`-Drat.skip=true -Dassembly.skipAssembly=true`, matching `deploy/deploy.sh`) and builds the fat JAR cleanly. 2. Passing `--build-arg LEGAL_GATE=0` also skips Maven's `binary-license-gate` (`-Dmaven.antrun.skip=true`), staying in sync with the runtime `check-jar` step. ### What Did You See Instead? 1. The Docker build fails in the `build` stage because `apache-rat-plugin` and `maven-assembly-plugin` run against `/`. 2. `--build-arg LEGAL_GATE=0` has no effect in the `build` stage and still executes Maven's `binary-license-gate`. ### Additional Context _No response_ ### Are You Willing to Submit a Pull Request? - [x] Yes, I am willing to submit a pull request. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
