天天看點

将MyEclipse項目導入到Eclipse

修改項目中的.project檔案(用記事本打開)

1,增加一個<buildCommand>

<buildCommand>  
    <name>org.eclipse.wst.validation.validationbuilder</name>  
    <arguments>  
    </arguments>  
</buildCommand>        

2,修改<natures> 

<natures>  
    <nature>org.eclipse.wst.common.project.facet.core.nature</nature>  
        <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>  
    <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>   
</natures>         

接着,重新整理項目工程檔案。然後,右鍵項目——>Properties——>選擇Project Facets,勾選Dynamic Web Module以及Java,在Runtime内勾選Tomcat。

修改項目中.settings檔案夾中的org.eclipse.wst.common.component檔案(将“WebContent”改成“WebRoot”)

将MyEclipse項目導入到Eclipse
<?xml version="1.0" encoding="UTF-8"?>  
<project-modules id="moduleCoreId" project-version="1.5.0">  
    <wb-module deploy-name="logistics_portal">  
        <wb-resource deploy-path="/" source-path="/WebRoot" tag="defaultRootSource"/>  
        <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>  
        <wb-resource deploy-path="/WEB-INF/classes" source-path="/test"/>  
        <property name="context-root" value="logistics_portal"/>  
        <property name="java-output-path" value="/logistics_portal/WebRoot/WEB-INF/classes"/>  
    </wb-module>  
</project-modules>       
将MyEclipse項目導入到Eclipse

另外,如果axis2隻支援到web module的2.5版本,而你的web module版本高于2.5,那麼就将.setting目錄裡的org.eclipse.wst.common.project.facet.core檔案修改成對應版本即可 

将MyEclipse項目導入到Eclipse
<?xml version="1.0" encoding="UTF-8"?>  
<faceted-project>  
  <fixed facet="wst.jsdt.web"/>  
  <installed facet="java" version="1.6"/>  
  <installed facet="jst.web" version="2.5"/>  
  <installed facet="wst.jsdt.web" version="1.0"/>  
</faceted-project>        
将MyEclipse項目導入到Eclipse

繼續閱讀