%global version_id parent %global upstream_name client_java Name: prometheus-simpleclient-java Version: 0.6.0 Release: 1%{?dist} Summary: Prometheus JVM Client License: ASL 2.0 URL: https://github.com/prometheus/client_java/ Source0: https://github.com/prometheus/client_java/archive/%{version_id}-%{version}.tar.gz BuildArch: noarch BuildRequires: maven-local BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) %description Prometheus instrumentation library for JVM applications. %prep %setup -q -n %{upstream_name}-%{version_id}-%{version} # Remove included jar files find . -name \*.jar -print0 | xargs -0 rm # Only build the following artefacts as these are actually dependencies # of prometheus_jmxexporter # # io.prometheus:simpleclient # io.prometheus:simpleclient_hotspot # io.prometheus:simpleclient_httpserver # io.prometheus:simpleclient_common for m in simpleclient_caffeine \ simpleclient_dropwizard \ simpleclient_graphite_bridge \ simpleclient_hibernate \ simpleclient_guava \ simpleclient_log4j \ simpleclient_log4j2 \ simpleclient_logback \ simpleclient_pushgateway \ simpleclient_servlet \ simpleclient_spring_web \ simpleclient_spring_boot \ simpleclient_jetty \ simpleclient_jetty_jdk8 \ simpleclient_vertx \ benchmark; do %pom_disable_module $m done # Remove test dependencies for hotspot %pom_remove_dep io.prometheus:simpleclient_servlet simpleclient_hotspot %pom_remove_dep org.mockito:mockito-core simpleclient_hotspot %pom_remove_dep junit:junit simpleclient_hotspot %pom_remove_dep org.eclipse.jetty:jetty-servlet simpleclient_hotspot # Don't depend on obsolete sonatype-oss-parent # See: https://github.com/prometheus/client_java/pull/497 %pom_xpath_remove pom:project/pom:parent %build %mvn_build -f -j %install %mvn_install %files -f .mfiles %license LICENSE %doc NOTICE %changelog * Mon Aug 12 2019 Severin Gehwolf - 0.6.0-1 - Initial package.