Nexus2.6(maven私服)安装配置教程

nexus2.6.2安装教程

简言:

NexusMaven仓库管理器,目的是搭建一个本地仓库服务器,其实就是在公司局域网中设置一个可以供内部下载到maven 数据的服务器,这样的好处是节省网络资源,速度快,可以通过nexus对项目的零时版本管理,来进行模块间的依赖开发,也可以自己发布一些资源来共享。

1.安装

网址:http://www.sonatype.org/nexus/下载

下载后的文件:neus-2.6.2-01-bundle.zip随便解压到一个地方就ok。在{base}/bin/jswx下面有安装和启动nexus的脚步目录,选择对应你系统的目录。我的是windows-x86-64.

这里主要看你的jdk安装的版本,如果jdk安装的是64的那么就选择64位,如果是32就选择32为,应该是这样的。

首先安装右键点击install-nexus.bat管理员运行(记住一定是管理员运行),然后右键点击start-nexus.bat 

 下载验证是否运行正常,浏览器中输入:http://localhost:8081/nexus/,8081nexus的默认端口号。如果没有运行起来,那么你需要去查看{base}/log目录下的日志信息了。

 

 2.现在来说一下如何使用,来构建自己的局域网数据仓库。

 在页面的右上角,有log in 登陆按钮,默认的登陆用户名密码是 admin admin123


数据仓库分为三种:proxy,host,group

central  apache的数据仓库,下图是它的设置,修改dowload remote indexes true



 
项目pom.xml中添加:

   <!--配置部署的远程仓库-->

   <distributionManagement>

       <snapshotRepository>

               <id>nexus-snapshots</id>

               <name>nexus distribution snapshot repository</name>

               <url>http://192.168.248.129:8081/nexus/content/repositories/snapshots/</url>

       </snapshotRepository>

   </distributionManagement>

 修改setting.xml

<servers>

        <server>

       <id>nexus-snapshots</id>

       <username>admin</username>

       <password>admin123</password>

    </server>

</servers>

<profiles>

        <profile>

       <id>dev</id>

          <repositories>

             <repository>

                 <id>nexus</id>

                 <url>http://192.168.248.129: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://192.168.248.129: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>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值