@@ -5,6 +5,77 @@ This plugin bundles all the components of [Apache HttpComponents Client 4.5.x](h
5
5
These components can be used by other plugins as a dependency.
6
6
It allows managing library updates independently from plugins.
7
7
8
+ ## How to introduce to your plugin
9
+
10
+ ### Plugins directly depending on httpclient
11
+
12
+ Replace the dependency to ` org.apache.httpcomponents:httpclient ` with the dependency to ` apache-httpcomponents-client-4-api ` .
13
+
14
+ * Before:
15
+ ```
16
+ <dependencies>
17
+ ...
18
+ <dependency>
19
+ <groupId>org.apache.httpcomponents</groupId>
20
+ <artifactId>httpclient</artifactId>
21
+ <version>4.5</version>
22
+ </dependency>
23
+ ...
24
+ </dependencies>
25
+ ```
26
+ * After:
27
+ ```
28
+ <dependencies>
29
+ ...
30
+ <dependency>
31
+ <groupId>org.jenkins-ci.plugins</groupId>
32
+ <artifactId>apache-httpcomponents-client-4-api</artifactId>
33
+ <version>4.5.10-1.0</version>
34
+ </dependency>
35
+ ...
36
+ </dependencies>
37
+ ```
38
+
39
+ ### Plugins using libraries depending on httpclient
40
+
41
+ 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`.
42
+
43
+ * Before:
44
+ ```
45
+ <dependencies>
46
+ ...
47
+ <dependency>
48
+ <artifactId>somelibrary-using-httpclient</artifactId>
49
+ <version>1.0.0</version>
50
+ </dependency>
51
+ <dependency>
52
+ <artifactId>anotherlibrary-using-httpclient</artifactId>
53
+ <version>1.0.0</version>
54
+ </dependency>
55
+ ...
56
+ </dependencies>
57
+ ```
58
+ * After:
59
+ ```
60
+ <dependencies>
61
+ ...
62
+ <dependency>
63
+ <groupId>org.jenkins-ci.plugins</groupId>
64
+ <artifactId>apache-httpcomponents-client-4-api</artifactId>
65
+ <version>4.5.10-1.0</version>
66
+ </dependency>
67
+ <dependency>
68
+ <artifactId>somelibrary-using-httpclient</artifactId>
69
+ <version>1.0.0</version>
70
+ </dependency>
71
+ <dependency>
72
+ <artifactId>anotherlibrary-using-httpclient</artifactId>
73
+ <version>1.0.0</version>
74
+ </dependency>
75
+ ...
76
+ </dependencies>
77
+ ```
78
+
8
79
## Release Notes
9
80
10
81
See the [Changelog](CHANGELOG.md).
0 commit comments