edit at 2012-12-09
学习全在于应用,实例是个很好的学习方法,所以外网配上maven环境,方便构建工程。
1.安装maven
安装maven3.0.4,配置maven环境变量M2_HOME和M2。
使用mvn -version测试基本环境。
按照maven官网[1]创建测试例子,会有一段时间的加载构建。最好在当前用户目录下建立.m2文件夹,复制setting.xml。默认是使用apache的公共仓库。
2.安装m2e插件
没找到插件的安装包,可以同过Help->install new software:http://download.eclipse.org/technology/m2e/releases安装[2]。
3.配置
默认apache中央仓库可能无能访问,这时候需要配置mirror[3],在setting.xml的mirrors下中添加
<mirror> <id>ibiblio</id> <mirrorOf>central</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://mirrors.ibiblio.org/pub/mirrors/maven2/</url> </mirror>
4. 常见问题
Q1:怎么自定义mvn命令,例如compile?
Run as --> mvn build... goal选项中填写:compile
【运行按钮】-> Organize Favorites... 可以收藏自定义的命令,快速访问。
Q2:如果获取依赖包失败怎么处理?
del /s *.lastUpdated 删除maven本地库中的lastUpdated文件,maven会重新尝试下载;或者通过网站访问手动下载,再放到对应的目录
linux shell use: find -name \*.lastUpdated -delete
相关推荐
refer to Maven as something more comprehensive: a project management tool. What is the difference? A build tool such as Ant is solely focused on preprocessing, compilation, packaging, testing, and ...
非常好的一份maven入门教程,Maven Quick Guide.pdf (高清版).该教程是tutorialspoint官网上的教程,很多示例
《maven权威指南中文版》+《maven the definitive guide 》包括如何配置私服以及maven基础使用
Maven.Definitive.Guide 中文译本.pdf
maven-definitive-guide.pdf maven-definitive-guide.pdf maven-definitive-guide.pdf maven-definitive-guide.pdf
Maven the reference guide
Maven the definitive guide
maven安装maven安装maven安装maven安装maven安装maven安装maven安装maven安装maven安装maven安装maven安装maven安装maven安装maven安装maven安装maven安装maven安装maven安装maven安装maven安装maven安装maven安装...
Maven The Definitive Guide,java开发工具,使用Maven管理项目。
maven-definitive-guide
To use Maven, everything you need to know is in this guide. The first part demonstrates the tool's capabilities through the development, from ideation to deployment, of several sample applications -- ...
学习maven得好例子。参考maven-definitive-guide.pdf
maven-definitive-guide_zhmaven-definitive-guide_zhmaven-definitive-guide_zhmaven-definitive-guide_zhmaven-definitive-guide_zhmaven-definitive-guide_zhmaven-definitive-guide_zhmaven-definitive-guide_...
Over 90 hands-on recipes to successfully build and automate development life cycle tasks following Maven conventions and best practices About This Book ...Chapter 11: Advanced Maven Usage
Maven 命令Maven 命令Maven 命令Maven 命令Maven 命令Maven 命令Maven 命令Maven 命令Maven 命令Maven 命令Maven 命令Maven 命令Maven 命令Maven 命令Maven 命令Maven 命令Maven 命令
maven3.0maven3.0maven3.0maven3.0maven3.0maven3.0maven3.0maven3.0maven3.0maven3.0
Maven3.9.4版本压缩包,仅供学习参考,更新版本请前往Maven官方下载;Maven3.9.4版本压缩包,仅供学习参考,更新版本请前往Maven官方下载;Maven3.9.4版本压缩包,仅供学习参考,更新版本请前往Maven官方下载;Maven...
apache-maven-3.0.5 apache-maven-3.1.1 apache-maven-3.2.5 apache-maven-3.3.9 apache-maven-3.5.4 apache-maven-3.6.3 apache-maven-3.8.5 每个版本包含4个文件: apache-maven-3.8.5-bin.tar.gz apache-maven-...