西西軟件園多重安全檢測(cè)下載網(wǎng)站、值得信賴的軟件下載站!
西西首頁(yè) 電腦軟件 安卓軟件 電腦游戲 安卓游戲 排行榜 專題合集

maven3 eclipse插件

3.3.1
  • maven3 eclipse插件3.3.1
  • 軟件大小:7.8M
  • 更新時(shí)間:2015-04-27 22:59
  • 軟件語(yǔ)言:中文
  • 軟件廠商:
  • 軟件類別:國(guó)產(chǎn)軟件 / 免費(fèi)軟件 / 編程控件
  • 軟件等級(jí):4級(jí)
  • 應(yīng)用平臺(tái):WinAll, WinXP
  • 官方網(wǎng)站:http://m.elephantinaurance.com
  • 應(yīng)用備案:
好評(píng):50%
壞評(píng):50%

本類精品

軟件介紹

Maven本身提倡的一個(gè)原則是,不要使用任何外部的SNAPSHOT依賴,這里我卻在使用SNAPSHOT的Maven,未免有些諷刺的意味,因此難免有些擔(dān)心。不過,build完Nexus之后,我的擔(dān)心就消除了,使用maven3 build Nexus沒有出現(xiàn)任何問題。

Maven的安裝及初步使用

1、下載

2、將壓縮包解壓到自己的硬盤中,最好放在某個(gè)盤的根目錄下。例如將其放在D盤下。

3、配置環(huán)境變量:

MAVEN_HOME : D:\apache-maven-3.3.1
MAVEN : %MAVEN_HOME%\bin 

Path中加入 %MAVEN%;

Win +R ,輸入cmd ,進(jìn)入命令行,輸入mvn —version。成功截圖如下:

其中如果失敗,有可能是因?yàn)镴AVA_HOME 中可能多加了一個(gè);或者\(yùn)bin。導(dǎo)致無法正確找到JAVA。失敗截圖如下:

4、環(huán)境配置好了,僅僅剛剛開始,下面就該將maven插件加到你的eclipse中了。

由于現(xiàn)在各種網(wǎng)站已經(jīng)被中國(guó)墻掉了,不能進(jìn)行在線下載與安裝插件。所以只能通過云端的各種資源來代替,首先下載eclipse的maven離線安裝包。在網(wǎng)上自己搜吧。。。。。。祝君武運(yùn)亨通。

5、然后在自己的eclipse文件夾下新建兩個(gè)文件夾link,mavenplugins,(名字自己起,想著對(duì)上號(hào)就行)將離線安裝包解壓到mavenplugins中。

6、在 links 目錄下創(chuàng)建一個(gè) maven.txt(名字隨便),打開并輸入:

path=D:\adt-bundle-windows-x86_64-20140321\adt-bundle-windows-x86_64-20140321\eclipse\myplugins\maven(path為maven插件的地址,請(qǐng)?jiān)徫疫@放蕩不羈的地址長(zhǎng)度)。

7、關(guān)閉maven.txt,并將后綴名改為link。重啟你的eclipse。

8、打開Windows→Preferences便會(huì)有Maven的導(dǎo)航欄。

點(diǎn)擊Installation→add選擇你所安裝的maven的位置(并不是eclipse插件的地址呦)。

例如:D:\apache-maven-3.3.1

點(diǎn)擊User Setting→browse,添加你的settings.xml的位置。

例如:D:\apache-maven-3.3.1\conf\settings.xml

 

9、 創(chuàng)建新的項(xiàng)目File→New→other→Maven→Maven Project,各種Next后起個(gè)Group和Artifact的名字就好了。

10、下面寫個(gè)最經(jīng)典的代碼,sayHelloWorld~~~~~~~。代碼忽略吧,大概就是在App.java中函數(shù)sayHello輸出個(gè)Hello ,然后在AppTest中寫個(gè)Test驗(yàn)證sayHello函數(shù),assertEquals("Hello SPM!",result);然后右鍵AppTest →Run As運(yùn)行即可。如圖綠條表示Test通過。

而且從build輸出我就發(fā)現(xiàn)maven3的一大優(yōu)點(diǎn),build輸出更加明了:

Maven3輸出

[INFO] Building Nexus (API) 1.4.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.2:clean (default-clean) @ nexus-api ---
[INFO] Deleting directory /home/juven/workspaces/ws-nexus/nexus/nexus-api/target
[INFO]
[INFO] --- maven-resources-plugin:2.4:resources (default-resources) @ nexus-api ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/juven/workspaces/ws-nexus/nexus/nexus-api/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) @ nexus-api ---
[INFO] Compiling 191 source files to /home/juven/workspaces/ws-nexus/nexus/nexus-api/target/classes
[INFO]
[INFO] --- plexus-component-metadata:1.2.1:generate-metadata (process-classes) @ nexus-api ---
[INFO] Discovered 1 component descriptors(s)
[INFO]
[INFO] --- maven-resources-plugin:2.4:testResources (default-testResources) @ nexus-api ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/juven/workspaces/ws-nexus/nexus/nexus-api/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.0.2:testCompile (default-testCompile) @ nexus-api ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- plexus-component-metadata:1.2.1:generate-test-metadata (process-test-classes) @ nexus-api ---

離線安裝maven eclipse插件

1、在eclipse目錄下的dropins目錄下新建一個(gè)maven.link文件,文件名不受限制

2、在maven.link文件中指向maven插件:path=../myplugin/maven3

3、從新啟動(dòng)eclipse,window->首選項(xiàng),找到maven標(biāo)簽進(jìn)行設(shè)置

軟件標(biāo)簽: eclipse Maven

發(fā)表評(píng)論

昵稱:
表情: 高興 可 汗 我不要 害羞 好 下下下 送花 屎 親親
查看所有(0)條評(píng)論 > 字?jǐn)?shù): 0/500

TOP
軟件下載