The jpms-httpclient4 repository is dedicated to making the Apache HttpClient 4.x library compliant with the Java Platform Module System (JPMS). This compliance ensures that httpclient can be seamlessly integrated into modular Java applications — including applications assembled with jlink, which requires every module in the linked graph to be a real (not automatic) module — leveraging the benefits of JPMS such as improved encapsulation, security, and maintainability.
Naming note: an earlier attempt at this existed as
ikmdev/jpms-httpclient(archived, no releases published). This repository wraps the legacy Apache HttpClient 4.x line and is a fresh start using the current moditect-based wrapper template, namedjpms-httpclient4(with an explicit "4" suffix) to avoid any collision or confusion with that archived repo.
- JPMS Compliance: The library is packaged as a JPMS module, enabling better encapsulation and dependency management in Java projects.
- Ease of Use: Simple integration into projects using JPMS.
- Java 11 or higher: JPMS was introduced in Java 9, so a minimum of Java 11 is recommended for compatibility and support.
- Maven or Gradle: For dependency management and building the project.
Add the following dependency to your pom.xml:
<dependency>
<groupId>dev.ikm.jpms</groupId>
<artifactId>httpclient4</artifactId>
<version>${latest-jpms-httpclient4-version}</version>
</dependency>Add the following dependency to your build.gradle:
implementation 'dev.ikm.jpms:httpclient4:${latest-jpms-httpclient4-version}'In your module descriptor (module-info.java), declare the dependency on the jpms-httpclient4 module:
module your.module.name {
requires dev.ikm.jpms.httpclient;
}This wrapper's module-info requires the following sibling JPMS wrapper modules at runtime:
dev.ikm.jpms.httpcore(repojpms-httpcore4)dev.ikm.jpms.commons.codec(repojpms-commons-codec)dev.ikm.jpms.jcl.over.slf4j(repojpms-jcl-over-slf4j), which provides theorg.apache.commons.loggingpackage that httpclient needs
Technical and non-technical issues can be reported to the Issue Tracker.
Contributions can be submitted via pull requests. Please check the contribution guide for more details.