Myeclipse web項目 轉 Eclilpse web項目

 一、找到workspace目錄下的項目,打開後,裏有個.project文件,從文本編輯工具打開。

 二、 在 <natures> </natures>中加入 

  1. <nature>org.eclipse.wst.common.project.facet.core.nature</nature> 
  2.  
  3. <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> 
  4.  
  5. <nature>org.eclipse.jem.workbench.JavaEMFNature</nature> 

      在 <buildSpec> </buildSpec>中加入

  1. <buildCommand> 
  2.  
  3.        <name>org.eclipse.wst.common.project.facet.core.builder</name> 
  4.  
  5.        <arguments> 
  6.  
  7.        </arguments> 
  8.  
  9.    </buildCommand> 
  10.  
  11.    <buildCommand> 
  12.  
  13.        <name>org.eclipse.wst.validation.validationbuilder</name> 
  14.  
  15.        <arguments> 
  16.  
  17.        </arguments> 
  18.  
  19.    </buildCommand> 

三、選擇對應的項目右擊Properties->Project Facets ,然後點擊Convert to faceted from....選項,勾選Dynamic Web Module  與  Java選項,點擊Further configuration available ,編輯Content directory,注意,這裏要寫的必須與被轉化的項目下的web目錄的名稱相同,否則會出錯。eclipse下的web目錄爲WebConent,myeclipse下的web目錄爲WobRoot。然後點擊OK按扭即可。

(如 看不到  Further configuration available ,可以修改項目目錄下.settings下的org.eclipse.wst.common.component文件)

  1. <wb-resource deploy-path="/" source-path="/WebRoot" tag="defaultRootSource"/> 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章