使用maven在Java项目中使用AsynchttpClient
-
21-12-2019 - |
题
我正在使用Maven在Eclipse中创建Java项目。我必须使用库 asynchttpclient ( https://github.com/asynchttpclient / async-http-client )。我已经输入了此库的文件Pom.xml依赖项。我需要在包org.asynchttpclient.uri中存在的uRicomponents.uri,但我无法导入它。我做了:
import org.asynchttpclient.uri.UriComponents;
.
但我收到错误。
这是我需要的类的链接:
如何导入它?谢谢。
这是我当前的pom:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="maven.apache.org/POM/4.0.0";
xmlns:xsi="w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="maven.apache.org/POM/4.0.0 maven.apache.org/xsd/maven-4.0.0.xsd">;
<modelVersion>4.0.0</modelVersion>
...
<dependency>
<groupId>com.ning</groupId>
<artifactId>async-http-client</artifactId>
<version>1.8.12</version>
</dependency>
...
. 解决方案
它可以在1.9.0-BETA6
下的版本生成古代码码中提供
您请求的那个似乎在主分支中,尚未发布。
其他提示
见类似问题这里
"If you right-click on your project, there should be an option under "maven" to "enable dependency management". That's it."
不隶属于 StackOverflow