首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > CVS SVN >

nexus maven svn 开发环境筹建

2012-10-21 
nexus maven svn 开发环境搭建引:闲来无事,在个人pc机上尝试了一下类似于工作中的开发环境。参考了网上各种

nexus maven svn 开发环境搭建
引:闲来无事,在个人pc机上尝试了一下类似于工作中的开发环境。
参考了网上各种版本,加以操作,最后搭建完毕,并把部署过程记录下来。
整个过程没有什么的难点,只是走一个搭建的流程。
有理解不对的地方,请指正。



1.安装 Maven
1.1 resource: url = http://maven.apache.org/download.html
eg. Down apache-maven-3.0.4-bin.zip
extract .zip to local

1.2 enviroment config
eg. My maven home path= E:\maven
add environment as below:
MAVEN_HOME=E:\maven
Make sure JAVA_HOME is already in your environment
Add Path=….. ;%MAVEN%/bin;
Finally open cmd to test mvn , you can input this command :mvn –v
If the following information appear on your screen.that indicated maven has been installed successfully.



2.安装 Eclipse Maven plugin
2.1 auto install
url =http://download.eclipse.org/technology/m2e/releases



The install time may be tens of minutes.
And then restart eclipse to check whether the m2eclipse-plugin has been installed successfully or not.

3,安装nexus 服务 version=2.1.2
3.1 offical website= http://www.sonatype.org/nexus/
   Down page= http://www.sonatype.org/nexus/go
Down url= http://www.sonatype.org/downloads/nexus-2.1.2-bundle.zip
3.2 extract .zip to local
File directory as below:





3.3 config nexus.properties
Dir = nexus-2.1.2-bundle\nexus-2.1.2\conf\nexus.properties
Config as below



3.4.1 install-nexus.bat

3.4.2 console-nexus.bat



3.5 Test url=http://127.0.0.1:8081/nexus/
If entry the homepage with no problems ,that indicate Nexus has been started successfully

3.6 login with administrator account.  Default is :username= admin / password=admin123

3.7 config Repositories
Eg. Central,Releases,Snapshots


Check “Remote Storage Location URL” and “Download Remote Indexes” configuration.


Click the right mouse button and select “Repair Index” and “Update Index”
If your network is ok and then the following picture will appear:


That indicate the index with maven repositories has been updated. And then you can search lib with nexus.

4. 整合Eclipse和Nexus

4.1 config Maven settings.xml

4.1.1 Add loical repository as below:



4.2 change eclipse setting

4.2.1 use your installed maven



4.2.2 select source xml:



4.2.3 click  “Update Settings”

4.3  create a new project to test

4.3.1 create a nomal java project or directly create a maven project
If you create a nomal java project,then convert it to a Maven project as below



4.3.2 install your project



If no problem that indicate your config is correct.

4.4 snapshot and release

4.4.1 add elements to your project pom.xml as below:



4.1.2 Then run maven command “deploy”



Run this and following information will appear:





Then open nexus home page , you can find the snapshot version.




4.1.3 deploy release version
Change the pom.xml as :




Then run deploy command as last.







5 安装svn

5.1 svn server down url=http://www.visualsvn.com/downloads/ 
Choice VisualSVN Server
One step by one step follow by windows setup information.




5.2 svn client http://tortoisesvn.net/downloads.html#
Down install software and language packs



Like this, all steps are easy and clearly

Over
thx all.





热点排行