Commit Graph

484 Commits

Author SHA1 Message Date
Janne Valkealahti
668ddb458e Completion command for bash
- 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
2022-01-07 10:02:51 +00:00
Janne Valkealahti
7298b2ce78 Support for non-interactive shell commands
- 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
2021-12-31 15:30:52 +00:00
Janne Valkealahti
7042d1f83b Rework shellConversionService
- 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.
2021-12-24 15:04:40 +00:00
Janne Valkealahti
58792bc695 Disable tests for publish
- 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.
2021-12-24 14:19:19 +00:00
Janne Valkealahti
d578f28662 Polish 2021-12-24 13:54:41 +00:00
Janne Valkealahti
05311ffcdc Remove cache from publish 2021-12-24 13:43:12 +00:00
Janne Valkealahti
54702460d1 Make sample to work with spring-native
- 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
2021-12-24 13:27:44 +00:00
Janne Valkealahti
d879b7d6c4 Update boot 2.6.2
- Fixes #339
2021-12-24 09:01:14 +00:00
Janne Valkealahti
f6394a4531 Rework bean handling
- 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
2021-12-24 08:50:40 +00:00
Janne Valkealahti
2706da37cc Disable javadoc errors for now 2021-12-21 18:11:13 +00:00
Janne Valkealahti
d883e0e660 Introduce ResultHandlerService
- 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
2021-12-21 18:11:13 +00:00
Janne Valkealahti
c5081acee8 Make starter packaging jar again 2021-12-19 16:44:05 +00:00
Janne Valkealahti
5dcdc4c185 Extract autoconfig
- Create separate spring-shell-autoconfigure and keep
  all autoconfig features there.
- Fixes #329
2021-12-19 12:38:41 +00:00
Janne Valkealahti
a2f3dd9ed8 Remove assertj dep handling 2021-12-19 08:39:37 +00:00
Janne Valkealahti
af838ca006 Polish 2021-12-18 16:59:48 +00:00
Janne Valkealahti
f20b71a8c2 Remove unused Parser usage 2021-12-18 16:17:10 +00:00
Janne Valkealahti
4417d3e394 Remove parent from spring-shell-dependencies 2021-12-18 15:59:26 +00:00
Janne Valkealahti
2a951ab952 Revert "Update jfrog 1.52.0"
This reverts commit 54cb988877.
2021-12-18 15:44:26 +00:00
Janne Valkealahti
54cb988877 Update jfrog 1.52.0 2021-12-18 15:01:21 +00:00
Janne Valkealahti
a8d20f29bf Remove legacy from sample
- Preparation for further work as remove shell 1.x dep
  from sample.
- Relates #333
2021-12-18 14:47:34 +00:00
Janne Valkealahti
ffbd88b860 Update jline 3.21.0
- Fixes #331
2021-12-18 13:38:45 +00:00
Janne Valkealahti
bc4c691bbd Update vscode settings 2021-12-18 13:23:52 +00:00
Janne Valkealahti
d26f6d1a90 Update doc authors 2021-12-18 13:01:58 +00:00
Johnny Marnell
2b7a9b15e6 Clarify how to achieve varying arity in docs
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).
2021-12-18 12:54:06 +00:00
汪吉
763fef8e1b remove not use import and add Override and add a miss @Component 2021-12-18 12:46:52 +00:00
Joao Ferreira
63f786fd8c Update JCommander version
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.
2021-12-18 10:12:22 +00:00
Janne Valkealahti
3b06a9aef7 Remove coverage phase as there's no travis anymore 2021-12-18 09:40:06 +00:00
Janne Valkealahti
fd10bc2670 Add maven cache to publish workflow 2021-12-18 09:35:30 +00:00
Jay Bryant
012481ef63 Update document appearance
Use Spring's standard styles for the ToC. Also added epub generation.
2021-12-18 09:29:09 +00:00
Jay Bryant
7473c9ec5c Editing pass
Edited for spelling, puncuation, grammar, usage, and corporate voice.
2021-12-18 08:13:47 +00:00
Janne Valkealahti
8ad59b702c Kick publish after ci
- Take 3
- Relates #328
2021-12-17 17:51:31 +00:00
Janne Valkealahti
434930f679 Kick publish after ci
- Take 2
- Relates #328
2021-12-17 17:40:23 +00:00
Janne Valkealahti
f6f80237b5 Kick publish after ci
- Attempt to fire ci-publish after ci finish ok
- Relates #328
2021-12-17 17:38:11 +00:00
Janne Valkealahti
d0dd446744 Configure snapshot publish
- New workflow which can be run manually to test publish.
- Relates #328
2021-12-17 16:43:15 +00:00
Janne Valkealahti
1dd2706164 Make build work with jdk 11/17
- Fixes #326
2021-12-17 16:15:38 +00:00
Janne Valkealahti
3a8f8e317f Update maven 3.8.4
- Fixes #330
2021-12-17 16:14:37 +00:00
Janne Valkealahti
e14f4a3f32 Remove bean cycles
- 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
2021-12-17 15:32:52 +00:00
Janne Valkealahti
2de3dd0334 Don't fail fast with ci 2021-12-17 14:50:57 +00:00
Janne Valkealahti
a6048e0e0f Use cache with ci workflows 2021-12-17 14:47:24 +00:00
Janne Valkealahti
fc98468b76 Add pr workflow 2021-12-17 14:46:56 +00:00
Janne Valkealahti
8606c17001 Add ci workflow 2021-12-17 14:41:44 +00:00
Janne Valkealahti
90216bdc32 Switch from BUILD-SNAPSHOT to SNAPSHOT 2021-12-17 14:25:52 +00:00
Janne Valkealahti
5e61ff1315 Polish unused imports 2021-12-11 13:09:00 +00:00
Janne Valkealahti
e30edf2446 Update boot 2.6.1
- Migrate tests to junit5 and assertj as those
  are on a classpath automatically.
- Temporarily use spring.main.allow-circular-references=true
  to allow time for fixes to remove cycles.
2021-12-11 12:57:34 +00:00
Janne Valkealahti
592f9e9f99 Add vscode settings 2021-12-11 12:53:44 +00:00
Janne Valkealahti
ee849d1aa8 Update plugin versions 2021-12-11 09:02:38 +00:00
Gao Liang
10fb9a8ed2 fix pom exclusions 2021-12-11 08:41:45 +00:00
Jay Bryant
eca0dd1572 Update doc appearance and link doc formats
Updated the ToC, banner, highlighting, and CSS styles to the last Spring standard.
Linked the HTML output to the PDF output and vice-versa.
2021-12-11 08:39:05 +00:00
Janne Valkealahti
58410d2f7b Bye Bye travis 2021-04-19 16:52:02 +01:00
onnadi-sa
296db93462 Fix typo 2019-10-02 12:02:13 +02:00