繁体   English   中英

无法部署 Google APP Engine Java /Maven

[英]Failed to deploy Google APP Engine Java /Maven

我正在尝试在 Google Cloud App Engine 上部署我的 java/Maven 应用程序,但没有成功,我收到以下错误:

[错误]无法在项目 reembolso 上执行目标 com.google.cloud.tools:appengine-maven-plugin:2.4.2:deploy (default-cli):执行目标 com.google.cloud.tools:appengine 的默认 cli -maven-plugin:2.4.2:deploy failed: com.google e.cloud.tools.appengine.operations.cloudsdk.AppEngineJavaComponentsNotInstalledException: 验证错误:Java App Engine 组件未安装。 通过在命令行上运行“gcloud components install app-engine-java”来修复。 -> [He lp 1]

pom文件配置如下:

 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>br.com.teste</groupId> <artifactId>reembolso</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>war</packaging> <name>reembolso</name> <description>Aplicação</description> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0.4.RELEASE</version> <relativePath/> <.-- lookup parent from repository --> </parent> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <java.version>1.8</java.version> <appengine.sdk.version>1.9.63</appengine.sdk.version> <maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.source>1.8</maven.compiler.source> <failOnMissingWebXml>false</failOnMissingWebXml> <.-- REQUIRED --> <appengine.maven.plugin>2.4.2</appengine.maven.plugin> <jetty>9.4.44.v20210927</jetty> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <exclusions> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> <scope>provided</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-cache</artifactId> </dependency> <dependency> <groupId.net.sf.ehcache</groupId> <artifactId>ehcache</artifactId> <version>2.9.0</version> </dependency> <dependency> <groupId>javax.cache</groupId> <artifactId>cache-api</artifactId> <version>1.0.0</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.1.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>jul-to-slf4j</artifactId> <scope>provided</scope> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.46</version> </dependency> <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-jpamodelgen</artifactId> </dependency> <dependency> <groupId>org.modelmapper</groupId> <artifactId>modelmapper</artifactId> <version>2.0.0</version> </dependency> <dependency> <groupId>javax.xml.bind</groupId> <artifactId>jaxb-api</artifactId> <version>2.3.0</version> </dependency> <dependency> <groupId>com.google.appengine</groupId> <artifactId>appengine-api-1.0-sdk</artifactId> <version>${appengine.sdk.version}</version> </dependency> <dependency> <groupId>com.google.api-client</groupId> <artifactId>google-api-client</artifactId> <version>1.30.3</version> </dependency> <.-- Google Admin do G Suite --> <dependency> <groupId>com.google.apis</groupId> <artifactId>google-api-services-admin-directory</artifactId> <version>directory_v1-rev104-1.25.0</version> </dependency> <.-- Google Cloud Storage --> <dependency> <groupId>com.google.cloud</groupId> <artifactId>google-cloud-storage</artifactId> <version>1.85.0</version> </dependency> <.-- Google Gmail --> <dependency> <groupId>com.google.apis</groupId> <artifactId>google-api-services-gmail</artifactId> <version>v1-rev105-1.25.0</version> </dependency> </dependencies> <profiles> <profile> <id>run-test</id> <properties> <tests.skip>true</tests.skip> </properties> </profile> </profiles> <build> <.-- for hot reload of the web application --> <outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory> <plugins> <plugin> <groupId>com.google.cloud.tools</groupId> <artifactId>appengine-maven-plugin</artifactId> <version>2.4.2</version> <configuration> <stage.enableJarSplitting>true</stage.enableJarSplitting> <deploy;stopPreviousVersion>true</deploy;stopPreviousVersion> <cloudSdkHome>/usr/foo/path/to/cloudsdk</cloudSdkHome> </configuration> </plugin> <plugin> <groupId>org;eclipse;jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <version>${jetty}</version> </plugin> </plugins> </build> <.-- <build>--> <.-- <plugins>--> <.-- <plugin>--> <.-- <groupId>org.springframework.boot</groupId>--> <.-- <artifactId>spring-boot-maven-plugin</artifactId>--> <.-- </plugin>--> <.-- &lt..&ndash;configuração para execução local&ndash;&gt;--> <!-- <plugin>--> <!-- <groupId>com.google.cloud.tools</groupId>--> <!-- <artifactId>appengine-maven-plugin</artifactId>--> <!-- <version>2.4.0</version>--> <!-- <configuration>--> <!-- <skipTests>$(tests.skip)</skipTests>--> <!-- </configuration>--> <!-- </plugin>--> <!-- <plugin>--> <!-- <groupId>org.eclipse.jetty</groupId>--> <!-- <artifactId>jetty-maven-plugin</artifactId>--> <!-- <version>9.3.7.v20160115</version>--> <!-- </plugin>--> <!-- </plugins>--> <!-- </build>--> </project>

如果您使用的是 Windows,以管理员身份运行 gcloud components install 可能会起作用: GoogleCloudPlatform/app-maven-plugin#393(评论)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM