我在整个网络上搜索,我找不到任何好的文件解释这个主题.有人可以通过任何方式帮助我学习maven语义吗?
例:-
MAVEN_OPTS=" -Xms512m -Xmx1024m -XX:MaxPermSize=1024m"
export MAVEN_OPTS
什么"-Xms512m -Xmx1024m -XX:MaxPermSize=1024m"意思?
Gim*_*mby 11
文档很棒,但并不总是完整的.您可以做一些额外的事情来自己解决问题.在这种情况下,您知道MAVEN_OPTS是一个环境变量,这可能意味着它在shell脚本中使用.因此,打开例如mvn.bat并搜索MAVEN_OPTS以查看它是如何使用的.
您会发现它只是一种指定Java命令行参数的方法,这些参数对于Maven本身的执行是有效的.作为过去的一个例子,我需要增加默认的permgen大小,以防止在执行复杂构建期间出现问题.
tk_*_*tk_ 10
经过上述评论后,我澄清了我对MAVEN_OPTS和maven语义的疑虑.请参阅此链接并浏览文档.
    -Xmsn
            Specifies the initial size, in bytes, of the memory allocation pool. This value 
must be a multiple of 1024 greater than 1 MB. Append the letter k or K to indicate kilobytes,
 or m or M to indicate megabytes. The default value is chosen at runtime based on system configuration. See Garbage Collector Ergonomics at
            [http://docs.oracle.com/javase/7/docs/technotes/guides/vm/gc-ergonomics.html][2]
            Examples:
            -Xms6291456
            -Xms6144k
            -Xms6m
      -Xmxn
            Specifies the maximum size, in bytes, of the memory allocation pool. This value 
must a multiple of 1024 greater than 2 MB. Append the letter k or K to indicate kilobytes, or m
 or M to indicate megabytes. The default value is chosen at runtime based on system 
configuration.
            For server deployments, -Xms and -Xmx are often set to the same value. See Garbage
 Collector Ergonomics at
            [http://docs.oracle.com/javase/7/docs/technotes/guides/vm/gc-ergonomics.html][3]
            Examples:
            -Xmx83886080
            -Xmx81920k
            -Xmx80m