`
ppg
  • 浏览: 16009 次
  • 来自: 上海
社区版块
存档分类
最新评论

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
# Jetty section
application-port=8081
application-host=127.0.0.1
nexus-webapp=${bundleBasedir}/nexus
nexus-webapp-context-path=/nexus

# Nexus section
nexus-work=${bundleBasedir}/../sonatype-work/nexus
runtime=${bundleBasedir}/nexus/WEB-INF
pr.encryptor.publicKeyPath=/apr/public-key.txt


3.4 start service
Eg.my os is win7 X64
Dir= E:\nexus-2.1.2-bundle\nexus-2.1.2\bin\jsw\windows-x86-64
Chick sequence 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:

<localRepository>E:/repo</localRepository>


4.1.2 add server in servers:

<servers>
    <server>
      <id>deploymentRepo</id>
      <username>repouser</username>
      <password>repopwd</password>
    </server>
    -->
	  <server>
      <id>releases</id>
      <username>admin</username>
      <password>admin123</password>
    </server>
      <server>
      <id>snapshots</id>
      <username>admin</username>
      <password>admin123</password>
    </server>
  </servers>


4.1.3 add profiles and activeProfiles:

 <profiles>
	 <profile>
       <id>dev</id>
          <repositories>
             <repository>
                 <id>nexus</id>
                 <url>http://127.0.0.1:8081/nexus/content/groups/public/</url>
                 <releases>
                    <enabled>true</enabled>
                 </releases>
                 <snapshots>
                    <enabled>true</enabled>
                 </snapshots>
              </repository>
            </repositories>           
            <pluginRepositories>
                <pluginRepository>
                    <id>nexus</id>
                    <url>http://127.0.0.1:8081/nexus/content/groups/public</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </pluginRepository>
            </pluginRepositories>
        </profile>
  </profiles>
      <activeProfiles>
        <activeProfile>dev</activeProfile>
    </activeProfiles>


4.1.4 all settings.xml like this:

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" 
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>
E:/repo
</localRepository>
  <pluginGroups>
  </pluginGroups>
  <servers>
	  <server>
      <id>releases</id>
      <username>admin</username>
      <password>admin123</password>
    </server>
      <server>
      <id>snapshots</id>
      <username>admin</username>
      <password>admin123</password>
    </server>
  </servers>
  <profiles>
	 <profile>
       <id>dev</id>
          <repositories>
             <repository>
                 <id>nexus</id>
                 <url>http://127.0.0.1:8081/nexus/content/groups/public/</url>
                 <releases>
                    <enabled>true</enabled>
                 </releases>
                 <snapshots>
                    <enabled>true</enabled>
                 </snapshots>
              </repository>
            </repositories>           
            <pluginRepositories>
                <pluginRepository>
                    <id>nexus</id>
                    <url>http://127.0.0.1:8081/nexus/content/groups/public</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </pluginRepository>
            </pluginRepositories>
        </profile>
  </profiles>
      <activeProfiles>
        <activeProfile>dev</activeProfile>
    </activeProfiles>
</settings>


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:

<distributionManagement>
  <repository>
    <id>releases</id>
    <url>http://127.0.0.1:8081/nexus/content/repositories/releases</url>
  </repository>
   <snapshotRepository>
    <id>snapshots</id>
    <url>http://127.0.0.1:8081/nexus/content/repositories/snapshots</url>
  </snapshotRepository>
</distributionManagement>


Full pom.xml may be like this:



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.





  • 大小: 6.6 KB
  • 大小: 12.9 KB
  • 大小: 18.1 KB
  • 大小: 14 KB
  • 大小: 4.3 KB
  • 大小: 31.9 KB
  • 大小: 71.3 KB
  • 大小: 4.4 KB
  • 大小: 9.7 KB
  • 大小: 25 KB
  • 大小: 27.1 KB
  • 大小: 7.5 KB
  • 大小: 7.5 KB
  • 大小: 12.1 KB
  • 大小: 32.5 KB
  • 大小: 20.7 KB
  • 大小: 24 KB
  • 大小: 10.4 KB
  • 大小: 32.9 KB
  • 大小: 3.9 KB
  • 大小: 31.2 KB
  • 大小: 9.1 KB
  • 大小: 2.8 KB
分享到:
评论

相关推荐

    持续集成环境maven+nexus+jenkins+svn搭建

    "持续集成环境搭建" 持续集成环境是软件开发过程中的一个重要阶段,它通过自动化的方式来构建、测试和部署软件,从而提高软件的质量和开发效率。在这个环境中,Maven、Nexus、Jenkins 和 SVN 等工具都是不可或缺的...

    nexus+svn+jenkin_hudson+maven+禅道项目管理软件环境搭建一

    在IT行业中,构建一个高效的软件开发环境是至关重要的。本篇将详细讲解如何结合Nexus、SVN、Jenkins(Hudson)、Maven以及禅道这五款工具,搭建一个适用于敏捷开发流程和持续集成理念的环境。这个环境能够极大地提升...

    nexus+svn+jenkin_hudson+maven+禅道项目管理软件环境搭建二

    通过以上步骤,我们能够构建出一个完善的IT开发环境,实现从代码开发、版本控制、持续集成到项目管理的全链条自动化。这种环境有助于提升开发效率,减少错误,提高团队协作水平,是现代软件开发的最佳实践之一。

    Eclipse-Maven-SVN环境配置

    在IT行业中,集成开发环境(IDE)如Eclipse,构建工具如Maven,以及版本控制系统如SVN,是软件开发中的重要组成部分。本教程将详细阐述如何配置Eclipse以支持Maven和SVN,以便进行高效、规范化的项目管理。 **一、...

    持续集成环境maven+nexus+jenkins+svn搭建[整理].pdf

    本篇文档主要介绍了如何利用Maven、Nexus、Jenkins和SVN搭建一个持续集成环境。 1. Maven安装: Maven是Java项目管理工具,它处理项目的构建、依赖管理和文档生成。要在本地安装Maven,首先需要从Apache Maven官网...

    使用Maven+Nexus+Jenkins+Svn+Tomcat+Sonar搭建持续集成环境

    本篇将详细介绍如何利用Maven、Nexus、Jenkins、Svn、Tomcat和Sonar搭建一个完整的持续集成环境。 首先,Maven是Java项目管理和构建工具,通过POM(Project Object Model)文件管理项目依赖关系,提供了一种标准化...

    全网最全Selenium3+Java+Maven+TestNG+ReportNG+SVN+Jenkins自动化测试环境搭建

    ### Selenium3+Java+Maven+TestNG+ReportNG+SVN+Jenkins自动化测试环境搭建 #### Java环境搭建 **一、安装JDK1.8** - **步骤**: 下载JDK安装包并按照向导指引进行安装,直至安装完成。 **二、配置JDK环境变量** ...

    jenkins+maven+nexus+mantisBug

    【标题】"jenkins+maven+nexus+mantisBug"揭示了四个关键的IT技术领域,它们在...总之,这个集成环境利用Jenkins、Maven、Nexus和MantisBug,实现了一套完整的持续集成和缺陷管理流程,旨在提升软件开发的效率和质量。

    持续集成开发环境搭建

    ### 持续集成开发环境搭建详解 #### 一、引言 持续集成(Continuous Integration,简称CI)是一种软件开发实践,旨在频繁地(一天多次)将代码集成到共享的主干分支中,并通过自动化构建(包括编译、发布、自动化...

    Maven的简单使用

    #### Nexus私服环境搭建 搭建Nexus私服需要完成以下步骤: 1. 下载并安装Nexus服务。 2. 配置Nexus,包括设置仓库类型、镜像源等。 3. 将Nexus作为本地仓库的镜像源,以便从私服获取依赖。 #### Nexus仓库分类 ...

    jenkins持续集成环境搭建步骤

    ### Jenkins 持续集成环境搭建详解 #### Jenkins 概述 Jenkins 是一款非常流行的开源持续集成(CI)和持续部署(CD)工具,它能够帮助开发团队自动化完成软件的构建、测试以及部署过程。借助于其强大的插件生态系统...

    linux下搭建持续集成平台借鉴.pdf

    在Linux环境下搭建持续集成平台是软件开发过程中一个关键步骤,它能自动化构建、测试和部署项目,确保代码质量。以下是一份详细的指南,涵盖了从安装JDK、Maven到Nexus和Jenkins的整个过程。 一、安装JDK 1. 下载...

    dubbo开发文档

    - **IDEA**: IDEA是一款非常强大的Java集成开发环境,提供了丰富的功能支持Dubbo开发。 #### 2. Maven **2.1 Maven的概念:** Maven是一个项目管理和理解工具。它包含了一个项目对象模型(Project Object Model,...

    jenkins入门手册(持续集成服务器的安装配置和使用)

    1. **SVN环境搭建**:SVN(Subversion)是一种集中式的版本控制系统,用于代码版本管理。参考博客:[http://blog.csdn.net/qq_34021712/article/details/72765412]...

    window安装流程

    根据提供的文件信息,我们可以梳理出一个关于Windows环境下Java开发环境配置及Maven项目的构建流程的知识点...对于开发者来说,这些步骤能够帮助他们快速搭建起一个完整的开发环境,并掌握基本的构建、测试和部署流程。

    5.Jkenkins持续集成网站构建实战

    它能够监控并执行一系列构建任务,如编译代码、运行测试、打包应用以及部署到生产环境等,极大地提升了开发效率和产品质量。 在"5.Jenkins持续集成网站构建实战"中,我们将深入探讨如何利用Jenkins来搭建和管理一个...

Global site tag (gtag.js) - Google Analytics