1_maven 问题

1、eclipse 中关闭 maven 插件内置的 tomcat 服务器,怎样解决?

答:consle 右边的工具栏有个红色的按钮,表示服务器已经启动,如需关闭,点击红色按钮即可

2、maven 项目 debug 调试时,不会进入代码内部,怎样解决?

答:右键项目-->点击 Debug As-->点击 Debug Configurations...-->点击 Source-->点击 Add-->点击 Project,选择项目-->Debug

3、创建 maven 项目时,webapp 下如何添加 web.xml ?

答:(1)右键项目-->点击 properties-->点击 Project Facets-->去掉 "Dynamic Web Module" 前面的勾-->Apply

(2)勾选 "Dynamic Web Module",此时下面会出现一行英文 "Further configuration available...",然后点击进入;

把 Content directory 中的 WebContent 改为 src/main/webapp,然后点ok,外面的也点ok就完成了。

4、maven 内置 tomcat 不同版本运行命令?

tomcat 6:tomcat:run

tomcat 7:tomcat7:run

5、依赖范围

Compile struts2-core

编译(compile)时需要 测试时需要,,运行时需要,打包时需要

Provided jsp-api.jar servlet-api.jar

编译(compile)时需要,测试(test)时也需要 ,运行时不需要,打包时不需要

Runtime 数据库驱动包

编译时不需要,测试时需要,运行时需要,打包时需要

Test junit.jar

编译时不需要,测试时需要,运行时不需要,打包也不需要

猜你喜欢

转载自www.cnblogs.com/fanyizhan/p/10545127.html