gradle - gradle:应用程序运行参数无法传递系统属性
问题描述
摇篮 5.4.1
apply plugin: application
run {
main = "mypackage.Foo"
}
跑:
gradlew run --args="-Dfoo=bar -Dhello=world"
在运行应用程序时尝试使用 --args 传递系统属性。但他们没有设置。
解决方案
gradlew -Dfoo=bar -Dhello=world run --args="arg1"
--args
是传递给主要方法的内容。
推荐阅读
- javascript - Azure忘记密码链接出现错误我如何重新喜欢它
- django - xlwings || excel可见度问题
- azure - 在 az cli 中向 Azure 服务主体授予安全读者角色
- mongodb - 获取MongoDB中某个字段的最大值的文档
- android - NDK 项目 - 未能引用 fdsan 相关函数
- x509certificate - 节点js中的生成器证书和密钥vaya CA
- java - 如何在任何情况下(即使在打盹模式下)接收 FCM 通知并开始定期工作?
- android - Kotlin 中 globalScope 、 corountineScope 和 viewScope 的区别
- reactjs - 从 React 到活动目录的 ldap 连接
- python - 如何在 dost 数据中编码 None