Hi all, I am currently working on supporting sub-commands in Jenkinsfile Runner (issue #429 <https://github.com/jenkinsci/jenkinsfile-runner/issues/>). Apart from JFR, the Plugin Installation Manager Tool is also a component which implements multiple commands at the moment, and hence could benefit from sub-commands that could simplify the API. There are also other projects which could use sub-commands (e.g. Custom WAR Packager, Plugin Compatibility Tester, maybe even Jenkins core).
Currently JFR, as the most of the Jenkins ecosystem, uses the args4j library created by Kohsuke: https://github.com/kohsuke/args4j . The library does the CLI management job quite well, and it is not actively developed at the moment. It does not support sub-commands, auto-completion or advanced help generation (e.g. entry ordering). All of that could be implemented or worked around, but I wonder whether it makes sense to invest much time in that when there are other libraries which support such "more advanced" functionality. It would be great to get opinions of other contributors. There are 2 ways: 1. Keep updating the args4j library. Again, it does the job quite well and can be updated if needed. Kohsuke is still around when a release is needed. It would save time in short term, but in longer term it may create obstacles. The library development is not very active at the moment. 2. Gradually adopt another CLI library (e.g. https://github.com/remkop/picocli) in components which need advanced CLI. Contribute fixes there if needed. This way would allow to save time on implementing features, but it will likely split the tools between 2 libraries. It may complicate contributions. Also, migration to a new lib in existing components would require time investment. I would appreciate feedback from others. In JFR I am experimenting with picocli at the moment, but I will fall back to args4j if there is a consensus that we want to focus on it. Best regards, Oleg -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/9447af42-6a78-4625-a23e-f8d18c4e1890n%40googlegroups.com.