Skip to content

Commit

Permalink
Actually add jar to rpm...
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Ullrich committed Mar 22, 2016
1 parent b16947a commit 7c5fbd2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion jmx_exporter/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ rpm:
cd "$(PWD)/rpmbuild/SOURCES/" && wget https://github.com/prometheus/jmx_exporter/archive/parent-$(VERSION).zip
cd "$(PWD)/rpmbuild/SOURCES/" && unzip parent-$(VERSION).zip
cd "$(PWD)/rpmbuild/SOURCES/jmx_exporter-parent-$(VERSION)/" && mvn clean package
cd "$(PWD)/rpmbuild/SOURCES/jmx_exporter-parent-$(VERSION)/" && cp jmx_prometheus_httpserver/target/jmx_prometheus_httpserver-$(VERSION)-jar-with-dependencies.jar ../jmx_exporter-$(VERSION)
cd "$(PWD)/rpmbuild/SOURCES/jmx_exporter-parent-$(VERSION)/" && cp jmx_prometheus_httpserver/target/jmx_prometheus_httpserver-$(VERSION)-jar-with-dependencies.jar ../jmx_exporter-$(VERSION)/jmx_exporter.jar
cd "$(PWD)/rpmbuild/SOURCES/jmx_exporter-parent-$(VERSION)/" && cp example_configs/* ../jmx_exporter-$(VERSION)/configuration
cp -Rv contrib "$(PWD)/rpmbuild/SOURCES/jmx_exporter-$(VERSION)"
cd "$(PWD)/rpmbuild/SOURCES" && tar cvfz parent-$(VERSION).tar.gz jmx_exporter-$(VERSION)
Expand Down
2 changes: 1 addition & 1 deletion jmx_exporter/contrib/jmx_exporter
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
ARGS=$@
java /usr/share/prometheus/jmx_exporter/jmx_prometheus_httpserver-0.6-SNAPSHOT-jar-with-dependencies.jar $ARGS
java /usr/share/prometheus/jmx_exporter/jmx_exporter.jar $ARGS


3 changes: 3 additions & 0 deletions jmx_exporter/contrib/jmx_exporter.spec
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ install -m 644 contrib/jmx_exporter.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/jmx_
install -m 644 contrib/jmx_exporter.yaml $RPM_BUILD_ROOT/etc/prometheus/jmx_exporter/jmx_exporter.yaml
install -m 755 contrib/jmx_exporter $RPM_BUILD_ROOT/usr/bin/jmx_exporter

install -m 755 jmx_exporter.jar $RPM_BUILD_ROOT/usr/share/prometheus/jmx_exporter/jmx_exporter.jar

install -m 644 configuration/cassandra.yml $RPM_BUILD_ROOT/etc/prometheus/jmx_exporter/examples/cassandra.yml
install -m 644 configuration/kafka-pre0-8-2.yml $RPM_BUILD_ROOT/etc/prometheus/jmx_exporter/examples/kafka-pre0-8-2.yml
install -m 644 configuration/kafka-0-8-2.yml $RPM_BUILD_ROOT/etc/prometheus/jmx_exporter/examples/kafka-0-8-2.yml
Expand All @@ -64,6 +66,7 @@ chmod 744 /var/log/prometheus
%files
%defattr(-,root,root,-)
/usr/bin/jmx_exporter
/usr/share/prometheus/jmx_exporter/jmx_exporter.jar
%config(noreplace) /etc/prometheus/jmx_exporter/jmx_exporter.yaml
/etc/init.d/jmx_exporter
%config(noreplace) /etc/sysconfig/jmx_exporter
Expand Down

0 comments on commit 7c5fbd2

Please sign in to comment.