Skip to content

Commit 52f9023

Browse files
mderevyankoaqaMikhail.Derevyanko
andauthored
Updated the publish task. Fixed issues: (#47)
1. SLF4J: Class path contains multiple SLF4J bindings 2. Question - Is this plugin available in maven repository? The result jar was optimized. Updated read me. Co-authored-by: Mikhail.Derevyanko <[email protected]>
1 parent 505d6e1 commit 52f9023

File tree

2 files changed

+40
-12
lines changed

2 files changed

+40
-12
lines changed

README.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
<img src="https://badges.frapsoft.com/os/v3/open-source.svg?v=103" width="300">
33

44
<p align="left">
5-
<img src="https://img.shields.io/github/issues/mderevyankoaqa/jmeter-influxdb2-listener-plugin?style=plastic&color=white">
6-
<img src="https://img.shields.io/github/forks/mderevyankoaqa/jmeter-influxdb2-listener-plugin?style=plastic">
7-
<img src="https://img.shields.io/github/stars/mderevyankoaqa/jmeter-influxdb2-listener-plugin?style=plastic&color=gold">
85
<img src="https://img.shields.io/github/license/mderevyankoaqa/jmeter-influxdb2-listener-plugin?style=plastic">
6+
<img src ="https://img.shields.io/github/v/release/mderevyankoaqa/jmeter-influxdb2-listener-plugin?style=plastic">
7+
<img src="https://img.shields.io/maven-central/v/io.github.mderevyankoaqa/jmeter-plugins-influxdb2-listener?style=plastic">
8+
<img src="https://img.shields.io/github/stars/mderevyankoaqa/jmeter-influxdb2-listener-plugin?style=plastic&color=gold">
9+
<img src="https://img.shields.io/github/forks/mderevyankoaqa/jmeter-influxdb2-listener-plugin?style=plastic">
10+
<br>
911
<img src="https://img.shields.io/github/repo-size/mderevyankoaqa/jmeter-influxdb2-listener-plugin?style=plastic">
1012
<img src="https://img.shields.io/github/issues/detail/age/mderevyankoaqa/jmeter-influxdb2-listener-plugin/1?style=plastic&color=purple">
1113
<img src="https://img.shields.io/github/commit-activity/m/mderevyankoaqa/jmeter-influxdb2-listener-plugin?style=plastic&color=red">
@@ -56,7 +58,18 @@ The supported versions:
5658
* The current board and plugin were tested on Grafana 8.2.3 and InfluxDB 2.0.9, JAVA 15.
5759

5860
## Maven Support
59-
Please see the latest release here https://s01.oss.sonatype.org/content/repositories/releases/io/github/mderevyankoaqa/jmeter-plugin-influxdb2-listener/maven-metadata.xml
61+
Please see the latest release here https://s01.oss.sonatype.org/content/repositories/releases/io/github/mderevyankoaqa/jmeter-plugins-influxdb2-listener/maven-metadata.xml
62+
63+
## CI/CD Support
64+
The CI/CD can be done using [jmeter-maven-plugin](https://github.com/jmeter-maven-plugin/jmeter-maven-plugin)
65+
The example of the adding plugin to the project with the plugin:
66+
67+
<configuration>
68+
<jmeterExtensions>
69+
<artifact>io.github.mderevyankoaqa:jmeter-plugins-influxdb2-listener:2.1</artifact>
70+
</jmeterExtensions>
71+
</configuration>
72+
Some notes cab be found in the article [Adding jar's to the /lib/ext directory](https://github.com/jmeter-maven-plugin/jmeter-maven-plugin/wiki/Adding-Excluding-libraries-to-from-the-classpath).
6073

6174
## Deployment
6275
* Put '`jmeter-plugin-influxdb2-listener-<version>.jar`' file from [Releases](https://github.com/mderevyankoaqa/jmeter-influxdb2-listener-plugin/releases) to `~<JmeterPath<\lib\ext`;

build.gradle

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ repositories {
2121
}
2222
}
2323

24+
2425
sourceCompatibility = 11
2526
group = 'io.github.mderevyankoaqa'
26-
version = '2.0'
27+
version = '2.1'
2728
def title = 'JMeterInfluxDB2Listener'
28-
def archiveName = 'jmeter-plugin-influxdb2-listener'
29+
def archiveName = 'jmeter-plugins-influxdb2-listener'
2930

3031

3132
// There's a bug in JMeter leaving extra metadata right now. This is a workaround.
@@ -57,19 +58,33 @@ def archiveName = 'jmeter-plugin-influxdb2-listener'
5758
}
5859

5960
jar {
60-
6161
manifest {
6262
attributes 'Implementation-Title': title,
6363
'Implementation-Version': archiveVersion,
6464
'Main-Class': 'io.github.mderevyankoaqa.influxdb2.visualizer.JMeterInfluxDBBackendListenerClient'
65-
}
65+
}
66+
67+
// Sets Classifier as sources.
68+
archiveClassifier.set("sources")
6669
}
6770

6871
shadowJar {
72+
// Removes of the useless links.
73+
minimize()
74+
// Fix of the Class path contains multiple SLF4J bindings.
75+
minimize
76+
{
77+
exclude(dependency('org.slf4j:.*:.*'))
78+
}
6979
archiveBaseName.set(archiveName)
80+
7081
manifest {
7182
inheritFrom project.tasks.jar.manifest
7283
}
84+
85+
// Removes the 'All' in Classifier to have downloadable artifact by default.
86+
archiveClassifier.set(null)
87+
7388
}
7489

7590
publishing {
@@ -117,26 +132,26 @@ publishing {
117132

118133

119134
repositories {
120-
maven {
135+
maven {
121136
name = "OSSRH"
122137

123138
url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
124139

125140
credentials {
126141
username = project.properties["ossrhUsername"]
127142
password = project.properties["ossrhPassword"]
128-
}
143+
}
129144
}
130145
}
131146
}
132147

148+
133149
signing {
134150
sign publishing.publications.mavenJava
135151
}
136152

137-
138153
javadoc {
139154
if(JavaVersion.current().isJava9Compatible()) {
140155
options.addBooleanOption('html5', true)
141156
}
142-
}
157+
}

0 commit comments

Comments
 (0)