在尝试将 maven 配置为使用最后一个 Jetty 版本(嵌入式 JETTY 9)后,我尝试使用 cometd(最后一个版本是 2.5.1),我发现它无法正常工作。
正如您在下面看到的,编译失败似乎是由于类型 9.0.0.v20130308 加上 artifactID cometd-websocket-jetty 的 2.5.1 版本。
老实说,我无法理解改进 websocket 的新 Jetty 版本怎么可能不起作用,我想我做错了什么,所以如果有人知道或已经做到了,请告诉我我该怎么做修理它。
顺便说一句,我使用 jdk 1.7.0_09。
`[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory
...\apps\business-app\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ SOKO-business ---
[INFO] Compiling 79 source files to
...\apps\business-app\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] ...\apps\business-app\src\main\java\com\igz\soko\business\Main.java:[38,12] **error: cannot access ContainerLifeCycle**
[ERROR] ...\apps\business-app\src\main\java\com\igz\soko\business\Main.java:[59,14] **error: method start in class Server cannot be applied to given types;**
[INFO] 2 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.936s
[INFO] Finished at: Thu Apr 04 16:12:19 CEST 2013
[INFO] Final Memory: 14M/177M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler- plugin:2.3.2:compile (default-compile) on project SOKO-business: Compilation failure: Compilation failure:
[ERROR] ...\bbv97\apps\business-app\src\main\java\com\igz\soko\business\Main.java: [38,12] error: cannot access ContainerLifeCycle
[ERROR] ...\bbv97\apps\business-app\src\main\java\com\igz\soko\business\Main.java: [59,14] error: method start in class Server cannot be applied to given types;`
干杯!
D