- Add new styling system which works around concept that
you use tags to request jline styles where tags comes
from an activated theme.
- There is a default theme with options to add custom
ones and change it via property.
- Add templating system which uses antlr stringtemplate which
allows to write output with a template instead of manually
crafting code.
- Add version command which integrates to Boot's BuildProperties
and GitProperties. Only version field is visible on default
and others can be enabled/disable via properties.
- Fixes#352
- Fixes#353
- Add new ShellContext concept which now is just a way
to stash info about interaction mode where ShellRunner
can update supported mode.
- ShellMethod has a new field interactionMode which user
can use to define commands between interactive/non-interactive
modes which then prevents CommandRegistry to show
commands at runtime.
- Fixes#345
- Add basic support of defining a command `completion bash` which
outputs a generic bash script which can be used in a user environment.
- Idea for completion is copied from go's cobra library what comes for
a bash dance itself.
- Goes through command registry, builds a model for command structure
and uses antlr st4 for templating bash.
- Should give foundation to create other completions just like in cobra.
- Currently as we don't know a root-command in a generic way, option
`spring.shell.command.completion.root-command` is required user to set.
- Fixes#343
- Add support for running shell commands as a non-interactive mode.
- This works by adding new ShellApplicationRunner interface which is
an extension to ApplicationRunner forcing to have exactly one main
ApplicationRunner and then DefaultApplicationRunner dispatches to
new interface ShellRunner which allows to pick between script,
interactive and non-interactive, etc.
- It is sort of a breaking change but works much better not having
a need to have previous hooks between application runners to disable
things at runtime.
- All this makes it closer for a user to have a choice between
using shell commands as is without entering interactive mode.
- Also add SpringShellProperties for better config props support
for boot users.
- Fixes#342
- Replace old ConversionService impl with something more aligned
with current boot code with partially shameless copy as
shell is most likely working outside of web or webflux env
by creating FormattingConversionService and hooking convertes
from DefaultConversionService.
- This should work on most cases and giving user a hook
to define their own service.
- For now as there is a weird error with running
mvn build via jfrog, disable running tests as
those are ran with various jdk's before publish
is executed.
- While project uses jdk8, you can do native build with jdk11
`./mvnw clean package -Pnative`
- You can then run these
spring-shell-samples/target/spring-shell-samples
java -jar spring-shell-samples/target/spring-shell-samples-3.0.0-SNAPSHOT-exec.jar
- Remove logback.xml in favour of spring config to workaround for
https://github.com/spring-projects-experimental/spring-native/issues/625
- For now remove jcommander command sample to get support for it #340
- Relates #323
- Lot of rework to move better model to work around bean cycles
- Remove use of @Lazy
- Move StandardAPIAutoConfiguration to autoconfig package
- Remove some of a direct ObjectProvider use in constructors
- Adds spring-native support with most of a things working out of a box
- Relates #324
- Relates #329
- Relates #323
- Replace main use of ResultHandler with ResultHandlerService which is
a framework type of impl for handlers found from conversion service.
This handles types better and easier to handle with bean cycles, etc.
- Removed IterableResultHandler to think about these use cases later
when further refactoring is done.
- TypeHierarchyResultHandler is removed and better functionality now
via ResultHandlerService.
- Relates #336
Add examples of how to achieve, with existing functionality, a varying amount of parameter arity (and favor this verbage over "infinite", which, though technically true, could be misleading for evoking neding a very large amount of a parameter, instead of the normal usecase of a few of any amount).
This commit updates the JCommander version to 1.81.
The update also takes into account an issue that was
introduced in new versions of the JCommander, namely,
https://github.com/cbeust/jcommander/issues/377.
- Shuffle things around into different auto-config and configuration
classes and use other tricks like ObjectProvider to work around
boot 2.6.x imposing bean cycle checks.
- This is first set of changes to work around this issue, not
to make things perfect. Further refactoring work is needed
making code base more boot 2.x friendly as things are based
on boot 1.5.x times.
- Fixes#324