Maven快速搭建可debug的java web工程

前提:eclipse上已经安装Maven插件 eclipse-maven3-plugin。

web环境Build:

1. Convert to Java Dynamic Web Project

Project-->properties-->Project Facets,click "Convert to faceted from...",select the "Dynamic web modules" and "Java" option,click "Further configuration available...",modify "Content directory" set "/src/main/webapp"(Maven project web directory),select the "Generate web.xml deployment descriptor" option, then click "apply".

 

2. Modify Deployment Assembly

Project-->Properties-->Deployment Assembly-->Add-->Java Build Path Entries(Referenced Projects Classpath Entries:eclipse--helios)-->Maven Dependencies.

 

3. Config Server Apache Tomcat

Show view-->Servers-->new Server wizard-->Choose tomcat server 7.0-->Choose deploy project.

Server View-->modify project deploy directory to tomcat installtion directory(-->modify module path:options-->close "Auto reloading enabled" option)-->tomcat server-->clean

 

4. Config tomcat

Show View-->Servers-->Server options-->Publish modual contexts to separat XML files

 

5. Reset Project WebContent

可以把project目录的.settings目录删除,Project-->refresh,然后Project-->Project Facets-->Select "Java" and "Dynamic Web Module"-->Further Configuration availabe.

 

6. Maven Clean

pom.xml-->clean

pom.xml-->install

 

7. Servers-->Tomcat-->Clean

 Server-->Debug

 

Reference blog:

http://zk1878.iteye.com/blog/1222330

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值