【发布时间】:2014-11-09 19:46:05
【问题描述】:
我正在使用 Chef 来部署我的网络应用程序。目前,我正在使用以下方式部署存储在公司服务器的 sonatype nexus 中的战争。
remote_file "#{base_dir}/webapps/prodservice.war" do
source "http://company.com:8081/nexus/content/repositories/group/com/company/team/team_product_service/1.0.816/team_product_service-1.0.816.war"
owner "onamer"
group "gname"
notifies :restart, "service[#{service_name}]"
end
有没有办法获得最新的战争而不是硬编码厨师食谱中的版本号?我不想将版本号作为属性也包含在内,因为它需要在每次构建新版本时签入属性文件。我使用下面的 shell 脚本进行战争并将其复制到我的应用程序文件夹,但希望能够与厨师一起完成。
mvn org.apache.maven.plugins:maven-dependency-plugin:2.4:get \
--settings maven-settings.xml \
-DrepoUrl=http://company.com:8081/nexus/content/repositories/group-snaps \
-Dartifact=company.team:$project:1.0-SNAPSHOT:war \
-Ddest=$tmpfile
cp $tmpfile $tomcat/webapps/$context.war
【问题讨论】:
标签: java maven chef-infra nexus