|
| 1 | += Apache HttpComponents Client 5.x API Plugin for Jenkins |
| 2 | + |
| 3 | +This plugin bundles all the components of https://hc.apache.org/httpcomponents-client-5.2.x/index.html[Apache HttpComponents Client 5.2.x] except `httpclient5-win` because of the dependency on jna. |
| 4 | +These components can be used by other plugins as a dependency. |
| 5 | +It allows managing library updates independently of plugins. |
| 6 | + |
| 7 | +== How to introduce to your plugin |
| 8 | + |
| 9 | +=== Plugins directly depending on httpclient |
| 10 | + |
| 11 | +Replace the dependency to `org.apache.httpcomponents.client5:httpclient5` with the dependency to `apache-httpcomponents-client-5-api`. |
| 12 | + |
| 13 | +* Before: |
| 14 | + |
| 15 | +---- |
| 16 | +<dependencies> |
| 17 | + ... |
| 18 | + <dependency> |
| 19 | + <groupId>org.apache.httpcomponents.client5</groupId> |
| 20 | + <artifactId>httpclient5</artifactId> |
| 21 | + <version>5.2.1</version> |
| 22 | + </dependency> |
| 23 | + ... |
| 24 | +</dependencies> |
| 25 | +---- |
| 26 | + |
| 27 | +* After: |
| 28 | + |
| 29 | +---- |
| 30 | +<dependencies> |
| 31 | + ... |
| 32 | + <dependency> |
| 33 | + <groupId>org.jenkins-ci.plugins</groupId> |
| 34 | + <artifactId>apache-httpcomponents-client-5-api</artifactId> |
| 35 | + <version>5.2.1-1.0</version> |
| 36 | + </dependency> |
| 37 | + ... |
| 38 | +</dependencies> |
| 39 | +---- |
| 40 | + |
| 41 | +=== Plugins using libraries depending on httpclient |
| 42 | + |
| 43 | +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`. |
| 44 | + |
| 45 | +* Before: |
| 46 | + |
| 47 | +---- |
| 48 | +<dependencies> |
| 49 | + ... |
| 50 | + <dependency> |
| 51 | + <artifactId>somelibrary-using-httpclient5</artifactId> |
| 52 | + <version>1.0.0</version> |
| 53 | + </dependency> |
| 54 | + <dependency> |
| 55 | + <artifactId>anotherlibrary-using-httpclient5</artifactId> |
| 56 | + <version>1.0.0</version> |
| 57 | + </dependency> |
| 58 | + ... |
| 59 | +</dependencies> |
| 60 | +---- |
| 61 | + |
| 62 | +* After: |
| 63 | + |
| 64 | +---- |
| 65 | +<dependencies> |
| 66 | + ... |
| 67 | + <dependency> |
| 68 | + <groupId>org.jenkins-ci.plugins</groupId> |
| 69 | + <artifactId>apache-httpcomponents-client-5-api</artifactId> |
| 70 | + <version>5.2.1-1.0</version> |
| 71 | + </dependency> |
| 72 | + <dependency> |
| 73 | + <artifactId>somelibrary-using-httpclient</artifactId> |
| 74 | + <version>1.0.0</version> |
| 75 | + </dependency> |
| 76 | + <dependency> |
| 77 | + <artifactId>anotherlibrary-using-httpclient</artifactId> |
| 78 | + <version>1.0.0</version> |
| 79 | + </dependency> |
| 80 | + ... |
| 81 | +</dependencies> |
| 82 | +---- |
| 83 | + |
| 84 | +== Release Notes |
| 85 | + |
| 86 | +Release notes are recorded in https://github.com/jenkinsci/apache-httpcomponents-client-5-api-plugin/releases[GitHub Releases]. |
| 87 | + |
| 88 | +== License |
| 89 | + |
| 90 | +* https://opensource.org/licenses/MIT[MIT License] - Plugin codebase |
| 91 | +* https://www.apache.org/licenses/LICENSE-2.0[Apache License 2.0] - Nested library |
0 commit comments