Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0c7029f

Browse files
committed
don't force java_remote_file, update docs
1 parent 21216c4 commit 0c7029f

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ NOTICE: the `application` cookbook was designed around frameworks running on int
3838
- database\_master\_role: if a role name is provided, a Chef search will be run to find a node with than role in the same environment as the current role. If a node is found, its IP address will be used when rendering the context file, but see the "Database block parameters" section below
3939
- context\_template: the name of template that will be rendered to create the context file; if specified it will be looked up in the application cookbook. Defaults to "context.xml.erb" from this cookbook
4040
- database: a block containing additional parameters for configuring the database connection (see below)
41-
- strategy: if specified, allows overriding the default :java_remote_file with an alternate deploy strategy. use :java_local_file for files fetched externally, available on the filesystem
4241

4342
# Database block parameters
4443

@@ -64,6 +63,9 @@ The `tomcat` sub-resource LWRP configures Tomcat to run the application by creat
6463
Attributes
6564
==========
6665

66+
strategy: required to be one of
67+
:java_remote_file allows downloading from a remote http url
68+
:java_local_file allows using a package on the filesystem
6769
path: the target location for the application distribution. This should be outside of the tomcat deployment tree.
6870
repository:
6971
- java_remote_file uses repository as the remote URL
@@ -80,6 +82,7 @@ A sample application that needs a database connection:
8082
path "/usr/local/my-app"
8183
repository "..."
8284
revision "..."
85+
strategy :java_local_file
8386

8487
java_webapp do
8588
database_master_role "database_master"
@@ -107,6 +110,7 @@ context file for other reasons), you can specify your own template:
107110
group node["tomcat"]["group"]
108111
repository "http://mirrors.jenkins-ci.org/war/latest/jenkins.war"
109112
revision "6facd94e958ecf68ffd28be371b5efcb5584c885b5f32a906e477f5f62bdb518-1"
113+
strategy :java_remote_file
110114

111115
java_webapp do
112116
context_template "jenkins-context.xml.erb"

providers/java_webapp.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@
2020
include Chef::Mixin::LanguageIncludeRecipe
2121

2222
action :before_compile do
23-
24-
# include_recipe 'java'
25-
unless new_resource.defined?( strategy )
26-
new_resource.strategy :java_remote_file
27-
end
2823
end
2924

3025
action :before_deploy do

0 commit comments

Comments
 (0)