【发布时间】:2017-07-19 05:46:02
【问题描述】:
所以我在尝试使用 Maven 进行全新安装时遇到此错误。我尝试使用 Xmx-512m 增加 MAVEN_OPTS 或 w/e 它被调用,类似地摆弄 Eclipse ini 以增加堆空间,但所有这些都无济于事,我不断收到此错误:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building DiaryAppREST 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ DiaryAppREST ---
[INFO] Deleting C:\Users\Administrator\workspace\DiaryAppREST\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ DiaryAppREST ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\Users\Administrator\workspace\DiaryAppREST\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ DiaryAppREST ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 1 source file to C:\Users\Administrator\workspace\DiaryAppREST\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ DiaryAppREST ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\Users\Administrator\workspace\DiaryAppREST\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.5.1:testCompile (default-testCompile) @ DiaryAppREST ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ DiaryAppREST ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-war-plugin:3.0.0:war (default-war) @ DiaryAppREST ---
[INFO] Packaging webapp
[INFO] Assembling webapp [DiaryAppREST] in [C:\Users\Administrator\workspace\DiaryAppREST\target\DiaryAppREST-0.0.1-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [C:\Users\Administrator\workspace\DiaryAppREST\WebContent]
[INFO] Webapp assembled in [8913 msecs]
[INFO] Building war: C:\Users\Administrator\workspace\DiaryAppREST\target\DiaryAppREST-0.0.1-SNAPSHOT.war
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27.019 s
[INFO] Finished at: 2017-02-28T09:52:30+00:00
[INFO] Final Memory: 86M/247M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:3.0.0:war (default-war) on project DiaryAppREST: Error assembling WAR: Problem creating war: Execution exception (and the archive is probably corrupt but I could not delete it): Java heap space -> [Help 1]
[ERROR]
我不明白是什么原因造成的,试图在网上查找信息,但似乎找不到其他人遇到的这个具体问题。如果有人能提供帮助,我将不胜感激。
【问题讨论】:
-
是错字吗?应该是
Xmx-512m -
是的,我打错了,我的意思是 m 部分,所有其他大小的附加组件 Eclipse 的 ini 是:-Xms2048m -Xmx512m -XX:PermSize=512m -XX:MaxPermSize=768m
-
我可能只是 512m 还不够。 3000m 还是报错?
-
我同意 512m 并不多。为了安全起见,我还会删除目标存档,maven 警告它无法删除
标签: java eclipse maven war stanford-nlp