dubbox2.8.4编译发布到私服(nexus)

Maven介绍:

Maven的具体介绍及安装说明可以参考:

http://wentao365.iteye.com/blog/903396

http://jingyan.baidu.com/article/295430f136e8e00c7e0050b9.html

Nexus介绍:

Nexus的具体介绍及安装说明可以参考:

http://www.oschina.net/p/nexus

http://aijezdm915.iteye.com/blog/1335025

http://www.cnblogs.com/quanyongan/archive/2013/04/24/3037589.html

下面介绍下将dubbo源码编译打包发布到远程nexus的步骤:

一、下载源码:

dubbox2.8.4的源码下载地址:进入https://github.com/dangdangdotcom/dubbox,点击Download Zip即可下载源码,下载下来为dubbox-master压缩文件,解压为dubbox-master文件夹

二、编译安装:

用CMD命令在checkout出来的dubbox目录执行mvn install -Dmaven.test.skip=true来尝试编译一下dubbo(并将dubbo的jar安装到本地maven库)

三、修改pom.xml文件

在checkout出来的dubbox目录下,修改pom.xml文件,添加如下代码:

?
1
2
3
4
5
6
7
<!-- 配置远程发布到私服,mvn deploy -->
<distributionManagement>
         <repository>
             <id>thirdparty</id>
             <url>http: //192.168.1.244:8081/nexus/content/repositories/thirdparty/</url>
         </repository>    
</distributionManagement>

 

我这是将其打包发布到第三方库下

在maven的settings.xml文件中添加:

?
1
2
3
4
5
6
7
8
9
10
11
12
<servers>
    <server>
         <id>thirdparty</id>
         <username>admin</username>
         <password>admin123</password>
     </server>
     <server>
         <id>thirdparty</id>
         <username>deployment</username>
         <password>deployment123</password>
     </server>   
</servers>

 

两个配置文件的id必须一致

四、配置第三方库

configuration的Deployment Policy设置为Allow Redeploy,否则会报错,提示权限错误

五、发布到远程私服:

dubbox官网介绍是这样的:在checkout出来的dubbox根目录执行mvn idea:idea或者mvn eclipse:eclipse,来创建IDE工程文件,其实不用这样,直接在checkout出来的dubbox根目录执行:

 

mvn deploy -Dmaven.test.skip=true

就可以完成dubbox到私服的发布。

猜你喜欢

转载自1028826685.iteye.com/blog/2292637