Ticket #9 (assigned 分享)
Maven项目前提准备
| Reported by: | qinhongyuan | Owned by: | qinhongyuan |
|---|---|---|---|
| Priority: | major | Milestone: | 搭建环境 |
| Component: | Maven教程 | Version: | |
| Keywords: | Maven 环境 | Cc: | |
| Due Date: | 08/02/2012 |
Description
使用Maven前需要准备的软件
Change History
comment:1 Changed 14 years ago by qinhongyuan
- Status changed from new to assigned
- Owner changed from somebody to qinhongyuan
comment:2 Changed 14 years ago by qinhongyuan
- 需要设置jdk环境,设置JAVA_HOME
- 解压maven,设置MAVEN_HOME
- 配置setting.xml文件(代理,镜像等配置),一般把这个文件放到用户目录下/.m2/里面,不过本地开发就不用了(该文件在maven/conf里面)
- 配置基本完毕,一般使用eclipse,netbeans等IDE工具,版本较新的已经内置Maven了,一般我们用自己下载下来的。。
- 配置基本完毕了
comment:3 Changed 14 years ago by qinhongyuan
- netbeans使用外置的maven:工具->选项->其它->Maven->外部&Maven主页,填MAVEN_HOME的内容就可以了(netbeans版本6.9.1)
comment:4 Changed 14 years ago by qinhongyuan
- 在eclipse自动安装插件 http://m2eclipse.sonatype.org/sites/m2e
- 安装完成后重启eclipse
- 进入eclipse的配置中,选择maven配置项installatiions,and找到你的本机maven安装目录,即MAVEN_HOME
- 可能出现的错误
Eclipse is running in a JRE, but a JDK is required Some Maven plugins may not work when importing projects or updating source folders
- 确定eclipse只是用一个jdk且版本1.5+
- 如未解决,尝试修改eclipse.ini文件,添加多一条命令
-vm c:\program Files\java\jdk1.6\jre\bin\javaw
Note: See
TracTickets for help on using
tickets.
![(please configure the [header_logo] section in trac.ini)](http://www1.pconline.com.cn/hr/2009/global/images/logo.gif)