File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 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
1919 }
2020 dependencies {
2121 classpath ' com.google.cloud.tools:appengine-gradle-plugin:1.3.1'
22+ classpath ' org.akhikhl.gretty:gretty:+'
2223 }
2324}
2425
2526apply plugin : ' java'
2627apply plugin : ' war'
28+ apply plugin : ' org.akhikhl.gretty' // To get webappcopy
2729apply plugin : ' com.google.cloud.tools.appengine'
2830
2931group = ' com.example.google.cloud.bigtable'
@@ -55,6 +57,26 @@ dependencies {
5557 testCompile group : ' org.mockito' , name : ' mockito-all' , version :' 1.10.19'
5658}
5759
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+
5880// Always run unit tests
5981appengineDeploy. dependsOn test
6082
You can’t perform that action at this time.
0 commit comments