Skip to content

Commit 2fb5fc3

Browse files
Add Maven Project
1 parent 75fddcb commit 2fb5fc3

File tree

12 files changed

+310
-1
lines changed

12 files changed

+310
-1
lines changed

.github/dependabot.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Dependabot Config
2+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
3+
4+
version: 2
5+
updates:
6+
- package-ecosystem: "maven"
7+
directory: "/"
8+
schedule:
9+
interval: "daily"
10+
11+
- package-ecosystem: "github-actions"
12+
directory: "/"
13+
schedule:
14+
interval: "daily"

.github/release-drafter.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Extends the default ReleaseDrafter config provided in https://github.com/jenkinsci/.github
2+
_extends: .github
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Jenkins Security Scan
2+
3+
on:
4+
push:
5+
branches:
6+
- "master"
7+
pull_request:
8+
types: [ opened, synchronize, reopened ]
9+
workflow_dispatch:
10+
11+
permissions:
12+
security-events: write
13+
contents: read
14+
actions: read
15+
16+
jobs:
17+
security-scan:
18+
uses: jenkins-infra/jenkins-security-scan/.github/workflows/jenkins-security-scan.yaml@v2
19+
with:
20+
java-cache: '' # Optionally enable use of a build dependency cache. Specify 'maven' or 'gradle' as appropriate.
21+
java-version: 11 # What version of Java to set up for the build.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Automates creation of Release Drafts using Release Drafter
2+
# More Info: https://github.com/jenkinsci/.github/blob/master/.github/release-drafter.adoc
3+
name: Release Drafter
4+
5+
on:
6+
push:
7+
branches:
8+
- master
9+
tags:
10+
- '*'
11+
12+
jobs:
13+
update_release_draft:
14+
runs-on: ubuntu-latest
15+
steps:
16+
# Drafts your next Release notes as Pull Requests are merged into "master"
17+
- uses: release-drafter/release-drafter@v5
18+
with:
19+
# Publishes a new GH Release automatically once a tag gets pushed
20+
publish: startsWith(github.ref, "refs/tags")
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/target/
2+
*~
3+
.DS_Store
4+
/work/
5+
.idea
6+
*.iml
7+
.classpath
8+
.project
9+
.settings/

.mvn/extensions.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<extensions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/EXTENSIONS/1.0.0"
2+
xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd">
3+
<extension>
4+
<groupId>io.jenkins.tools.incrementals</groupId>
5+
<artifactId>git-changelist-maven-extension</artifactId>
6+
<version>1.6</version>
7+
</extension>
8+
</extensions>

.mvn/maven.config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-Pconsume-incrementals
2+
-Pmight-produce-incrementals

Jenkinsfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Builds a module using https://github.com/jenkins-infra/pipeline-library
2+
buildPlugin(configurations: [
3+
[platform: 'linux', jdk: '11'],
4+
[platform: 'windows', jdk: '11'],
5+
[platform: 'linux', jdk: '17'],
6+
[platform: 'windows', jdk: '17']
7+
])

README.adoc

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
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

README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)