2004-07-26 21:12:58 -04:00
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
Bootstrapping Maven
|
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
|
2006-10-04 23:10:27 -04:00
|
|
|
Set the environment variable M2_HOME pointing to the dir where you want Maven2
|
|
|
|
installed... with two key restrictions.
|
2004-07-26 21:12:58 -04:00
|
|
|
|
2006-10-04 23:10:27 -04:00
|
|
|
1) presently, the directory {M2_HOME}/bin must be in your path:
|
2005-04-04 11:18:48 -04:00
|
|
|
set PATH=%PATH%;%M2_HOME%\bin
|
|
|
|
or
|
|
|
|
export PATH=$PATH:$M2_HOME/bin
|
|
|
|
|
2006-10-04 23:10:27 -04:00
|
|
|
2) The last part of the M2_HOME path MUST be of the form maven-$version, eg:
|
2006-09-12 22:48:48 -04:00
|
|
|
/usr/local/maven-2.1-SNAPSHOT
|
|
|
|
|
2005-01-09 17:38:43 -05:00
|
|
|
You can set the parameters passed to the Java VM when running Maven2 bootstrap,
|
2006-10-04 23:10:27 -04:00
|
|
|
setting the environment variable MAVEN_OPTS, e.g. to run in offline mode,
|
|
|
|
set MAVEN_OPTS=-o
|
2004-07-26 21:12:58 -04:00
|
|
|
|
2005-11-16 08:31:15 -05:00
|
|
|
Then run bootstrap.bat (in Windows) or bootstrap.sh (in Unix)
|
2004-07-26 21:19:41 -04:00
|
|
|
|
|
|
|
NOTE: You must run these instructions from this directory!
|
2005-07-05 20:24:22 -04:00
|
|
|
|
|
|
|
If you are behind a firewall, you will need to let the bootstrap process know.
|
|
|
|
To do this, create a file at ~/.m2/settings.xml and paste in the XML below,
|
|
|
|
substituting your settings for those provided. You can safely skip the
|
|
|
|
username, password and nonProxyHost elements if they are not relevant to you.
|
|
|
|
|
|
|
|
<settings>
|
|
|
|
<proxies>
|
|
|
|
<proxy>
|
|
|
|
<active>true</active>
|
|
|
|
<protocol>http</protocol>
|
|
|
|
<host>proxy.somewhere.com</host>
|
|
|
|
<port>8080</port>
|
|
|
|
<username>proxyuser</username>
|
|
|
|
<password>somepassword</password>
|
|
|
|
<nonProxyHosts>www.google.com|*.somewhere.com</nonProxyHosts>
|
|
|
|
</proxy>
|
|
|
|
</proxies>
|
|
|
|
</settings>
|