将大jar文件上传到Google Cloud Appengine

时间:2017-12-30 11:37:33

标签: java spring maven google-app-engine

因此我尝试通过Maven插件将基于Spring的应用程序部署到Google Appengine。我收到错误,我的罐子比允许的尺寸大。

[INFO] GCLOUD: ERROR: (gcloud.app.deploy) Cannot upload file 
[C:\path\core-web\target\appengine-
staging\core-web-0.0.1-SNAPSHOT.jar], which has size [54043570] (greater 
than maximum allowed size of [33554432]). Please delete the file or add to 
the skip_files entry in your application .yaml file and try again.

我的pom-我试图运行mvn appengine:deploy is:

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <executions>
                <execution>
                    <goals>
                        <goal>repackage</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>com.google.cloud.tools</groupId>
            <artifactId>appengine-maven-plugin</artifactId>
            <version>1.3.1</version>
        </plugin>
    </plugins>
</build>

我的app.yaml看起来像这样:

runtime: java
env: standard

runtime_config:  # Optional
  jdk: openjdk8

handlers:
- url: /.*
  script: this field is required, but ignored

resources:
  cpu: 2
  memory_gb: 2.3
  disk_size_gb: 10
  volumes:
  - name: ramdisk1
    volume_type: tmpfs
    size_gb: 0.5

manual_scaling:
  instances: 1

我曾经使用完全相同的设置运行我的应用程序(仅在灵活的环境中)并正确上传。

感谢您的帮助。

编辑:我尝试在插件配置中使用jarSplitting属性,但是对于我使用的任何配置,jar都没有拆分。

0 个答案:

没有答案