Skip to main content

juneau-rest-common

juneau-rest-common ships as two sibling Maven artifacts:

ArtifactContentsApache HttpClient 4.5 dependency?
juneau-rest-commonTransport-neutral types under org.apache.juneau.http.* and org.apache.juneau.http.remote.* — annotations, lazy header beans, remote-proxy meta, transport-neutral parts, and transport-neutral response messages. Used by every juneau-rest-* module.No. Zero org.apache.httpcomponents:* on the classpath.
juneau-rest-common-classicApache HttpClient 4.5–compatible facades under org.apache.juneau.http.classic.* — BasicHeader, BasicMediaTypeHeader, BasicHttpEntity, BasicHttpResponse, response/exception classes, HeaderList, etc. (~170 types).Yes. Depends on juneau-rest-common and org.apache.httpcomponents:httpcore:4.4.16.

For transport-neutral (NG) consumers, the canonical path is juneau-rest-common alone. For code that uses any org.apache.juneau.http.classic.* facade (e.g. BasicHeader, BasicHttpResponse, HeaderList), declare juneau-rest-common-classic alone — its POM declares juneau-rest-common as a normal compile-scope dependency (no <optional>, no reduced <scope>), so juneau-rest-common is already on the compile classpath transitively:

Pulls in juneau-rest-common transitively — no need to declare it separately.

Maven
<dependency>
<groupId>org.apache.juneau</groupId>
<artifactId>juneau-rest-common-classic</artifactId>
<version>${juneau.version}</version>
</dependency>
Jarjuneau-rest-common-classic-10.0.0.jar
OSGiorg.apache.juneau.rest.server.common.classic_10.0.0.jar
LinksMaven Central · Javadocs · Source

The aggregator artifacts (juneau-rest-server, juneau-rest-client-classic, juneau-rest-mock, juneau-microservice, juneau-rest-server-springboot, juneau-shaded-rest-server, juneau-shaded-rest-client, juneau-shaded-all, juneau-distrib) already pull both modules in transitively, so most callers don't need to declare either directly.

Contents/Features​

The transport-neutral packages in juneau-rest-common:

Transport-neutral HTTP packages (no Apache HttpClient 4.5 dependency)org.apache.juneau.http - Static HttpHeaders factory facade and shared utilities.org.apache.juneau.http - Swagger-based annotations used on both server-side APIs and client-side proxy interfaces.org.apache.juneau.http.header - Lazy-resolved HTTP header beans (no Apache Header interface dependency) and the EntityTag / EntityTags value types.org.apache.juneau.http.part - HTTP query/form-data/path classes.org.apache.juneau.http.remote - @Remote / @RemoteOp / @RemoteGet / etc. proxy-interface annotations.org.apache.juneau.http.response - Transport-neutral HTTP response messages (HttpResponseMessage implementations) that mirror org.apache.http.HttpResponse semantics without the Apache HttpCore dependency.

The Apache HttpClient 4.5–compatible facades in juneau-rest-common-classic:

Apache HttpClient 4.5–compatible facadesorg.apache.juneau.http.classic - Classic HttpHeaders, HttpEntities, HttpResponses, HttpParts facades.org.apache.juneau.http.classic.entity - HTTP entity classes built on org.apache.http.HttpEntity.org.apache.juneau.http.classic.header - HTTP header classes built on org.apache.http.Header, plus HeaderList.org.apache.juneau.http.classic.part - HTTP part classes built on org.apache.http.NameValuePair.org.apache.juneau.http.classic.remote - Classic RRPC interface meta types used by the classic REST client.org.apache.juneau.http.classic.resource - HTTP resource classes (entity + headers bundle).org.apache.juneau.http.classic.response - HTTP response / exception classes built on org.apache.http.HttpResponse.

These classic APIs extend the Apache HttpComponents 4.5 libraries and are consumed by juneau-rest-server, juneau-rest-client-classic, and juneau-rest-mock (classic flavor). The canonical NG REST client built on top of juneau-rest-common is fully decoupled from Apache HttpClient.

In This Section​