majialoong opened a new pull request, #7426:
URL: https://github.com/apache/rocketmq-dashboard/pull/7426
### Which Issue(s) This PR Fixes
- Fixes #7425
### Brief Description
In `server/Dockerfile`'s `build` stage, `pom.xml` lives at `/app`
(`${project.basedir}/..` resolves to `/`), causing `mvn package` to run
repo-root plugins against `/` and break Docker builds; meanwhile `--build-arg
LEGAL_GATE=0` was not honored in the `build` stage.
- Skip `apache-rat-plugin` and `maven-assembly-plugin` (`-Drat.skip=true
-Dassembly.skipAssembly=true`) in the `build` stage, matching
`deploy/deploy.sh`.
- Declare `ARG LEGAL_GATE=1` in the `build` stage and pass
`-Dmaven.antrun.skip=true` when `LEGAL_GATE != 1` to stay in sync with the
runtime `check-jar` gate.
- Update `server/scripts/legal_test.py` to verify the `mvn` arguments under
both `LEGAL_GATE=1` and `LEGAL_GATE=0`.
### How Did You Test This Change?
```text
$ python3 -m unittest discover -s server/scripts -p '*_test.py'
Ran 15 tests in 0.084s
OK
```
### Checklist
- [x] One coherent change; unrelated modifications are not bundled in
- [x] Commit subject follows Conventional Commits (`feat:` / `fix:` /
`refactor:` / `chore:` / `docs:` / `perf:`)
- [x] Tests added or updated for non-trivial changes, test methods named
`...Test`
- [ ] New UI text has both Chinese and English entries under `web/src/i18n/`
(N/A)
- [ ] Architecture constraints stay green (`mvn test` runs the ArchUnit
checks) (N/A — no Java changes)
- [x] New source files carry the ASF license header (no new files added)
- [ ] Documentation touched where behaviour changed (README / `docs/` /
in-app help) (N/A)
--
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]