将大jar文件上传到Google Cloud Appengine

问题描述 投票:1回答:0

因此,我试图通过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.

我正在尝试运行mvn appengine:deploy的pom是:

<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。

java spring maven google-app-engine
© www.soinside.com 2019 - 2024. All rights reserved.