Convert a Web project created by IntelliJ idea to a myeclipse version of a Web project

Source: Internet
Author: User

Convert the Web project created by IntelliJ idea to the MyEclipse version of the Web project, creating the following file and modifying the content:

I. Project file (note the previous ·)

<span style= "color: #888888;" ><?xml version= "1.0″encoding=" Utf-8″?><projectdescription></span><span style= "color:# ff0000; " ><name>test</name></span><span style= "color: #888888;" ><comment></comment><projects></projects><buildSpec><buildCommand>< name>org.eclipse.wst.common.project.facet.core.builder</name><arguments></arguments></ buildcommand><buildcommand><name>org.eclipse.wst.jsdt.core.javascriptvalidator</name>< Arguments></arguments></buildcommand><buildcommand><name> com.genuitec.eclipse.j2eedt.core.webclasspathbuilder</name><arguments></arguments></ Buildcommand><buildcommand><name>org.eclipse.jdt.core.javabuilder</name><arguments> </arguments></buildCommand><buildCommand><name> Com.genuitec.eclipse.j2eedt.core.j2eeprojectvalidator</name><argumEnts></arguments></buildcommand><buildcommand><name> Com.genuitec.eclipse.j2eedt.core.deploymentdescriptorvalidator</name><arguments></arguments> </buildCommand><buildCommand><name>org.eclipse.wst.validation.validationbuilder</name> <arguments></arguments></buildCommand><buildCommand><name> com.genuitec.eclipse.ast.deploy.core.deploymentbuilder</name><arguments></arguments></ Buildcommand></buildspec><natures><nature> Com.genuitec.eclipse.ast.deploy.core.deploymentnature</nature><nature> Org.eclipse.jem.workbench.javaemfnature</nature><nature>com.genuitec.eclipse.j2eedt.core.webnature </nature><nature>org.eclipse.jdt.core.javanature</nature><nature> Org.eclipse.wst.jsdt.core.jsnature</nature><nature> Org.eclipse.wst.common.project.facet.core.nature</nature><nature>org.eclipse.wst.common. Modulecore. Modulecorenature</nature></natures></projectdescription></span>

The main modification is name , which modifies the name to your specific project.

Second,. classpath

<span style= "color: #888888;" ><?xml version= "1.0″encoding=" Utf-8″?><classpath></span><span style= "color: #ff0000;" ><classpathentry kind= "src" path= "src"/></span><span style= "color: #888888;" ><classpathentry kind= "Con" path= "Org.eclipse.jdt.launching.JRE_CONTAINER"/><classpathentry kind= "con "Path=" Melibrary.com.genuitec.eclipse.j2eedt.core.MYECLIPSE_JAVAEE_6_CONTAINER "/><classpathentry kind=" Con "path=" Org.eclipse.jst.j2ee.internal.web.container "/><classpathentry kind=" con "path=" Org.eclipse.jst.j2ee.internal.module.container "/></span><span style=" color: #ff0000; " ><classpathentry kind= "Output" path= "web/web-inf/classes"/></span><span style= "color: #888888;" ></classpath></span>

The main modification is the SRC attribute and the Output property, modified to your project specific path, for example, my web element is placed under the Web, MyEclipse created by default is placed in the Webroot directory

Iii.. MyMetadata

<span style= "color: #888888;" ><?xml version= "1.0″encoding=" Utf-8″?><project-module</span><span style= "color: #ff0000;" > type= "WEB" </span><span style= "color: #888888;" ></span><span style= "color: #ff0000;" > name= "Test" </span><span style= "color: #888888;" > id= "Myeclipse.1407308101935″</span><span style=" color: #ff0000; " > context-root= "/test" </span><span style= "color: #888888;" > j2ee-spec= "6.0″</span><span style=" color: #ff0000; " > archive= "Test.war" ></span><span style= "color: #888888;" > <attributes> </span><span style= "color: #ff0000;" > <attribute name= "webrootdir" value= "web"/></span><span style= "color: #888888;" > </attributes></project-module></span> 
Modify the specific project name to correspond to your project

Iv. create a directory. Settings

The following 6 files are mainly created under this directory:

(1) org.eclipse.core.resources.prefs

#Wed 15:01:06 CST 2014eclipse.preferences.version=1encoding/<project>=utf-8

(2) org.eclipse.jdt.core.prefs

#Wed 14:55:08 CST 2014eclipse.preferences.version=1org.eclipse.jdt.core.compiler.codegen.inlinejsrbytecode= Enabledorg.eclipse.jdt.core.compiler.codegen.targetplatform=1.6org.eclipse.jdt.core.compiler.compliance= 1.6org.eclipse.jdt.core.compiler.problem.assertidentifier= errororg.eclipse.jdt.core.compiler.problem.enumidentifier=errororg.eclipse.jdt.core.compiler.source=1.6

(3) org.eclipse.wst.common.component

<span style= "color: #888888;"    ><?xml version= "1.0″encoding=" Utf-8″?><project-modules id= "Modulecoreid" project-version= "1.5.0″> </span><span style= "color: #ff0000;" ><wb-module deploy-name= "Test" ></span><span style= "color: #888888;" > </span><span style= "color: #ff0000;" ><wb-resource deploy-path= "/" source-path= "/web"/></span><span style= "color: #888888;" > </span><span style= "color: #ff0000;" ><wb-resource deploy-path= "/web-inf/classes" source-path= "/src"/></span><span style= "color:# 888888; " > </span><span style= "color: #ff0000;" > <property name= "context-root" value= "/test"/></span><span style= "color: #888888;" > </span><span style= "color: #ff0000;" ><property name= "Java-output-path" value= "/test/web/web-inf/classes"/></span><span style= "color : #888888; " > </wb-module></project-modules></spAn> 
modify the path for each path that corresponds to your project directory

(4) Org.eclipse.wst.common.project.facet.core.xml

<?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=" 3.0″/>  < Installed facet= "Wst.jsdt.web" version= "1.0″/></faceted-project>

(5) Org.eclipse.wst.jsdt.ui.superType.container

Empty directory, create this file can be;

(6) Org.eclipse.wst.jsdt.ui.superType.name

Empty directory, create this file.

After performing the above steps, you can import them using the import option of MyEclipse.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.