在一个空罐子包装天鹅,共同作用的结果(Packaging cygnus-common results

2019-09-29 00:40发布

我试图安装天鹅常见此之后指南但天鹅常见罐子的制作(包括依赖)总是导致一个空罐子。 没有任何问题,安装Apache的水槽。 我试着增加了Maven的JVM按照指导内存,但这并没有帮助。

~/fiware-cygnus/cygnus-common$ mvn clean compile exec:exec 
assembly:single
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building cygnus-common 1.1.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ cygnus-common ---
[INFO] Deleting /home/cygnus/fiware-cygnus/cygnus-common/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ cygnus-common ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ cygnus-common ---
[INFO] Compiling 50 source files to /home/cygnus/fiware-cygnus/cygnus-common/target/classes
[INFO] 
[INFO] --- exec-maven-plugin:1.5.0:exec (default-cli) @ cygnus-common ---
[INFO] 
[INFO] --- maven-assembly-plugin:2.6:single (default-cli) @ cygnus-common ---
[INFO] Building jar: /home/cygnus/fiware-cygnus/cygnus-common/target/cygnus-common-1.1.0-jar-with-dependencies.jar
Killed

这里的结果文件

~/fiware-cygnus/cygnus-common$ ls -lrth target/
total 12K
drwxrwxr-x 3 cygnus cygnus 4.0K Jun 13 14:57 generated-sources
drwxrwxr-x 3 cygnus cygnus 4.0K Jun 13 14:57 classes
drwxrwxr-x 2 cygnus cygnus 4.0K Jun 13 14:57 archive-tmp
-rw-rw-r-- 1 cygnus cygnus    0 Jun 13 14:58 cygnus-common-1.1.0-jar-with-dependencies.jar

类似的问题是没有解决之前记录的要求。 对于这个问题给出的唯一建议是要么缺乏磁盘空间,内存或权限。 磁盘空间绝对不是问题,我增加了内存Maven的JVM和用户具有正确的权限。

编辑:

于是我就在mvn compile在调试模式下通过@frb的建议,这是内存问题

#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 257024000 bytes for committing reserved memory.
# Possible reasons:
#   The system is out of physical RAM or swap space
#   In 32 bit mode, the process size limit was hit
# Possible solutions:
#   Reduce memory load on the system
#   Increase physical memory or swap space
#   Check if swap backing store is full
#   Use 64 bit Java on a 64 bit OS
#   Decrease Java heap size (-Xmx/-Xms)
#   Decrease number of Java threads
#   Decrease Java thread stack sizes (-Xss)
#   Set larger code cache with -XX:ReservedCodeCacheSize=
# This output file may be truncated or incomplete.
#
#  Out of Memory Error (os_linux.cpp:2827), pid=48868, tid=140567873734400

  [1]: http://fiware-cygnus.readthedocs.io/en/latest/cygnus-common/installation_and_administration_guide/install_from_sources/index.html#section3 "guide"

使用top我能够看到内存使用率超过70%时,过程被杀害。 该系统具有〜1.7GB,其远高于规定的要求 ,并且它是一个64位的系统。

我的系统内存增加至3GB和构建成功所以也许对硬件的要求应该更新?

Answer 1:

增加系统内存3GB的修复了这个问题,并罐子已成功创建。



文章来源: Packaging cygnus-common results in an empty jar