`
knight_black_bob
  • 浏览: 823104 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

maven 安装 与配置

阅读更多

 

 

 

 

注意1MAVEN 是依赖JAVA运行环境的,故只有JAVA先安装好并配置好才能使用MAVEN

注意2:环境(win7jdk1.7.0_51

1、maven 下载,先进入该地址(http://maven.apache.org/download.cgi



 

下载下该文件。解压该文件(本人的解压路径:D:\soft\maven\apache-maven-3.3.3)。

 

2、配置windows7下的路径:

1)新增环境变量:key = MAVEN_HOMEvalue=D:\soft\maven\apache-maven-3.3.3

 


2)新增环境变量2(修改原有的变量值): key = Path, value增加(;%MAVEN_HOME%\bin;)

 



 

3、  测试安装结果: 在控制台中输入:mvn  -v

 



 

4、Eclipse中配置maven

 

1)直接在eclipse 中的preferences,eclipse中添加maven的路径



 

 

2)修改mavensettings.xml文件(D:\soft\maven\apache-maven-3.3.3\conf\setting.xml

(1)  修改本地的仓库地址




修改之后:



3)修改官服路径: 



 

注意:要修改mirrorOfcentral,意思是与官服的配置相同

 

 

 4) 修改代理

<proxy>
      <id>optional</id>
      <active>true</active>
      <protocol>http</protocol> 
      <host>proxy.xxxx</host>
      <port>8080</port>
      <nonProxyHosts>192.168.xxx.*</nonProxyHosts>
    </proxy>

 

5)修改 网络私服

 

<mirror> 
 <id>central</id>
 <mirrorOf>central</mirrorOf>
 <name>Human Readable Name for this Mirror.</name>
 <url>http://xxx.xxx.xxx.xxx:8081/nexus/content/repositories/public</url>
</mirror>

 

 

 6)修改 上传路径 

   

<profile>  
	    <id>dev</id>  
	    <repositories>  
	      <repository>  
	        <id>local-nexus</id>  
	        <url>http://xxx.xxx.xxx.xxx:8081/nexus/content/groups/public</url>  
	        <releases>  
	          <enabled>true</enabled>  
	        </releases>
	        <snapshots>  
	          <enabled>true</enabled>  
	        </snapshots>  
	      </repository>  
	    </repositories>
	  </profile>

 

 

 

 

I:\software\apache-maven-3.2.3\bin\mvn.bat

${project_loc}

eclipse:eclipse  -DdownloadSources=true

dependency:copy-dependencies -DoutputDirectory=src/main/webapp/WEB-INF/lib  -DincludeScope=runtime

source:jar install -Dmaven.test.skip=true

mvn deploy:deploy-file -DgroupId=com.cmcc.hy -DartifactId=cmcciw -Dversion=message0509 -Dpackaging=jar -Dfile=C:\Users\cmcc-B100036\Desktop\message0509.jar -Durl=http://172.23.12.234:8081/nexus/content/repositories/thirdparty/  -DrepositoryId=thirdparty

 

 

 

 

           

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

捐助开发者

在兴趣的驱动下,写一个免费的东西,有欣喜,也还有汗水,希望你喜欢我的作品,同时也能支持一下。 当然,有钱捧个钱场(右上角的爱心标志,支持支付宝和PayPal捐助),没钱捧个人场,谢谢各位。



 
 
 谢谢您的赞助,我会做的更好!

 

 

 

  • 大小: 10.6 KB
  • 大小: 29.3 KB
  • 大小: 28.3 KB
  • 大小: 28 KB
  • 大小: 48.3 KB
  • 大小: 36.4 KB
  • 大小: 40.8 KB
  • 大小: 30.9 KB
  • 大小: 36.1 KB
1
1
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics