سؤال

أقوم بإنشاء مشروع جافا باستخدام Maven في Eclipse.لا بد لي من استخدام المكتبة AsyncHttpClient (https://github.com/AsyncHttpClient/async-http-client).لقد قمت بالفعل بإدخال ملف pom.xml التابع لهذه المكتبة.أحتاج إلى فئة UriComponents الموجودة في الحزمة org.asynchttpclient.uri لكن لا يمكنني استيرادها.فعلتُ:

import org.asynchttpclient.uri.UriComponents; 

لكني حصلت على خطأ.

وهذا رابط الدرس الذي أحتاجه:

UriComponents.java

كيف يمكنني استيراده؟شكرًا.

هنا هو بومي الحالي:

<?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 تحت com.ning.http.client.uri.UriComponents

يبدو أن الشخص الذي تطلبه موجود في الفرع الرئيسي، ولم يتم إصداره بعد.

تحقق من المنتدى في https://groups.google.com/forum/#!forum/asynchttpclient

نصائح أخرى

انظر سؤال مماثل هنا "If you right-click on your project, there should be an option under "maven" to "enable dependency management". That's it."

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top