开始学习maven。。。。
Myeclipse6.5 下创建maven web项目.
[img]http://dl.iteye.com/upload/attachment/0073/7812/bd9ab45f-34da-3c28-a4ab-97f56ce242e3.jpg[/img]
[img]http://dl.iteye.com/upload/attachment/0073/7816/510cdd2d-784d-3606-be66-04affe4db3da.jpg[/img]
next...
继续 next...
[img]http://dl.iteye.com/upload/attachment/0073/7818/b0c3e1d9-76e3-3e8f-aae7-4a327552caa7.jpg[/img]
选择之后 next...
[img]http://dl.iteye.com/upload/attachment/0073/7822/215fd6c4-c843-3f1e-ae9d-bf8a17c630f5.jpg[/img]
Finish...
完成之后的结构如图:
[img]http://dl.iteye.com/upload/attachment/0073/7824/e02fbcb1-6de7-3d3b-923f-c225e294b96c.jpg[/img]
这个结构还是不够符合maven要求的,同时也无法再myeclipse下发布,
[img]http://dl.iteye.com/upload/attachment/0073/7828/61b3a380-77cb-369c-9374-087078472573.jpg[/img]
如上图 ,可见,无法再发布框下找到该项目。
首先,先将项目变更为可在eclipse下发布的web。
[img]http://dl.iteye.com/upload/attachment/0073/7869/3c39698f-f001-3a02-a3bb-dac22d740c65.jpg[/img]
[img]http://dl.iteye.com/upload/attachment/0073/7872/f6bdb9cb-6db6-3d67-bb7b-fa6846bc7757.jpg[/img]
变更后的项目结构如:
[img]http://dl.iteye.com/upload/attachment/0073/7885/9afde3bb-5cf5-3503-9f9d-a98d6126cf4c.jpg[/img]
这样,在eclipse下就可以发布了:
[img]http://dl.iteye.com/upload/attachment/0073/7898/8f7839cd-d9ad-39f8-9bbe-880a1747e397.jpg[/img]
但是,目前该项目是不符合maven要求的 。。。
首先,添加Source Folder。
右键单击项目 选择New。。
如图:
[img]http://dl.iteye.com/upload/attachment/0073/7902/ec2c99a4-aa38-344f-915f-09a4678477c4.jpg[/img]
选择 Source Folder
弹出 New Source Folde框。
填写Folder name :
[img]http://dl.iteye.com/upload/attachment/0073/7904/c3ffa699-d14c-3d65-8d22-76d768d9079b.jpg[/img]
同样 添加src/test/java和 src/test/resources
完成后的项目结构如:
[img]http://dl.iteye.com/upload/attachment/0073/7906/35dfd4ae-d590-3d23-98d0-4ffd44c58c86.jpg[/img]
接下来,变更项目的jre 以及 source folder 的位置,右键单击项目:
[img]http://dl.iteye.com/upload/attachment/0073/7918/cb9a7f3f-222b-398b-a55b-323548d512bc.jpg[/img]
[img]http://dl.iteye.com/upload/attachment/0073/7920/1c144af2-67ad-3adf-8714-123ad1e38697.jpg[/img]
[img]http://dl.iteye.com/upload/attachment/0073/7922/64923cb7-8eb4-3b88-8c3e-b4265c6397f5.jpg[/img]
Myeclipse6.5 下创建maven web项目.
[img]http://dl.iteye.com/upload/attachment/0073/7812/bd9ab45f-34da-3c28-a4ab-97f56ce242e3.jpg[/img]
[img]http://dl.iteye.com/upload/attachment/0073/7816/510cdd2d-784d-3606-be66-04affe4db3da.jpg[/img]
next...
继续 next...
[img]http://dl.iteye.com/upload/attachment/0073/7818/b0c3e1d9-76e3-3e8f-aae7-4a327552caa7.jpg[/img]
选择之后 next...
[img]http://dl.iteye.com/upload/attachment/0073/7822/215fd6c4-c843-3f1e-ae9d-bf8a17c630f5.jpg[/img]
Finish...
完成之后的结构如图:
[img]http://dl.iteye.com/upload/attachment/0073/7824/e02fbcb1-6de7-3d3b-923f-c225e294b96c.jpg[/img]
这个结构还是不够符合maven要求的,同时也无法再myeclipse下发布,
[img]http://dl.iteye.com/upload/attachment/0073/7828/61b3a380-77cb-369c-9374-087078472573.jpg[/img]
如上图 ,可见,无法再发布框下找到该项目。
首先,先将项目变更为可在eclipse下发布的web。
[img]http://dl.iteye.com/upload/attachment/0073/7869/3c39698f-f001-3a02-a3bb-dac22d740c65.jpg[/img]
[img]http://dl.iteye.com/upload/attachment/0073/7872/f6bdb9cb-6db6-3d67-bb7b-fa6846bc7757.jpg[/img]
变更后的项目结构如:
[img]http://dl.iteye.com/upload/attachment/0073/7885/9afde3bb-5cf5-3503-9f9d-a98d6126cf4c.jpg[/img]
这样,在eclipse下就可以发布了:
[img]http://dl.iteye.com/upload/attachment/0073/7898/8f7839cd-d9ad-39f8-9bbe-880a1747e397.jpg[/img]
但是,目前该项目是不符合maven要求的 。。。
首先,添加Source Folder。
右键单击项目 选择New。。
如图:
[img]http://dl.iteye.com/upload/attachment/0073/7902/ec2c99a4-aa38-344f-915f-09a4678477c4.jpg[/img]
选择 Source Folder
弹出 New Source Folde框。
填写Folder name :
[img]http://dl.iteye.com/upload/attachment/0073/7904/c3ffa699-d14c-3d65-8d22-76d768d9079b.jpg[/img]
同样 添加src/test/java和 src/test/resources
完成后的项目结构如:
[img]http://dl.iteye.com/upload/attachment/0073/7906/35dfd4ae-d590-3d23-98d0-4ffd44c58c86.jpg[/img]
接下来,变更项目的jre 以及 source folder 的位置,右键单击项目:
[img]http://dl.iteye.com/upload/attachment/0073/7918/cb9a7f3f-222b-398b-a55b-323548d512bc.jpg[/img]
[img]http://dl.iteye.com/upload/attachment/0073/7920/1c144af2-67ad-3adf-8714-123ad1e38697.jpg[/img]
[img]http://dl.iteye.com/upload/attachment/0073/7922/64923cb7-8eb4-3b88-8c3e-b4265c6397f5.jpg[/img]