【发布时间】: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.
关于我做错了什么有什么想法吗?
【问题讨论】: