如何在intellij内运行码头? [英] How to run jetty from within intellij?

查看:171
本文介绍了如何在intellij内运行码头?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用jetty adn调试api调用并在结束点中断来启动intellij(终极版)的平针织或弹簧mvc应用程序?

How can I start up a jersey or spring mvc app from intellij (ultimate edition) using jetty adn debug an api call and break on the end point?

I不要设置配置并且必须运行$ mvnDebug jetty:run。

I don't won't to setup a config and have to run $ mvnDebug jetty:run.

我想点击一个按钮,让它从我的开始。战争项目。有任何想法吗? thx。

I'd like to click a button and have it start from my .war project. Any ideas? thx.

[假设:我安装了jetty并安装了插件....我可以使用mvnDebug jetty运行:从cmd行运行并连接来自intenllij的调试会话但是我偶尔会得到以下内容并且它们很烦人:

[assume: I have jetty installed and plugin configured....i can run with mvnDebug jetty:run from cmd line and connect with debug session from intenllij but I occasionally get the following and they are annoying:

错误:无法加载此JVM TI代理两次,请检查java命令行是否有重复的jdwp选项。
初始化VM时发生错误]

ERROR: Cannot load this JVM TI agent twice, check your java command line for duplicate jdwp options. Error occurred during initialization of VM]

推荐答案

您还可以向maven添加jetty插件:

You can also add jetty plugin to maven:

<build>
    <plugins>
        <plugin>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-maven-plugin</artifactId>
            <version>9.2.2.v20140723</version>
        </plugin>
    </plugins>
</build>

然后运行maven命令启动服务器并部署应用程序:

And then run maven command to start server and deploy application:

mvn jetty:run

这篇关于如何在intellij内运行码头?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆