1.maven的安装与配置。
安装完后添加到path环境变量
然后修改数据仓库的位置:修改maven安装目录的conf文件夹中的settings.xml
同时拷贝一份settings.xml到d:/maven_repository文件夹下[注意相对位置]
然后是eclipse中的配置:
1.配置maven的路径
2.设置刚才的settings文件路径
2.创建web项目
用eclipse创建一个maven项目,选择webapp,完成后有好多叉号:
2.1.修改编码
2.2.设置jre为默认的
2.3.index.jsp还是错的,修改pom.xml,添加:
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
</dependency>
--------------------------------------------------------------------------------------------------------------------------------------
3. 坐标
3.1 依赖范围
3.2 依赖传递性
3.3 依赖调节
3.4 可选依赖
3.5 定义property
3.6 查看依赖树
mvn dependency:tree
4. 仓库
4.1 仓库的分类
4.2 mvn clean install
install插件的install目标将项目的构建输出文件安装到本地仓库
4.3 配置其他仓库位置
4.4 仓库搜索服务
sonatype nexus http://repository.sonatype.org/
jarvana http://www.jarvana.com/jarvana/
mvnbrowser http://www.mvnbrowser.com
mvnrepository http://mvnrepository.com