我从github.com下载netty-socketio-demo,我不能mvn install
服务器,我收到错误
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project demo: Compilation failure: Compilation failure:
[ERROR] C:\Users\sun\git\netty-socketio-demo\server\src\main\java\com\corundumstudio\socketio\demo\NamespaceChatLauncher.java:[20,55] error: cannot find symbol
[ERROR] symbol: method sendJsonObject(ChatObject)
[ERROR] location: class BroadcastOperations
[ERROR] C:\Users\sun\git\netty-socketio-demo\server\src\main\java\com\corundumstudio\socketio\demo\NamespaceChatLauncher.java:[16,22] error: cannot find symbol
[ERROR] symbol: method addJsonObjectListener(Class<ChatObject>,<anonymous DataListener<ChatObject>>)
[ERROR] location: variable chat1namespace which type is SocketIONamespace
[ERROR] C:\Users\sun\git\netty-socketio-demo\server\src\main\java\com\corundumstudio\socketio\demo\NamespaceChatLauncher.java:[29,55] error: cannot find symbol
[ERROR] : METHOD sendJsonObject(ChatObject)
[ERROR] LOCATION: CLASS BroadcastOperations
[ERROR] C:\Users\sun\git\netty-socketio-demo\server\src\main\java\com\corundumstudio\socketio\demo\NamespaceChatLauncher.java:[25,22] error: cannot find symbol
[ERROR] -> [Help 1]
我在mvn存储库中找到了依赖项。我使用命令mvn clean install
。谢谢你的帮助。
答案 0 :(得分:0)
更改server
文件夹的pom.xml:
<dependency>
<groupId>com.corundumstudio.socketio</groupId>
<artifactId>netty-socketio</artifactId>
<version>1.7.1</version>
</dependency>
要:
<dependency>
<groupId>com.corundumstudio.socketio</groupId>
<artifactId>netty-socketio</artifactId>
<version>1.6.5</version>
</dependency>
重新运行maven