Well, I have done relevant understanding, JCommander seems to be a good choice.
Best wishes! Calvin Kirs On 12/20/2021 10:26,leo65535<[email protected]> wrote: hi Kirs, Gary jcommander and scopt is for comand line parsing, they are not relevant. jcommander is for java while scopt is for scala. Very correct. Motivation: I met problem when trying to convert `seatunnel-core-base` module from scala to java, because scopt doesn't have java api. So, it's better to replace scopt with jcommander, and jcommander is also better than scopt in other aspects. best, leo65535 At 2021-12-17 21:48:07, "CalvinKirs" <[email protected]> wrote: Hi Leo: What we are using is based on lightbend/config, and I am doing the related updates. Can you elaborate on why a new configuration is needed and what the motivation is for a new one? I think this approach may frustrate many people because they expect the CLI to be stable. Best wishes! CalvinKirs On 12/17/2021 17:31,leo65535<[email protected]> wrote: Hi, everyone Currently, the seatunnel-core-base module is hard to scale inclusing(parse the args, add new command). Here, introduce jcommander framework to replace `scopt`, https://jcommander.org/ - JCommander is an annotation-based library for parsing command-line parameters - With JCommander, we can offload tricky tasks such as parsing, validation, and type conversions, to allow us to focus on our logic. - `scopt` is written by scala, we can not use it in java. - JCommander is released under the Apache 2.0 license. ``` class TestCommand { @Parameter(names={"--length", "-l"}) int length; @Parameter(names={"--size", "-s"}) int size; } ``` Looking for your idea, thanks. best, leo65535
