没有为属性ERROR指定值

时间:2016-09-14 14:34:01

标签: java gradle

我的build.gradle中有以下代码段,并且显示未设置用户和密码属性时出现错误,但是您可以看到我通过System.getenv()获取此变量

cargo {
  containerId = 'tomcat7x'
  port = 8080

  deployable {
    context = 'ROOT'
    file = file("build/libs/${rootProject.name}-${version}.war")
  }

  remote {
    hostname = 'myhostname.com'
    username = System.getenv('TOMCAT_USER')
    password = System.getenv('TOMCAT_APASSWORD')
  }
}

执行任务时的错误消息取决于此配置:

Some problems were found with the configuration of task ':cargoDeployRemote'.
> No value has been specified for property 'username'.
> No value has been specified for property 'password'.

0 个答案:

没有答案