File tree 1 file changed +22
-0
lines changed
1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -19,11 +19,13 @@ buildscript { // Configuration for building
19
19
}
20
20
dependencies {
21
21
classpath ' com.google.cloud.tools:appengine-gradle-plugin:1.3.1'
22
+ classpath ' org.akhikhl.gretty:gretty:+'
22
23
}
23
24
}
24
25
25
26
apply plugin : ' java'
26
27
apply plugin : ' war'
28
+ apply plugin : ' org.akhikhl.gretty' // To get webappcopy
27
29
apply plugin : ' com.google.cloud.tools.appengine'
28
30
29
31
group = ' com.example.google.cloud.bigtable'
@@ -55,6 +57,26 @@ dependencies {
55
57
testCompile group : ' org.mockito' , name : ' mockito-all' , version :' 1.10.19'
56
58
}
57
59
60
+ import org.apache.tools.ant.filters.ReplaceTokens
61
+ gretty {
62
+ contextPath = ' /'
63
+ servletContainer = ' jetty9'
64
+
65
+ jvmArgs = [ ' -DBIGTABLE_PROJECT=' + System . getProperty(" bigtable.projectID" ),
66
+ ' -DBIGTABLE_INSTANCE=' + System . getProperty(" bigtable.instanceID" )]
67
+
68
+ webappCopy {
69
+ // Enable filtering on all xml files in WEB-INF
70
+ filesMatching " **/WEB-INF/*.xml" , { FileCopyDetails fileDetails ->
71
+ logger. lifecycle ' File filtered: {}' , fileDetails. path
72
+ filter (ReplaceTokens , tokens : [
73
+ ' bigtable.projectID' : System . getProperty(" bigtable.projectID" ),
74
+ ' bigtable.instanceID' : System . getProperty(" bigtable.instanceID" )
75
+ ])
76
+ }
77
+ }
78
+ }
79
+
58
80
// Always run unit tests
59
81
appengineDeploy. dependsOn test
60
82
You can’t perform that action at this time.
0 commit comments