You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何将Ballerina项目中的资源文件打包至BALA文件?

解决Ballerina打包BALA时包含资源文件的问题
  • 编辑项目根目录的Ballerina.toml,添加或修改[package]配置块,显式指定需要打包的资源路径:
    [package]
    include = ["resources/**"]
    
    若仅需打包help.txt单个文件,可精确指定路径:
    [package]
    include = ["resources/help.txt"]
    
  • 保存配置后,重新执行打包命令:
    bal pack
    

Ballerina的bal pack命令默认仅打包.bal文件和Ballerina.toml,必须通过include字段声明需要纳入的额外资源,才能将目标文件打包进BALA文件。

内容的提问来源于stack exchange,提问作者Gayal Dassanayake

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.18 03:34:56