2016-06-09 64 views

回答

0

的Apache Maven的下載和安裝的Java

經過文件第(https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html)在某些位置

https://maven.apache.org/download.cgi?Preferred=ftp://mirror.reverse.net/pub/apache/ 解壓

設定的路徑

go to Control Panel\All Control Panel Items\System 
go to advanced system settings->environment variables 
in system variables->add to path 
C:\Program Files\Java\jdk1.7.0_04\bin;D:\apache-maven-3.0.4\bin 



SET JAVA_HOME=C:\Program Files\Java\jdk1.7.0_04 

(in place of red fields change accordingly) 

安裝和檢查

go to D:\apache-maven-3.0.4\bin 
type mvn 
then type mvn archetype:generate 

之前,如果你是落後的代理跟隨在*步驟

now press enter to choose default option when asked choose a number or apply... 
press enter again till asked groupId 
give groupId:com.mongodb 
artifactId:Nil1234 
press enter several times till asked :Y:: 
type Y and press enter 

應顯示BUILD成功的行家

  • 代理設置到Apache的行家-3.3.9 \ conf文件夾並找到settings.xml 在任何文本編輯器中打開它 轉到如下所示的代碼塊 <可選/ ID> 真< /活性> HTTP < /協議> PROXYUSER < /用戶名> 的ProxyPass < /密碼> proxy.host.net < /主機> /端口> local.net | some.host.com </nonProxyHosts> < /代理> - >

現在取消註釋從代理的代碼...通過削減它,只需將其粘貼/代理壓腳提升 根據你的代理服務器設置現在改變 對我來說,它看起來像下面

<proxies> 
    <proxy> 
    <id>optional</id> 
    <active>true</active> 
    <protocol>http</protocol>  
    <host>authproxy.serc.iisc.ernet.in</host> 
    <port>3128</port> 
    <nonProxyHosts>local.net|some.host.com</nonProxyHosts> 
    </proxy> 
    <!-- proxy 
| Specification for one proxy, to be used in connecting to the network. 
| 

--> 
</proxies> 

現在試着運行MVN原型:產生和它應該運行和下載