【dubbo学习】4.myeclipse中构建dubbo源码


   一、从myEclipse工作空间中删除工程,重新进行配置:
       【dubbo学习】4.myeclipse中构建dubbo源码

 

 二、在dubbo工程中删除myEclipse中生成的工程配置文件".project"(前面功能主要是为了下载代码,直接使用git命令或者git客户端也可以实现,这里我使用myEclipse是为了展示egit插件):


        【dubbo学习】4.myeclipse中构建dubbo源码

 三、使用maven命令编译项目需要的jar,或自动编译后生成到maven本地仓库:

        1.使用dos进入check下来的源代码目录:


          【dubbo学习】4.myeclipse中构建dubbo源码

  

        2.使用"mvn clean install -Dmaven.test.skip"命令进行编译:

          
         【dubbo学习】4.myeclipse中构建dubbo源码

 

       3.编译过程如下:

       
        【dubbo学习】4.myeclipse中构建dubbo源码

 

     4.编译完成出现“BUILD SUCCESS”,表示编译完成,如下:

      
     【dubbo学习】4.myeclipse中构建dubbo源码

 

 四、使用maven命令将工程转化成eclipse工程:

      1.使用"mvn eclipse:eclipse"命令转化工程:

     
      【dubbo学习】4.myeclipse中构建dubbo源码

 

   2.执行过程如下:

   
    【dubbo学习】4.myeclipse中构建dubbo源码

 

     3.执行完成,出现“BUILD SUCCESS”,表示编译并转化完成,如下:


     【dubbo学习】4.myeclipse中构建dubbo源码

 

  五、使用myEclipse导入全部工程:

    1.首先设置整个工程目录的编码为UTF-8:

    
    【dubbo学习】4.myeclipse中构建dubbo源码

 

  2.然后选择工程导入,步骤如下:

 
    【dubbo学习】4.myeclipse中构建dubbo源码
 
    【dubbo学习】4.myeclipse中构建dubbo源码
 
    【dubbo学习】4.myeclipse中构建dubbo源码
 
    【dubbo学习】4.myeclipse中构建dubbo源码

 

   3.导入完成,myEclipse会自动扫描代码和编译,编译完成后如下:
 
    【dubbo学习】4.myeclipse中构建dubbo源码

 

 六、解决工程错误:

  1.打开错误提示,会发现工程有2处错误:

   
   【dubbo学习】4.myeclipse中构建dubbo源码

 

  2.解决java编译版本的问题,解决完成myEclipse自定编译后,错误提示消失:


       【dubbo学习】4.myeclipse中构建dubbo源码
 

   
     【dubbo学习】4.myeclipse中构建dubbo源码
 
 
 
   【dubbo学习】4.myeclipse中构建dubbo源码

 

 3.解决dubbo标签不识别问题,引入dubbo.xsd文件,即可:

 
 
   【dubbo学习】4.myeclipse中构建dubbo源码
 
  
   【dubbo学习】4.myeclipse中构建dubbo源码
 
 
 
   【dubbo学习】4.myeclipse中构建dubbo源码
 
 

  4.clean下工程,让myEclipse再次编译下工程:

 
   【dubbo学习】4.myeclipse中构建dubbo源码

 

 5.编译完成,错误提示消失,至此全部工程配置完毕。

 
   【dubbo学习】4.myeclipse中构建dubbo源码