010--maven Project and MyEclipse

Source: Internet
Author: User

MAVEN projects and MYECLIPSE1, introduction

For developing Web projects, we often only need to leverage MAVEN's jar package management, create projects, test services, and package services.

For other jobs, we still need to rely on IDE tools to do this. For example: Automatic deployment and so on.

2. Maven Project converted to MyEclipse project

1. Build a Web project using maven-002maven_struts(refer to: 003--maven build project), create a standard directory structure for Web applications under MAVEN ( Reference: Web application standard directory structure under 0031--maven).

2. Create a project using the IDE-002maven_struts, enter the created project file.

  

Copy the above three folders to the MAVEN-built Web project.

3. Open the. mymetadata file:

  

The value of the red box is changed to: Src/main/webapp

4. Open the. classpath file:

  

Change the first red box to:

  <classpathentry kind= "src" path= "Src/main/java" output= "src/main/webapp/classes" including= "**/*.java"/> <  Classpathentry kind= "src" path= "src/main/resources" output= "src/main/webapp/classes" excluding= "**/*.java"/>  <classpathentry kind= "src" path= "src/main/filters" output= "src/main/webapp/classes" excluding= "**/*.java"/>  <classpathentry kind= "src" path= "src/main/assembly" output= "src/main/webapp/classes" excluding= "**/*.java"/>  <classpathentry kind= "src" path= "src/main/config" output= "src/main/webapp/classes" excluding= "**/*.java"/> <classpathentry kind= "src" path= "src/main/bin" output= "src/main/webapp/classes" excluding= "**/*.java"/> <  Classpathentry kind= "src" path= "Src/test/java" output= "src/main/webapp/test-classes" including= "**/*.java"/> <classpathentry kind= "src" path= "src/test/resources" output= "src/main/webapp/test-classes" excluding= "**/*.java "/> <classpathentry kind=" src "path=" src/test/filters "output="Src/main/webapp/test-classes" excluding= "**/*.java"/> <classpathentry kind= "src" path= "src/site" output= "src /main/webapp/site "excluding=" **/*.java "/> <classpathentry kind=" Output "path=" Target/classes "/>

  

5. MyEclipse Delete the 002maven_struts project that you built, and import the project that MAVEN builds.

010--maven Project and 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.