【问题标题】:AppEngine Maven Plugin jarSplittingExcludesAppEngine Maven 插件 jarSplittingExcludes
【发布时间】:2014-06-04 19:01:08
【问题描述】:

我正在尝试将 stanford-corenlp 库包含到我的 AppEngine 应用程序中,但在上传时遇到了“JAR 太大”错误:

com.google.appengine.tools.admin.LocalIOException: Jar.../stanford-corenlp-3.3.0-models.jar is too large. Consider using --enable_jar_splitting.
Unable to update app: Jar /tmp/appcfg4516706702870427847.tmp/WEB-INF/lib/stanford-corenlp-3.3.0-models.jar is too large. Consider using --enable_jar_splitting.

按照建议,我尝试了 enable_jar_splitting 选项,但有些个人文件太大而无法拆分。浏览我发现的插件文档:

jarSplittingExcludes
  User property: appengine.jarSplittingExcludes
  When --enable-jar-splitting is set, files that match the list of comma
  separated SUFFIXES will be excluded from all jars.

所以我试图排除一些我没有与这个 pom.xml 一起使用的大文件:

  <plugin>
    <groupId>com.google.appengine</groupId>
    <artifactId>appengine-maven-plugin</artifactId>
    <version>${appengine.target.version}</version>
    <configuration>
        <enableJarSplitting>true</enableJarSplitting>
        <jarSplittingExcludes>englishRNN.ser.gz</jarSplittingExcludes>
    </configuration>
  </plugin>

但是,现在当我跑步时

mvn appengine:update

我明白了:

[INFO] Updating Google App Engine Application
Bad argument: Unknown option: --jar_splitting_excludes
usage: AppCfg [options] <action> [<app-dir>] [<argument>]
...
options:
....
 --enable_jar_splitting
                    Split large jar files (> 10M) into smaller fragments.
 --jar_splitting_excludes=SUFFIXES
                    When --enable-jar-splitting is set, files that match
                    the list of comma separated SUFFIXES will be excluded
                    from all jars.

关于我做错了什么有什么想法吗?

【问题讨论】:

    标签: google-app-engine maven


    【解决方案1】:

    原来是bug。应该在 1.9.7 中修复。您可以克隆开发分支以便更早访问:

    $ git clone https://code.google.com/p/appengine-maven-plugin/
    $ cd appengine-maven-plugin
    $ mvn install
    and change in you pom the plugin version to 1.9.7-SNAPSHOT  (keep the other artifacts the   same, change only for the plugin)
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-12-28
      • 2017-08-22
      • 1970-01-01
      • 2013-01-18
      • 2013-02-01
      • 2013-09-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多