appfuse2学习 2

appfuse2与eclipeswtp整合

1 使用Struts-2 Modular建立项目
详细见《appfuse2学习 1》
  1. Under "myproject", create a new dir called pom. Copy myproject/pom.xml to myproject/pom/pom.xml.
  2. Modify myproject/pom.xml to change the artifactId to "myproject-pom".
  3. Modify core/pom.xml and web/pom.xml to change the parent pom artifactId to
    "myproject-pom" and delete the relativePath element
  4. Modify myproject/pom.xml to add the "pom" module, in addition to core and web in the modules section
  5. Modify myproject/pom/pom.xml to remove the "core" and "web" modules
  6. Run mvn install eclipse:eclipse
  7. 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"/>
  8. Preferences -> Java -> Installed JREs: Make sure default JRE is actually the JDK and not the JRE.
  9. Preferences -> Server -> Installed Runtimes: Pick an Apache -> Tomcat 5.5 server, and point it to your local installation.
  10. Import -> Existing Projects into Workspace: Point to your AppFuse project dir and import myproject-core and myproject-web.
  11. Open J2EE perspective, then Run->Run On Server (when prompted, connect it to the Tomcat server you configured previously)
  12. You may want to copy the launch configuration and then add all the properties defined in myproject/pom.xml.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值