Search in sources :

Example 1 with CloudSdkAuth

use of com.google.cloud.tools.appengine.cloudsdk.CloudSdkAuth in project app-maven-plugin by GoogleCloudPlatform.

the class CloudSdkLoginMojo method execute.

@Override
public void execute() throws MojoExecutionException, MojoFailureException {
    try {
        CloudSdk sdk = getAppEngineFactory().defaultCloudSdkBuilder().build();
        new CloudSdkAuth(sdk).login();
    } catch (AppEngineException ex) {
        throw new RuntimeException(ex);
    }
    if (getServiceAccountKeyFile() != null) {
        getLog().warn("serviceAccountKeyFile is configured and will be used instead of Cloud SDK auth " + "state.");
    }
}
Also used : CloudSdkAuth(com.google.cloud.tools.appengine.cloudsdk.CloudSdkAuth) CloudSdk(com.google.cloud.tools.appengine.cloudsdk.CloudSdk) AppEngineException(com.google.cloud.tools.appengine.api.AppEngineException)

Aggregations

AppEngineException (com.google.cloud.tools.appengine.api.AppEngineException)1 CloudSdk (com.google.cloud.tools.appengine.cloudsdk.CloudSdk)1 CloudSdkAuth (com.google.cloud.tools.appengine.cloudsdk.CloudSdkAuth)1