myecplise新建Maven项目Filter选什么,使用myeclipse建立maven项目
myecplise新建Maven項(xiàng)目Filter選什么
使用myeclipse建立maven項(xiàng)目
- 1
- 2
- 3
- 4
- 5
- 6
- 7
maven是管理項(xiàng)目的,myeclipse是編寫代碼的。第一次寫項(xiàng)目都要配置好多東西,很麻煩,now 來(lái)看看怎樣新建一個(gè)maven項(xiàng)目。
工具/原料
- myeclipse
- maven
方法/步驟
因?yàn)榻坛淌褂玫膍aven是自己下載配置的,并沒(méi)有使用myeclipse自帶的(高版本的myeclipse自帶maven)。所以首先你要安裝了maven。maven的下載安裝可參考下面的經(jīng)驗(yàn)。
0maven的下載配置
打開(kāi)myeclipse(本經(jīng)驗(yàn)中使用的是myeclipse2014),Window-->preferences。
找到myeclipse-->maven4myeclipse,如果你要下載源碼和幫助文檔就勾選上圖中那兩個(gè)框。
在maven4myeclipse下找到installations,把自己安裝的maven添加進(jìn)來(lái)。如圖:
找到user settings。將user settings設(shè)置為maven項(xiàng)目下的cfon/settings.xml,確定。
新建一個(gè)web工程,勾選上add maven support,java version要在1.7及以上.
然后一路next,到項(xiàng)目結(jié)構(gòu)那兒,選擇maven的項(xiàng)目結(jié)構(gòu)。
如果幸運(yùn)的話,新建的項(xiàng)目沒(méi)有錯(cuò)。如果提示錯(cuò)誤:
Failure to transfer org.apache.maven:maven-artifact:pom:2.0.6 from http://repo.maven.apache.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:maven-artifact:pom:2.0.6 from/to central (http://repo.maven.apache.org/maven2): No connector available to access repository central (http://repo.maven.apache.org/maven2) of type default using the available factories pom.xml /hello line 1 Maven Configuration Problem
那樣的話,打開(kāi)Window-->preferences-->myeclipse-->maven4myeclipse--->user settings把local repository里面的地址復(fù)制。
如果你的myeclipse沒(méi)有的話,就找到:
c:\users\{你的電腦賬號(hào)}\.m2\repository (一般在這個(gè)文件夾里)。
比如我的:c:\users\long\.m2\repository?
找打repository文件及后,在里面搜索 maven*.lastupdated。把搜出來(lái)的文件都刪了。
重啟myeclipse,右鍵項(xiàng)目--->maven4myeclipse--->update project...
勾選Force Update of Snapshots/Releases,然后ok退出,如果還是錯(cuò)誤,不要著急,先等一會(huì)。如果過(guò)了一會(huì)還是有錯(cuò),那就問(wèn)度娘吧。如果解決了,記得投我一票哦。
轉(zhuǎn)載于:https://www.cnblogs.com/hendy326/p/8053928.html
總結(jié)
以上是生活随笔為你收集整理的myecplise新建Maven项目Filter选什么,使用myeclipse建立maven项目的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 【Codeforces Round #4
- 下一篇: ActiveReports 报表控件V1