spring_reference/VII. Spring Boot CLI/55.7. Adding extensions to ...

17 lines
793 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

### 55.7. 为CLI添加扩展
使用`install`命令可以为CLI添加扩展。该命令接收一个或多个格式为`group:artifact:version`的artifact坐标集。例如
```shell
$ spring install com.example:spring-boot-cli-extension:1.0.0.RELEASE
```
除了安装你提供坐标的artifacts标识外所有依赖也会被安装。使用`uninstall`可以卸载一个依赖。和`install`命令一样,它接收一个或多个格式为`group:artifact:version`的artifact坐标集。例如
```shell
$ spring uninstall com.example:spring-boot-cli-extension:1.0.0.RELEASE
```
它会通过你提供的坐标卸载相应的artifacts标识和它们的依赖。
为了卸载所有附加依赖,你可以使用`--all`选项。例如:
```shell
$ spring uninstall --all
```