Skip to content

jenkinsci/apache-httpcomponents-client-5-api-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Apache HttpComponents Client 5.x API Plugin for Jenkins

icon badge

apache httpcomponents client 5 api apache httpcomponents client 5 api plugin apache httpcomponents client 5 api plugin

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.

Avoid version conflicts by using the Jenkins Plugin BOM rather than depending on a specific version.

Before:

<dependencies>
  ...
  <dependency>
    <groupId>org.apache.httpcomponents.client5</groupId>
    <artifactId>httpclient5</artifactId>
    <version>5.2.1</version>
  </dependency>
  ...
</dependencies>

After:

<dependencies>
  ...
  <dependency>
    <groupId>io.jenkins.plugins</groupId>
    <artifactId>apache-httpcomponents-client-5-api</artifactId>
  </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.

Avoid version conflicts by using the Jenkins Plugin BOM rather than depending on a specific version.

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>io.jenkins.plugins</groupId>
    <artifactId>apache-httpcomponents-client-5-api</artifactId>
  </dependency>
  <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>

Versioning

Version follows the pattern of <org.apache.httpcomponents.client5 version>-<plugin version>. This way it is clear what upstream dependency is offered and allows patch releases for the plugin itself if required.

Since org.apache.httpcomponents.client5 artifacts have a release cycle that is independent from org.apache.httpcomponents.core5 artifacts, the latter are included in patch releases for this plugin.

Release Notes

Release notes are recorded in GitHub Releases.

License