Failure: (ID: 838926df) did not find any jar files with a Main-Class manifest entry

Viewed 2221

when running gcloud app deploy on my spring boot app, this error happens in Cloud Build.

4 Answers

There can be one or many issues because of which you get this error. For resolution please check below things -

  1. Your app.yaml should have entrypoint and runtime information as below -

    runtime: java11
    entrypoint: java -Xmx64m -jar blahblah.jar

  2. your pom.xml should have appengine maven plugin dependency

`

<plugin>
   <groupId>com.google.cloud.tools</groupId>    
   <artifactId>appengine-maven-plugin</artifactId>
   <version>2.2.0</version>
</plugin>

`

  1. don't modify jar if you want to replace any configs use command -
    jar uf blahblah.jar filename.yaml

  2. make sure you have packaging as a jar in pom.xml like this - <packaging>jar</packaging>

I deleted my maven plugin by accident, so don't delete it.

      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
      </plugin>

I was able to fix it for my AppEngine + Gradle project by adding

jar {
    enabled = false
    archiveClassifier = ''
}

to the build.gradle file.

Related