我尝试使用GAE部署我的SpringBoot应用。
mvn clean package exec:java
时它在本地工作
但是当我用mvn:appengine:deploy
部署它时,我得到了这个:
Caused by: java.lang.IllegalArgumentException: No auto configuration classes
found in META-INF/spring.factories. If you are using a custom packaging, make
sure that file is correct.
Failed to execute goal com.google.cloud.tools:appengine-maven-
plugin:1.2.1:deploy (default-cli) on project boot: Execution default-cli of
goal com.google.cloud.tools:appengine-maven-plugin:1.2.1:deploy failed: Non
zero exit: 1
这是我的pom.xml
<?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>org.springframework</groupId>
<artifactId>boot</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<name>Spring Boot Docker</name>
<description>Getting started with Spring Boot and Docker</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.3.RELEASE</version>
<relativePath />
</parent>
<properties>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<docker.image.prefix>adyzds</docker.image.prefix>
<!-- <java.version>1.8</java.version> -->
<appengine.maven.plugin>1.2.1</appengine.maven.plugin>
<app.stage.artifact>${project.build.directory}/boot-1.0-jar-with-dependencies.jar</app.stage.artifact>
</properties>
<build>
<plugins>
<!-- // [START assembly] -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>hello.Application</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<!-- // [END assembly] -->
<!-- // [START exec] -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<configuration>
<mainClass>hello.Application</mainClass>
<arguments>
<argument>-jar</argument>
<argument>${app.stage.stagingDirectory}/boot-1.0-jar-with-dependencies.jar</argument>
</arguments>
</configuration>
</plugin>
<!-- // [END exec] -->
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>${appengine.maven.plugin}</version>
<configuration>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-datastore</artifactId>
<version>0.13.0-beta</version>
</dependency>
</dependencies>
可能是什么问题?
答案 0 :(得分:0)
我使用springboot插件更改了程序集插件,现在它似乎正在工作