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