This plugin bundles all the components of Apache HttpComponents Client 4.5.x except httpclient-win because of the dependency on jna. These components can be used by other plugins as a dependency. It allows managing library updates independently from plugins.
Replace the dependency to org.apache.httpcomponents:httpclient with the dependency to apache-httpcomponents-client-4-api. Avoid version conflicts by using the Jenkins plugin BOM rather than depending on a specific version.
- Before:
<dependencies> ... <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> <version>4.5.14</version> </dependency> ... </dependencies> - After:
<dependencies> ... <dependency> <groupId>org.jenkins-ci.plugins</groupId> <artifactId>apache-httpcomponents-client-4-api</artifactId> </dependency> ... </dependencies>
Add the dependency to apache-httpcomponents-client-4-api BEFORE any of dependencies to those libraries to force maven to use httpclient declared by apache-httpcomponents-client-4-api. Avoid version conflicts by using the Jenkins plugin BOM rather than depending on a specific version.
- Before:
<dependencies> ... <dependency> <artifactId>somelibrary-using-httpclient</artifactId> <version>1.0.0</version> </dependency> <dependency> <artifactId>anotherlibrary-using-httpclient</artifactId> <version>1.0.0</version> </dependency> ... </dependencies> - After:
<dependencies> ... <dependency> <groupId>org.jenkins-ci.plugins</groupId> <artifactId>apache-httpcomponents-client-4-api</artifactId> </dependency> <dependency> <artifactId>somelibrary-using-httpclient</artifactId> <version>1.0.0</version> </dependency> <dependency> <artifactId>anotherlibrary-using-httpclient</artifactId> <version>1.0.0</version> </dependency> ... </dependencies>
See GitHub releases for current release notes. Releases before 2019 are described in the archived Changelog.
- Plugin source and documentation - MIT License
- Nested library is licensed with Apache License, Version 2.0