【问题标题】:How configure cookbook maven in chef node?如何在 Chef 节点中配置 cookbook maven?
【发布时间】:2014-12-12 16:34:00
【问题描述】:

问题来源很容易找到this question。所以我运行knife cookbook site install maven,然后运行knife cookbook upload myCookbook --include-dependencie

但运行后

knife bootstrap 192.168.1.37 --ssh-user root --ssh-password '123456' --sudo --use-sudo-password --node-name node-with-maven-run --run-list 'recipe[myCookbook]'

我明白了

No such file or directory - mvn org.apache.maven.plugins:maven-dependency-plugin:2.4:get -DgroupId=org.springframework -DartifactId=spring-context -Dversion=4.0.4.RELEASE -Dpackaging=jar  -Ddest=/tmp/chef_maven_lwrp20141212-27453-ocmoxb/spring-context-4.0.4.RELEASE.jar -DremoteRepositories=http://repo.maven.apache.org/maven2/ -Dtransitive=false

原来maven 根本没有安装在192.168.1.37 上。如何在运行 maven cookbook 之前安装 maven?

附言

很奇怪,cookbook 不测试自己是否安装了 maven。

【问题讨论】:

  • 请包括您的食谱代码和厨师的输出。

标签: java ruby maven chef-infra cookbook


【解决方案1】:

在 metadata.rb 文件中包含一个依赖“maven”除了加载说明书之外没有任何作用。

您还必须在食谱食谱中包含该食谱。

类似的东西 include_recipe 'maven' 在 myCookbook 默认食谱的顶部应该可以。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-08-08
    • 1970-01-01
    • 2014-01-22
    • 1970-01-01
    相关资源
    最近更新 更多