用Eclipse构建Maven项目
2015-10-18 21:10
549 查看
Eclipse中m2eclipse插件的安装
Help>Install New Software
Click Add
Name: m2e
Location: http://download.eclipse.org/technology/m2e/releases
Click OK
It seems that the plug-in has already been installed in this version of eclipse. If not, just click next until the last and restart eclipse.
Configuration:
1. 绑定maven的安装目录
Window>Preferences
Click Add and add the installation home of maven
Click Finish choose the item
Click Apply and OK
2. 设置自定义本地仓库
Open settings.xml
修改默认的本地仓库位置
修改默认的中央仓库镜像
保存所做的修改,同时还需要把这个settings.xml文件复制一份到“F:/m3”目录下
Window>Preferences
Create a new maven project
Choose maven-archetype-webapp
如果这一步出错了,请参考 http://jingyan.baidu.com/article/63acb44ad96e4b61fcc17ecf.html
Group Id: 基本包名
Artifact Id: 项目名
Help>Install New Software
Click Add
Name: m2e
Location: http://download.eclipse.org/technology/m2e/releases
Click OK
It seems that the plug-in has already been installed in this version of eclipse. If not, just click next until the last and restart eclipse.
Configuration:
1. 绑定maven的安装目录
Window>Preferences
Click Add and add the installation home of maven
Click Finish choose the item
Click Apply and OK
2. 设置自定义本地仓库
Open settings.xml
修改默认的本地仓库位置
<localRepository>F:/m3/repository</localRepository>
修改默认的中央仓库镜像
<mirrors> <!-- mirror | Specifies a repository mirror site to use instead of a given repository. The repository that | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used | for inheritance and direct lookup purposes, and must be unique across the set of mirrors. | <mirror> <id>mirrorId</id> <mirrorOf>repositoryId</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://my.repository.com/repo/path</url> </mirror> --> <mirror> <id>ibiblio</id> <mirrorOf>central</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://mirrors.ibiblio.org/maven2/</url> </mirror> </mirrors>
保存所做的修改,同时还需要把这个settings.xml文件复制一份到“F:/m3”目录下
Window>Preferences
Create a new maven project
Choose maven-archetype-webapp
如果这一步出错了,请参考 http://jingyan.baidu.com/article/63acb44ad96e4b61fcc17ecf.html
Group Id: 基本包名
Artifact Id: 项目名
相关文章推荐
- 基于Annotation的SpringMVC4整合Hibernate4 + freemarker
- Android 如何在Eclipse中查看Android API源码 及 support包源码
- java JVM学习
- Java主函数参数不同形式的辨析
- Java异常框架
- Java基础之IO流学习总结
- <JavaSE学习笔记>面向对象(2):Java内存机制
- Java类加载原理解析
- [转]Java中的private、protected、public和default的区别
- 2015版Javaweb+Tocmat+mysql环境搭建java web开发
- Java 反射简介
- 输入三个整数,并从小到大的顺序输出(java实现)
- Java基本数据类型
- 搭建纯SSH框架(二)
- 刚刚更新:在线聊天系统设计(原理+思路+源码+效果图)
- Ajax应用场景-Ajax适合的应用场合
- java IO流
- [leetcode] Partition List
- 关于JDK在windows环境下的安装与环境变量配置的问题
- java基础问题--Java 中的 String 为什么是不可变的?