首页 > 系统服务 > 详细

MyEclipse创建Maven工程

时间:2015-05-14 18:02:02      阅读:119      评论:0      收藏:0      [点我收藏+]

 

 

先要在MyEclipse中对Maven进行设置:

技术分享

技术分享技术分享

 

 

到此Maven对MyEclipse的支持设置完毕。

 
下面我们在MyEclipse中创建一个Maven标准的Web工程:
New --> Web Project
 
技术分享
技术分享
技术分享
 
添加Maven的标准目录:
右键单击项目名称-->New-->Source Folder
 
技术分享
 
技术分享
技术分享
技术分享
 
到此为止添加Maven的契约目录完毕。
 
右键单击项目名称-->Build Path-->Configure Build Path...
技术分享
 
技术分享
 
 
右键单击项目名称-->Maven4MyEclipse-->Update Project Configuration...
 
到此为止MyEclipse中创建的Maven工程的jdk版本更改完毕。
--------------------------------------------------------------------------------------------------
笔者这边多啰嗦一句,在用MyEclipse创建Maven工程的时候可能会碰到下面的这个问题:
CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:
maven-compiler-plugin:2.3.2 or one of its dependencies could not be resolved: Failure to transfer org.apache.maven.plugins:maven-compiler-plugin:jar:2.3.2 from http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be 
 reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not 
 transfer artifact org.apache.maven.plugins:maven-compiler-plugin:jar:2.3.2 from/to central (http://
 repo1.maven.org/maven2): No response received after 60000
【解决办法】:
技术分享
 
笔者这边多啰嗦一句,在用MyEclipse创建Maven工程的时候可能会碰到下面的这个问题:
Failure to transfer org.apache.maven.plugins:maven-war-plugin:jar:2.1.1 from http://repo1.maven.org/maven2 was 
 cached in the local repository, resolution will not be reattempted until the update interval of central has 
 elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:
maven-war-plugin:jar:2.1.1 from/to central (http://repo1.maven.org/maven2): No response received after 60000
 
【解决办法】:
 
技术分享
 
 
 
 

MyEclipse创建Maven工程

原文:http://www.cnblogs.com/yexinw/p/4503722.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!