-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Best practice example suitable for a template #1005
Comments
Ideally it would even have a few (unit) tests ready. |
That is great, thank you! For stand-alone programs, the For Another common usage for picocli is command suites: commands with subcommands like For command suites, the "best practice" is to use a I don't have any example unit tests for an application using subcommands to point to. I usually have separate unit tests for each subcommand. I hope this is useful. Thanks again for advocating picocli! 👍 😃 |
Awesome, sounds like exactly what I need. I will update you again as soon as it is ready so that you can try it if you want to. |
@Zethson How did it go? If you have a link I can point to it from the picocli readme or other docs. |
Dear @remkop we were (and are) working a lot on the core code and implemented templates for other languages, but the JVM templates are our next target. We would like to implement the JVM templates as modules and also allow them to be easily packaged and distributed. Moreover, we would like to offer the choice of either Maven or Gradle. Hence, we turned our eyes to the badass jlink plugin, but it seems to be heavily Gradle oriented and uses JPackage. JPackage has a few shortcomings:
"The following features of the javapackager tool will not be supported: I don't care about Ant, but JavaFX-specific features may sound evil. We would rather not distribute Jars, but binaries with custom (platform dependent) JREs. We can script slightly more complex workflows for creating them into our templates, since they will ship with Makefiles anyways (every template has a Makefile which wraps language/framework dependent commands into consistent commands such as I would be very interested in your take on that. Do you have any suggestions, links or thoughts? We do however want to do things right and not distribute half baked solutions. Thanks! |
Actually, you've pointed me into the right direction already and I forgot about that: https://github.com/remkop/picocli-native-image-demo and https://github.com/remkop/picocli-native-image-maven-demo should be example what I'm looking for. I will explore these and keep you updated. ETA ~< 4 weeks :) Edit: The CI of those 2 repositories doesn't seem to pass for all cases. @remkop would it be possible that you fix them up or do you expect everything to still work flawlessly? Edit2: I played around with them and could get them to work. However, I had to fix a few things to make it work and opened a respective issue in the repositories @remkop . |
@remkop I will integrate it into our tool this week and then I can either add you to our tool so that you can test it or you can wait for the release (~4 weeks or something?) and enjoy the show. |
I took a quick look, looks awesome! 👍 😍 |
Quite exciting! When do you think the next release will be (roughly)? |
Dear @remkop, we had to postpone the release several times, since we want to add a couple of features before our first release. However, here's a small preview with a subset of our tools' features: |
The preview looks very nice! Looking forward to the release! |
@remkop ready now! Thanks! |
Hi @Zethson, thanks for letting me know! I will add a link to https://cookietemple.readthedocs.io/en/latest/available_templates/available_templates.html#cli-java to the picocli README. Question/request: Would it be possible to also mention Picocli in the Included frameworks/libraries list for cli-java? Putting my editor/review hat on 😜 , I found what looks like a typo:
this should probably be
I also found this error message under linting your code/cli-java, not sure if this is the intention:
Overall, very nice! Thanks for getting back to me! |
Oh absolutely. We likely forgot it somehow. And thank you for the other comments! We will fix everything. |
Dear @remkop ,
I am planning to create a cookiecutter based java command line tool template. Picocli is of course perfect for that. However, I would like to offer a best practice template and don't have enough experience with picocli to be able to claim that.
Do you have a best practice example lying around? I saw some of your examples, but am not sure which one would suit best.
Thank you very much!
Best
The text was updated successfully, but these errors were encountered: