Jetty 8.1.1.v20120215 in Eclipse with webapp (JSF + Maven)

一笑奈何 提交于 2019-12-03 11:08:29

Here is what worked for me. Find the Eclipse launch configuration for your Jetty server and open it for editing. Under classpath add all of the jars from /lib (and subdirectories), plus the /start.jar. Try running.

Actually I think the core issue is that plugin is not using the start.ini in the jetty distribution that it unpacks...if it did then it would get annotations support correctly out of the box. If I remember right the plugin constructs much of the commandline used to start the instance dynamically. I seem to remember that there was a way to modify the start.ini used in the plugin so it could be its just an old copy of that start.ini that is missing the OPTIONS line with annotations on it. If you have the ability to tweak that start.ini via the plugin make sure both the OPTIONS line is correct and that jetty-annotations.xml is being processed at the bottom of the file.

Anyway, we have added gerrit support to the git repository housing the plugin so if anyone is interested in contributing updates to the plugin I would be more then happy to review them and push out some updates to the plugin, I just don't have the time to work on that plugin much at the moment.

I suspect this is related to: https://bugs.eclipse.org/bugs/show_bug.cgi?id=338621

I faced the same issue while running Jetty Server, you need to download and add the asm-3.1.jar to the project classpath.

For some reason the jetty launcher used in eclipse ignores libraries in lib/subfolders do either, copy lib/annotations libraries to the lib/ folder or create symbolic links (linux or mac)

$ cd folder_to_jetty_installation/lib
$ for i in */*.jar; do; ln -s $i .; done
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!