GoogleCloudPlatform / gradle-appengine-plugin

Gradle plugin that provides tasks for uploading, running and managing Google App Engine projects
Apache License 2.0
236 stars 60 forks source link

Unable to use GStrings in jvmArgs #211

Closed amitherlekar closed 9 years ago

amitherlekar commented 9 years ago
appcfg {

      logs {
        severity = 2
        outputFile = file('apisvc.log')
      }

      jvmFlags = ['-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000',
                  '-Ddatastore.backing_store=${rootDir}/db/local_db.bin']
     }
}

Here the value of rootDir is not getting resolved. And the local datastore is created in the exploded-app always:

INFO: The backing store, C:\apisvc\build\exploded-app\${rootDir}\db\local_db.bin, does not exist. It will be created.
loosebazooka commented 9 years ago

This appears to be because you are using single quotes, try it with double quotes, then vars are resolved.

Some info here : http://stackoverflow.com/questions/6761498/whats-the-difference-of-strings-within-single-or-double-quotes-in-groovy

I'm not sure why the absolute path isn't working, perhaps because of the space between = and C: ?

On Thu, Oct 15, 2015 at 8:23 AM, amitherlekar notifications@github.com wrote:

Providing the absolute path to the local datastore also doesn't work:

Executing [c:\Program Files\Java\jdk1.7.0_79\jre\bin\java, -Xdebug, -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000, -Ddatastore.backing_store= C:/Amit/ apisvc/db/local_db.bin, -javaagent:C:\Users\herlea.gradle\appengine-sdk\appengine-java-sdk-1.9.26\lib\agent\appengine-agent.jar, -Xbootclasspath/p:C:\Users\herlea.gradle\appengine-sd k\appengine-java-sdk-1.9.26\lib\override\appengine-dev-jdk-overrides.jar, -classpath, c:\Amit\BNBNeeds\bnbneeds\gradle\wrapper\gradle-wrapper.jar;C:\Users\herlea.gradle\appengine-sdk\ appengine-java-sdk-1.9.26\lib\appengine-tools-api.jar, com.google.appengine.tools.development.DevAppServerMain, --property=kickstart.user.dir=c:\Amit\BNBNeeds\bnbneeds, --port=8080, -- address=localhost, --allow_remote_shutdown, C:\Amit\apisvc\build\exploded-app]

Log message:

INFO: The backing store, C:\Amit\apisvc\build\exploded-app\ C:\Amit\apisvc\db\local_db.bin, does not exist. It will be created.

— Reply to this email directly or view it on GitHub https://github.com/GoogleCloudPlatform/gradle-appengine-plugin/issues/211#issuecomment-148369970 .

amitherlekar commented 9 years ago

Using double quotes fixed it. Thanks!