【发布时间】:2021-01-19 05:41:52
【问题描述】:
我正在尝试遵循 grpc-java 的 TLS 示例 https://github.com/grpc/grpc-java/tree/master/examples/example-tls 的 README.md。它表明正在运行
../gradlew installDist
这会在运行示例的
build/install/example-tls/bin/目录中创建脚本hello-world-tls-server、hello-world-tls-client。该示例要求服务器在启动客户端之前运行。
但是,在 examples 目录中的所有位置将 gRPC 版本 1.36.0-SNAPSHOT 替换为 1.35.0 并运行该命令后,build/install/examples/bin 目录不包含此类脚本:
~/D/S/g/examples (master)> tree build/install/examples/bin
build/install/examples/bin
├── compressing-hello-world-client
├── compressing-hello-world-client.bat
├── hedging-hello-world-client
├── hedging-hello-world-client.bat
├── hedging-hello-world-server
├── hedging-hello-world-server.bat
├── hello-world-client
├── hello-world-client.bat
├── hello-world-server
├── hello-world-server.bat
├── retrying-hello-world-client
├── retrying-hello-world-client.bat
├── retrying-hello-world-server
├── retrying-hello-world-server.bat
├── route-guide-client
├── route-guide-client.bat
├── route-guide-server
└── route-guide-server.bat
0 directories, 18 files
在我的本地存储库中,我已将这一行 https://github.com/grpc/grpc-java/blob/1b23cf4f39ab26728336edbda8bb6af22dfe0a01/examples/example-tls/build.gradle#L58 更改为
startScripts.enabled = true
但是,再次运行./gradlew installDist 后,仍然找不到预期的启动脚本。我仔细阅读了CreateStartScripts、https://docs.gradle.org/current/dsl/org.gradle.jvm.application.tasks.CreateStartScripts.html 上的文档,但我并没有立即看出有什么问题。知道为什么没有为 TLS 示例创建启动脚本吗?
【问题讨论】: