maven配置jetty出现Cannot load implementation hint 'org.mortbay.jetty.nio.SelectChannelConnector'错误

1 篇文章 0 订阅
0 篇文章 0 订阅

错误信息如下:

 

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.611 s
[INFO] Finished at: 2014-03-21T18:17:04+08:00
[INFO] Final Memory: 8M/14M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.mortbay.jetty:jetty-maven-plugin:8.1.14.v20131031:
run (default-cli) on project assai: Unable to parse configuration of mojo 
org.mortbay.jetty:jetty-maven-plugin:8.1.14.v20131031:run for parameter connectors: 
Cannot load implementation hint 'org.mortbay.jetty.nio.SelectChannelConnector' -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginConfigurationException

pom配置为:

<plugin>
	<groupId>org.mortbay.jetty</groupId>
	<artifactId>jetty-maven-plugin</artifactId>
	<configuration>
		<webDefaultXml>${basedir}/${webapp}/src/main/resources/jetty/webdefault.xml</webDefaultXml>
		<scanIntervalSeconds>10</scanIntervalSeconds>
		<webAppConfig>
			<contextPath>/</contextPath>
		</webAppConfig>
		<connectors>
			<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
				<port>8088</port>
			</connector>
		</connectors>
	</configuration>
</plugin>

 

错误原因,不小心把version 标签删掉了委屈,结果默认用了最新版8.1.14.v20131031,从7.0.0.1beta3开始SelectChannelConnector就改到了org.eclipse.jetty.server.nio.SelectChannelConnector

<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector"> 改为 <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">一切正常微笑

后来发现配置项变动的还不少呢,官方实例有说明

<project>
	...
	<plugins>
		...
		<plugin>
			<groupId>org.mortbay.jetty</groupId>
			<artifactId>maven-jetty-plugin</artifactId>
			<configuration>
				<scanIntervalSeconds>10</scanIntervalSeconds>                                             				
                                <!-- Configure the webapp -->
				<contextPath>/biggerstrongerbetterfaster</contextPath>
				<tmpDir>target/not/necessary</tmpDir>
				<webDefaultXml>
					src/main/resources/webdefault.xml
				</webDefaultXml>
				<overrideWebXml>
					src/main/resources/override-web.xml
				</overrideWebXml>           
	                        <!-- OR, as of jetty6.1.6rc0, you can use the webAppConfig element instead --> 
				<webAppConfig>
					<contextPath>/test</contextPath> 
					<tempDirectory>
						${project.build.directory}/work
					</tempDirectory> 
					<defaultsDescriptor>
						src/main/resources/webdefault.xml
					</defaultsDescriptor> 
					<overrideDescriptor>
						src/main/resources/override-web.xml
					</overrideDescriptor> 
				</webAppConfig>           
				<!-- configure the container -->
				...			                                                      					
                            </configuration>
		</plugin>
	</plugins>
</project>



 


我说杂webDefaultXml都失效了呢微笑
 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值