This plugin bundles all the components of Apache HttpComponents Client 5.x except httpclient5-win
because of the dependency on jna.
These components can be used by other plugins as a dependency. It allows managing library updates independently of plugins.
How to introduce to your plugin
Plugins directly depending on httpclient5
Replace the dependency to org.apache.httpcomponents.client5:httpclient5
with the dependency to apache-httpcomponents-client-5-api
.
Before:
<dependencies> ... <dependency> <groupId>org.apache.httpcomponents.client5</groupId> <artifactId>httpclient5</artifactId> <version>5.2.1</version> </dependency> ... </dependencies>
After:
<dependencies> ... <dependency> <groupId>org.jenkins-ci.plugins</groupId> <artifactId>apache-httpcomponents-client-5-api</artifactId> <version>5.2.1-1.0</version> </dependency> ... </dependencies>
Plugins using libraries depending on httpclient5
Add the dependency to apache-httpcomponents-client-5-api
before any of dependencies to those libraries to force maven to use httpclient5
declared by apache-httpcomponents-client-5-api
.
Before:
<dependencies> ... <dependency> <artifactId>somelibrary-using-httpclient5</artifactId> <version>1.0.0</version> </dependency> <dependency> <artifactId>anotherlibrary-using-httpclient5</artifactId> <version>1.0.0</version> </dependency> ... </dependencies>
After:
<dependencies> ... <dependency> <groupId>org.jenkins-ci.plugins</groupId> <artifactId>apache-httpcomponents-client-5-api</artifactId> <version>5.2.1-1.0</version> </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>
Versioning
Version follows the pattern of <org.apache.httpcomponents version>-<plugin version>
.
This way it is clear what upstream dependency is offered and allows patch releases for the plugin itself if required.
Release Notes
Release notes are recorded in GitHub Releases.
License
-
MIT License - Plugin codebase
-
Apache License 2.0 - Nested library