From 7f003f7cbafd1cce35919803be68d17077ad3b32 Mon Sep 17 00:00:00 2001 From: Doug Hoard Date: Fri, 6 Dec 2024 17:15:38 -0500 Subject: [PATCH] Refactored build to publish collector jar to Maven Central (#1088) --- collector/pom.xml | 132 ++++++++++++++++-- .../integration_tests/pom.xml | 25 +++- .../jmx_example_application/pom.xml | 27 +++- integration_test_suite/pom.xml | 41 +++--- jmx_prometheus_common/pom.xml | 30 +++- jmx_prometheus_javaagent/pom.xml | 29 +++- jmx_prometheus_standalone/pom.xml | 29 +++- pom.xml | 65 ++++----- 8 files changed, 278 insertions(+), 100 deletions(-) diff --git a/collector/pom.xml b/collector/pom.xml index 54f1cf16..08ed5a7c 100644 --- a/collector/pom.xml +++ b/collector/pom.xml @@ -1,18 +1,13 @@ - 4.0.0 - - - io.prometheus.jmx - parent - 1.1.0-post - + 4.0.0 + io.prometheus.jmx collector + 1.1.0 + jar Prometheus JMX Exporter - Collector - - See https://github.com/prometheus/jmx_exporter/blob/master/README.md - + See https://github.com/prometheus/jmx_exporter/blob/main/README.md https://github.com/prometheus/jmx_exporter @@ -23,11 +18,60 @@ + + + Doug Hoard + doug.hoard@gmail.com + + + Fabian Stäber + fabian@fstab.de + + + + + scm:git:git@github.com:prometheus/jmx_exporter.git + scm:git:git@github.com:prometheus/jmx_exporter.git + git@github.com:prometheus/jmx_exporter.git + HEAD + + UTF-8 UTF-8 + 1.3.4 + + + + io.prometheus + prometheus-metrics-core + ${prometheus.metrics.version} + + + io.prometheus + prometheus-metrics-model + ${prometheus.metrics.version} + + + io.prometheus + prometheus-metrics-instrumentation-jvm + ${prometheus.metrics.version} + + + io.prometheus + prometheus-metrics-exporter-httpserver + ${prometheus.metrics.version} + + + io.prometheus + prometheus-metrics-exporter-opentelemetry + ${prometheus.metrics.version} + + + + io.prometheus @@ -81,6 +125,7 @@ com.diffplug.spotless spotless-maven-plugin + 2.43.0 @@ -131,4 +176,71 @@ + + + release + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.11.1 + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.2.7 + + + sign-artifacts + verify + + sign + + + + --pinentry-mode + loopback + + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.3.1 + + + attach-sources + + jar-no-fork + + + + + + org.sonatype.central + central-publishing-maven-plugin + 0.6.0 + true + + central + false + published + + + + + + + diff --git a/integration_test_suite/integration_tests/pom.xml b/integration_test_suite/integration_tests/pom.xml index 4d04b824..d9050810 100644 --- a/integration_test_suite/integration_tests/pom.xml +++ b/integration_test_suite/integration_tests/pom.xml @@ -1,18 +1,17 @@ + 4.0.0 io.prometheus.jmx integration_test_suite - 1.1.0-post + 1.1.0 integration_tests Prometheus JMX Exporter - Integration Tests - - See https://github.com/prometheus/jmx_exporter/blob/master/README.md - + See https://github.com/prometheus/jmx_exporter/blob/main/README.md https://github.com/prometheus/jmx_exporter @@ -186,4 +185,22 @@ + + + release + + + + org.apache.maven.plugins + maven-deploy-plugin + 3.1.3 + + true + + + + + + + diff --git a/integration_test_suite/jmx_example_application/pom.xml b/integration_test_suite/jmx_example_application/pom.xml index e585042e..605e8e2a 100644 --- a/integration_test_suite/jmx_example_application/pom.xml +++ b/integration_test_suite/jmx_example_application/pom.xml @@ -1,18 +1,15 @@ - 4.0.0 + 4.0.0 io.prometheus.jmx integration_test_suite - 1.1.0-post + 1.1.0 - jmx_example_application Prometheus JMX Exporter - JMX Example Application - - See https://github.com/prometheus/jmx_exporter/blob/master/README.md - + See https://github.com/prometheus/jmx_exporter/blob/main/README.md https://github.com/prometheus/jmx_exporter @@ -141,4 +138,22 @@ + + + release + + + + org.apache.maven.plugins + maven-deploy-plugin + 3.1.3 + + true + + + + + + + diff --git a/integration_test_suite/pom.xml b/integration_test_suite/pom.xml index 04d23d3c..475a2bd0 100644 --- a/integration_test_suite/pom.xml +++ b/integration_test_suite/pom.xml @@ -1,16 +1,12 @@ - 4.0.0 + 4.0.0 io.prometheus.jmx integration_test_suite - 1.1.0-post + 1.1.0 Prometheus JMX Exporter - Integration Test Suite - - See https://github.com/prometheus/jmx_exporter/blob/master/README.md - - + See https://github.com/prometheus/jmx_exporter/blob/main/README.md https://github.com/prometheus/jmx_exporter - pom @@ -23,6 +19,7 @@ UTF-8 + UTF-8 1.3.4 @@ -34,10 +31,6 @@ - - maven-deploy-plugin - 3.1.3 - maven-shade-plugin 3.6.0 @@ -63,16 +56,10 @@ -Xbootclasspath/a:${env.JAVA_HOME}/lib/ - - org.apache.maven.plugins - maven-deploy-plugin - - true - - com.diffplug.spotless spotless-maven-plugin + 2.43.0 @@ -114,4 +101,22 @@ + + + release + + + + org.apache.maven.plugins + maven-deploy-plugin + 3.1.3 + + true + + + + + + + diff --git a/jmx_prometheus_common/pom.xml b/jmx_prometheus_common/pom.xml index 13a23de9..9fe71ec4 100644 --- a/jmx_prometheus_common/pom.xml +++ b/jmx_prometheus_common/pom.xml @@ -1,18 +1,15 @@ - 4.0.0 + 4.0.0 io.prometheus.jmx - parent - 1.1.0-post + jmx_exporter + 1.1.0 - jmx_prometheus_common Prometheus JMX Exporter - Common - - See https://github.com/prometheus/jmx_exporter/blob/master/README.md - + See https://github.com/prometheus/jmx_exporter/blob/main/README.md https://github.com/prometheus/jmx_exporter @@ -78,6 +75,7 @@ com.diffplug.spotless spotless-maven-plugin + 2.43.0 @@ -119,4 +117,22 @@ + + + release + + + + org.apache.maven.plugins + maven-deploy-plugin + 3.1.3 + + true + + + + + + + diff --git a/jmx_prometheus_javaagent/pom.xml b/jmx_prometheus_javaagent/pom.xml index 73266d74..f21fa76b 100644 --- a/jmx_prometheus_javaagent/pom.xml +++ b/jmx_prometheus_javaagent/pom.xml @@ -1,18 +1,15 @@ - 4.0.0 + 4.0.0 io.prometheus.jmx - parent - 1.1.0-post + jmx_exporter + 1.1.0 - jmx_prometheus_javaagent Prometheus JMX Exporter - Java Agent - - See https://github.com/prometheus/jmx_exporter/blob/master/README.md - + See https://github.com/prometheus/jmx_exporter/blob/main/README.md https://github.com/prometheus/jmx_exporter @@ -195,4 +192,22 @@ + + + release + + + + org.apache.maven.plugins + maven-deploy-plugin + 3.1.3 + + true + + + + + + + diff --git a/jmx_prometheus_standalone/pom.xml b/jmx_prometheus_standalone/pom.xml index 88a62a78..aa552b21 100644 --- a/jmx_prometheus_standalone/pom.xml +++ b/jmx_prometheus_standalone/pom.xml @@ -1,18 +1,15 @@ - 4.0.0 + 4.0.0 io.prometheus.jmx - parent - 1.1.0-post + jmx_exporter + 1.1.0 - jmx_prometheus_standalone Prometheus JMX Exporter - Standalone Server - - See https://github.com/prometheus/jmx_exporter/blob/master/README.md - + See https://github.com/prometheus/jmx_exporter/blob/main/README.md https://github.com/prometheus/jmx_exporter @@ -219,4 +216,22 @@ + + + release + + + + org.apache.maven.plugins + maven-deploy-plugin + 3.1.3 + + true + + + + + + + diff --git a/pom.xml b/pom.xml index e54cc276..ce8cd02f 100644 --- a/pom.xml +++ b/pom.xml @@ -1,17 +1,13 @@ - 4.0.0 + 4.0.0 io.prometheus.jmx - parent - 1.1.0-post - + jmx_exporter + 1.1.0 Prometheus JMX Exporter - - See https://github.com/prometheus/jmx_exporter/blob/master/README.md - + See https://github.com/prometheus/jmx_exporter/blob/main/README.md https://github.com/prometheus/jmx_exporter - pom @@ -24,27 +20,10 @@ UTF-8 + UTF-8 1.3.4 - - scm:git:git@github.com:prometheus/jmx_exporter.git - scm:git:git@github.com:prometheus/jmx_exporter.git - git@github.com:prometheus/jmx_exporter.git - HEAD - - - - - Fabian Stäber - fabian@fstab.de - - - Doug Hoard - doug.hoard@gmail.com - - - collector jmx_prometheus_common @@ -53,17 +32,6 @@ integration_test_suite - - - ossrh - https://oss.sonatype.org/content/repositories/snapshots - - - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - - @@ -101,10 +69,6 @@ maven-install-plugin 3.1.3 - - maven-deploy-plugin - 3.1.3 - maven-resources-plugin 3.3.1 @@ -250,6 +214,7 @@ com.diffplug.spotless spotless-maven-plugin + 2.43.0 @@ -298,4 +263,22 @@ + + + release + + + + org.apache.maven.plugins + maven-deploy-plugin + 3.1.3 + + true + + + + + + +