下载解压安装
配置本地环境变量
检查配置情况
配置本地仓库
修改/path/to/local/repo
核心《二》:项目构建
在项目构建完成后,对项目进行编译、打包、部署等一系列的操作命令来实现
MAVEN项目文件介绍
Eclipse如何集成maven
在新建的maven项目的pom.xml中添加需要的jar包的(dependency)
dependency 从官网上查询(http://search.maven.org)中查找
Maven项目构建过程中常见问题
创建 maven maven-archetype-quickstart 项目抱错问题解决方法
问题:
eclipse装m2eclipse的时候装完后创建项目的时候报错:
Unable to create project from archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE
解决方法:
1.Open Window > Preferences
2.Open Maven > Archetypes
3.Click ‘Add Remote Catalog’ and add the following:
oCatalog File: http://repo1.maven.org/maven2/archetype-catalog.xml
oDescription: maven catalog
问题:
eclipse装m2eclipse的时候装完后创建项目的时候报错:
Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE from any of the configured repositories.
解决方法:
步骤一:
从http://maven.oschina.net/content/groups/public/org/apache/maven/archetypes/maven-archetype-quickstart/ 下载最新版maven-archetype-quickstart-1.1.jar
步骤二:
命令行到下载目录下执行
mvn install:install-file -DgroupId=org.apache.maven.archetypes -DartifactId=maven-archetype-quickstart -Dversion=1.1 -Dpackaging=jar -Dfile=maven-archetype-quickstart-1.1.jar
重新打开发工具创建maven项目