Skip to content

Commit 739d605

Browse files
Merge pull request #22 from ikedam/feature/JENKINS-59472_HowToIntroduce
[JENKINS-59472] Add instructions to introduce apache-httpcomponents-client-4-api
2 parents 1d73815 + 2069ae9 commit 739d605

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

README.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,77 @@ This plugin bundles all the components of [Apache HttpComponents Client 4.5.x](h
55
These components can be used by other plugins as a dependency.
66
It allows managing library updates independently from plugins.
77

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+
879
## Release Notes
980
1081
See the [Changelog](CHANGELOG.md).

0 commit comments

Comments
 (0)