推送至Ballerina Central的模板缺失Config.toml与Cloud.toml问题排查
解决Ballerina模板拉取时缺失Config.toml和Cloud.toml的问题
问题根源是Ballerina模板默认不会自动包含额外的.toml文件,需要手动在配置中指定要纳入打包的文件列表:
- 在你的
Ballerina.toml里添加[template]配置块,明确列出需要包含的文件:
[package] org = "wso2ohtest" name = "fhir.api" version = "0.1.4" authors=["WSO2"] distribution = "2201.1.2" template = true [build-options] observabilityIncluded = true [template] include = ["Config.toml", "Cloud.toml"]
- 重新执行打包和推送命令更新模板:
bal pack bal push
之后再用bal new new-fhir-api -t wso2ohtest/fhir.api:0.1.4拉取模板时,Config.toml和Cloud.toml就会被正确复制到新项目中。
内容的提问来源于stack exchange,提问作者Shammi Kolonne
相关产品推荐
相关产品推荐

