OAuth2 without a password without downloading GAE using the Google Maven GAE plugin

I know that a GAE support application without a password is downloaded using appcfg. {sh, cmd] as described here: https://developers.google.com/appengine/docs/java/tools/uploadinganapp#Passwordless_Login_with_OAuth2

However, I would like to know if I can do the same using the official Google Maven GAE plugin . There is a goal called appengine:update , which is used to download a local GAE application to the cloud. However, I can not find information on whether this supports OAuth2. Does anyone know how I can combine OAuth2 and this Maven plugin?

The reason is that I use Jenkins to create my project, and I would prefer to automatically download my application using the Maven target during build instead of running a script (more complex than the Maven goal) as a post-build step.

+4
source share
2 answers

It seems that in the latest versions of the GAE Maven plugin, it has improved (there is no need for appcfg). It is enough to call:

 mvn clean appengine:update 

if not ~ / .appcfg_oauth2_tokens_java, it will appear in your browser and ask for credentials for your Google account. After successful authentication, you are given the OAuth2 token. Paste it into the terminal window where you call mvn and you're done.

+6
source

Appengine: update seems to automatically support OAuth2. I just needed to start the manual build using appcfg.sh. If this shell script was on your PATH , then the command looks something like this:

 appcfg.sh --oauth2 update myapp/war-directory 

Once I follow the instructions in the deployment guide for my application and download the OAuth2 token for my user, I can run mvn appengine:udpate . This will detect my OAuth2 token and will not require manual interaction.

0
source

Source: https://habr.com/ru/post/1484493/


All Articles