will-sh opened a new pull request, #10348: URL: https://github.com/apache/ozone/pull/10348
## What changes were proposed in this pull request? HDDS-15185. Create submodule ozone-cli-interactive This change introduces a dedicated Maven module `ozone-cli-interactive` for the top-level `ozone interactive` command and refactors how subcommands are wired into the interactive shell. Please describe your PR in detail: [HDDS-11838](https://issues.apache.org/jira/browse/HDDS-11838) / [#10134](https://github.com/apache/ozone/pull/10134) added `OzoneInteractiveShell` under `ozone-cli-shell`. Subcommands in the same module (`sh`, `tenant`, `s3`) were registered statically, while `admin`, `debug`, and `repair` were loaded at runtime via reflection (`Class.forName`). The `ozone` launcher script also stitched additional CLI classpaths at runtime for the `interactive` subcommand. That approach works but is fragile and harder to maintain. This PR addresses the follow-up described in [HDDS-15185](https://issues.apache.org/jira/browse/HDDS-15185) (parent: [HDDS-11825](https://issues.apache.org/jira/browse/HDDS-11825)): * **New module `ozone-cli-interactive`** — `OzoneInteractiveShell` is moved from `ozone-cli-shell` into this module. * **Static Maven dependencies** — the interactive module depends on `ozone-cli-shell`, `ozone-cli-admin`, and `ozone-cli-debug` (per Jira: **except repair**). Subcommands are registered with regular method calls (`new OzoneAdmin().getCmd()`, etc.); reflection and `addDynamicSubcommand()` are removed. * **Dist and launcher** — `ozone-dist` depends on `ozone-cli-interactive`; the `interactive` branch in `hadoop-ozone/dist/src/shell/ozone/ozone` sets `OZONE_RUN_ARTIFACT_NAME=ozone-cli-interactive` and drops the loop that dynamically appended admin/debug/repair/tools classpaths. * **License metadata** — `jar-report.txt` is updated for `ozone-cli-interactive.jar` in the distribution. The interactive user experience (`ozone>` prompt, JLine/Picocli REPL in `REPL.java`) is unchanged; only packaging and command registration are improved. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-15185 ## How was this patch tested? * CI workflow runs on the contributor fork (`will-sh/ozone`, branch `HDDS-15185`) is successful. * Manual smoke test: build dist, start docker compose cluster, run `ozone interactive` and exercise `sh`, `admin`, and `debug` subcommands; confirm `repair` is not exposed as a top-level interactive subcommand per Jira scope. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
