Unable to deploy maven project on Google App Engin

2019-07-31 10:55发布

My maven project is working fine locally but it's just not getting deployed on gcloud. Following is the Error log and pom.xml file:-

Error log:-

[INFO] Scanning for projects...
[WARNING] The POM for com.google.appengine:appengine-maven-plugin:jar:1.9.66 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for com.google.appengine:appengine-maven-plugin:1.9.66: Plugin com.google.appengine:appengine-maven-plugin:1.9.66 or one of its dependencies could not be resolved: Failure to find com.google.appengine:appengine-maven-plugin:jar:1.9.66 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
[INFO] Downloading from : https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
[INFO] Downloading from : https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
[INFO] Downloaded from : https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml (14 kB at 9.4 kB/s)
[INFO] Downloaded from : https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml (20 kB at 14 kB/s)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.744 s
[INFO] Finished at: 2018-10-08T22:43:01+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'appengine' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/Users/shashankk/.m2/repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException

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.66</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_database</database>
    <sqlURL>jdbc:mysql://google/$liveinbliss?cloudSqlInstance=$live-in-bliss:northamerica-northeast1:liveinbliss-99&amp;socketFactory=com.google.cloud.sql.mysql.SocketFactory&amp;user=$root&amp;password=$my_password&amp;useSSL=false</sqlURL>
  </properties>

</project>

I think I have added all the required dependencies but still don't know what's causing this.

Also, I don't know why but there are errors related to JRE:- Pls see the following two images:-

enter image description here

They need Java 1.8 and I have already set Java 1.8 as seen in the following image:-

enter image description here

Please help me with this.

Thank you!!!

0条回答
登录 后发表回答