您的位置:首页 > 其它

MAVEN使用笔记

2011-09-23 15:14 302 查看
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一样开发吧!~
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: