appfuse2与eclipeswtp整合
1 使用Struts-2 Modular建立项目
详细见《appfuse2学习 1》
1 使用Struts-2 Modular建立项目
详细见《appfuse2学习 1》
- Under "myproject", create a new dir called pom. Copy myproject/pom.xml to myproject/pom/pom.xml.
- Modify myproject/pom.xml to change the artifactId to "myproject-pom".
- Modify core/pom.xml and web/pom.xml to change the parent pom artifactId to
"myproject-pom" and delete the relativePath element - Modify myproject/pom.xml to add the "pom" module, in addition to core and web in the modules section
- Modify myproject/pom/pom.xml to remove the "core" and "web" modules
- Run mvn install eclipse:eclipse
- Edit myproject/web/.settings/org.eclipse.wst.common.component:
- Delete <wb-resource deploy-path="/" source-path="src/main/webapp"/>
- Add <wb-resource deploy-path="/" source-path="target/myproject-webapp-1.0-SNAPSHOT"/>
- Delete <wb-resource deploy-path="/WEB-INF/classes" source-path="src/main/resources"/>
- Edit myproject/web/.classpath
- Delete <classpathentry kind="src" path="src/main/resources" excluding="ApplicationResources_zh*.properties ... **/*.java"/>
- Add <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v5.5"/>
- Add <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
- Preferences -> Java -> Installed JREs: Make sure default JRE is actually the JDK and not the JRE.
- Preferences -> Server -> Installed Runtimes: Pick an Apache -> Tomcat 5.5 server, and point it to your local installation.
- Import -> Existing Projects into Workspace: Point to your AppFuse project dir and import myproject-core and myproject-web.
- Open J2EE perspective, then Run->Run On Server (when prompted, connect it to the Tomcat server you configured previously)
- You may want to copy the launch configuration and then add all the properties defined in myproject/pom.xml.