使用IntelliJ IDEA, Maven and the jetty plugin调试web应用程序
配置Maven:
File-->setting-->Maven-->修改Maven Home Director, User setting file, Locale repostiory;
选择相应的配置就可以;
配置运行环境:
打开IntelliJ IDEA ,创建Run/Debug的配置,下拉菜单中选择"Edit configurations",点击左上角的 '+' (plus) 按钮 ,创建一个新的 "Maven" configuration.
Working directory:项目根目录
Command Line:clean jetty:run -DskipTests
Profile(separaed with space): pom.xml
运行/调试:
点击运行或者调试按钮
IntelliJ IDEA 12创建Maven管理的Java Web项目(图解)
Intellij Idea导入maven project
用Intellij Idea (version: 12U)导入maven project后,发现external libraries里没有那些jar包,一个一个的加不是要加死啊。。。google了一下,才知道Intellij里有个叫"maven projects"的tab window, 点其工具栏上的“Reimport all Maven Projects"按钮就可以导入其中的dependencies了。找不到这个tab window的话可以去菜单view->Tool Windows里找。

注意:假如是Linux系统,请不要设定repository路径在挂在盘上。