1、安装与配置
获取MVN最新版:http://maven.apache.org/download.html
配置环境变量:
MVN_HOME=D:\java\apache-maven-3.0.3
PATH=%PATH%;%MVN_HOME%\bin
2、配置基础配置,自定义本地目录文件:
<localRepository>d:/java/repository</localRepository>
3、使用mvn命令创建项目
COMMON:
mvn archetype:create -DgroupId=name.ixr -DartifactId=ixr-common -DarchetypeArtifactId=maven-archetype-quickstart -Dversion=1.0
BIZ:
mvn archetype:create -DgroupId=name.ixr -DartifactId=ixr-biz -DarchetypeArtifactId=maven-archetype-quickstart -Dversion=1.0
WEB:
mvn archetype:create -DgroupId=name.ixr -DartifactId=ixr-web -DarchetypeArtifactId=maven-archetype-webapp -Dversion=1.0
4、添加eclipse支持
COMMON和BIZ项目使用:
mvn eclipse:eclipse
WEB项目使用:
mvn eclipse:eclipse -Dwtpversion=2.0
5、导入项目
好了接下来就像平常使用eclipse+tomcat一样开发吧!~