`
subject
  • 浏览: 39358 次
  • 性别: Icon_minigender_1
  • 来自: 墨尔本
社区版块
存档分类
最新评论

window 下 jetty 的配置及使用

阅读更多
已经安装好的maven的环境下

在pom.xml中配置如下:

<build>

<plugin>
				<groupId>org.mortbay.jetty</groupId>
				<artifactId>jetty-maven-plugin</artifactId>
				<configuration>
					<webAppConfig>
<!-- 						<allowDuplicateFragmentNames>true</allowDuplicateFragmentNames> -->
					</webAppConfig>
					<scanIntervalSeconds>0</scanIntervalSeconds>
					<webApp>
<!-- 运行的项目名-->						<contextPath>/approval</contextPath>
<!-- jetty xml 文件-->					<defaultsDescriptor>src/main/resources/webdefault.xml</defaultsDescriptor>
						<allowDuplicateFragmentNames>true</allowDuplicateFragmentNames>
					</webApp>
					<connectors>
						<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
							<port>8085</port>
							<maxIdleTime>60000</maxIdleTime>
						</connector>
					</connectors>
				</configuration>
			</plugin>
</build>


eclipse配置
debug configuration配置:
Main
Tag -->Maven Build 下创建一个modle
Goals: clean package jetty:run
Usersettings: 指定maven仓库, ckd选择 debug output 和skip tests

Source
添加要debug项目路径

Environment
name:Maven_opts
value:-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=4001,server=y,suspend=y

Tag-->remote java application
procject : 对应上面的build
host:localhost
port: 4001 //和上面的value中 address一样
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics