maven3的安装

1.下载地址:http://mirror.bjtu.edu.cn/apache//maven/source/apache-maven-3.0-src.zip
2.安装前提:Java 1.5,Ant 1.6.5 or later
我用的ant:Apache Ant version 1.7.0 compiled on December 13 2006
jdk:Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
3.将第一步中下载的zip文件解压到D:\maven\apache-maven-3.0
4.追加环境变量M2_HOME=$HOME/apps/maven/apache-maven-3.0-SNAPSHOT
4.打开cmd,将目录指向D:\maven\apache-maven-3.0,运行ant
5.等待(时间比较长),成功运行
BUILD SUCCESSFUL
Total time: 12 minutes 34 seconds
6.命令行中修改环境变量M2_HOME
【set M2_HOME=D:\maven\apache-maven-3.0\$HOME\apps\maven\apache-maven-3.0-SNAPSHOT】
7.运行【mvn -v】显示如下信息:
Apache Maven 3.0 (rNON-CANONICAL_2010-10-26_10-56_ghl; 2010-10-26 10:56:09+0800)
Java version: 1.6.0_17
Java home: D:\jdk\jre
Default locale: zh_CN, platform encoding: GBK
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"

成功执行后
1.在【C:\Documents and Settings\ghl\.m2】下生成了【repository】文件夹
2.在【D:\maven\apache-maven-3.0】下多了【D:\maven\apache-maven-3.0\$HOME\apps\maven\apache-maven-3.0-SNAPSHOT】文件夹

你可能感兴趣的:(java,apache,maven,ant,XP)