我想将Maven项目转换为App Engine项目以进行部署。但这给了我以下错误,如下面的屏幕快照所示:-
以下是我的项目属性的屏幕截图:-
除此之外,当我在本地主机上运行项目时,出现以下错误:-
HTTP错误503访问/时出现问题。原因:
Service Unavailable
因此,以下是我的pom.xml的代码,我想此文件中缺少某些内容:-
<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>LiveInBliss</groupId>
<artifactId>LiveInBliss</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<build>
<!-- [START resources] -->
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<!-- [END resources] -->
<plugins>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.4.0.M0</version>
</plugin>
<plugin>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>1.9.67</version>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.1</version>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.mail/mail -->
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud</artifactId>
<version>0.8.0</version>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
<version>1.34.0</version>
</dependency>
<dependency> <!-- http://dev.mysql.com/doc/connector-j/en/ -->
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>6.0.5</version>
</dependency>
<dependency>
<groupId>com.google.cloud.sql</groupId>
<artifactId>mysql-socket-factory-connector-j-6</artifactId>
<version>1.0.10</version>
</dependency>
</dependencies>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<!--
INSTANCE_CONNECTION_NAME from Cloud Console > SQL > Instance Details > Properties
or `gcloud sql instances describe <instance> | grep connectionName`
-->
<INSTANCE_CONNECTION_NAME>live-in-bliss:northamerica-northeast1:liveinbliss-99</INSTANCE_CONNECTION_NAME>
<user>root</user>
<password>my_password</password>
<database>my_db_name</database>
<sqlURL>jdbc:mysql://google/$db_name?cloudSqlInstance=$live-in-bliss:northamerica-northeast1:liveinbliss-99&socketFactory=com.google.cloud.sql.mysql.SocketFactory&user=$root&password=$my_password&useSSL=false</sqlURL>
</properties>
</project>
答案 0 :(得分:2)
我不熟悉App Engine标准项目,但是您的屏幕截图看起来像您已配置了Dynamic Web Module 2.3。根据{{3}}的每个已报告问题,使用App Engine需要Dynamic Web Module 2.5。
对于同一来源,您可能还需要检查org.eclipse.wst.common.project.facet.core.xml文件中的“ jst.web”设置,并确保它与您选择的值一致。 / p>