mvn命令指定java home_指定Maven的环境变量M2_HOME,

  • Post author:
  • Post category:java


在设置Apache Stratos的开发环境的时候,被java版本的切换坑了很久,后面是能用export JAVA_HOME=”$(/usr/libexec/java_home -v 1.7)”这个命令手动在zsh下切换。

下面是设置Apache Stratos时,一些环境变量的设置要求。

Setting up Apache Stratos source

Download and install JDK 1.6 on your computer.

Create the JAVA_HOME environment variable, and point it to .

refers to the installation directory of JDK.

Download and install Apache Maven (3.0.0 or later) on your computer.

Create the M2_HOME environment variable, and point to .

refers to the installation directory of Apache Maven.

Set the MAVEN_OPTSenvironment variable as follows:

MAVEN_OPTS=”-Xms512m -Xmx1536m -XX:MaxPermSize=512m -XX:ReservedCodeCacheSize=256m”

Install a preferred Java IDE, and make sure Maven support is available.

Checkout Apache Stratos source code from its Git repository as follows:

Sel



版权声明:本文为weixin_42498981原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。