I'm making a Java program which will be deployed to the Google App Engine and I'm using the Cloud SDK maven plugin version 2.4.0 to deploy to the GAE. However when I run mvn package appengine:deploy
the cloud SDK will say its current version is 321.0.0 and needs to update to 327.0.0. The update will then fail with the error:
ERROR: (gcloud.components.update) Access is denied: [C:\Users\jamie\AppData\Local\Google\ct4j-cloud-sdk\LATEST\google-cloud-sdk.staging\platform\kuberun_licenses\LICENSES.txt]
However when I just run gcloud components update
I get the result of All components are up to date.
Anyone know why this may be happening or how to fix it?
EDIT: As a work-around I found you can force the maven plugin to use a specific version of the sdk by using <cloudSdkVersion>321.0.0</cloudSdkVersion>
. I'm still very curious to know why this occurred though
Manged to fix this by deleted the whole C:\Users\jamie\AppData\Local\Google\ct4j-cloud-sdk
folder as this forces the plugin to redownload a fresh SDK.
The error occurs as the plugin uses its onw auto managed SDK rather than the one which is user managed.