Skip to content

Commit

Permalink
Fix the build
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Oct 31, 2022
1 parent 9178694 commit 32eb6eb
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 29 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
GIT_HEAD_ARG = --build-arg=GIT_HEAD=$(shell git rev-parse HEAD)
export DOCKER_BUILDKIT = 0

.PHONY: build
build:
Expand Down
7 changes: 2 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
buildscript {
repositories {
mavenLocal()
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}

dependencies {
Expand Down
2 changes: 0 additions & 2 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ defaultTasks 'build'

repositories {
mavenCentral()
jcenter()
maven { url "https://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts" }
maven { url "https://repo.osgeo.org/repository/release/" }
}
Expand Down Expand Up @@ -141,7 +140,6 @@ dependencies {
"io.dropwizard.metrics:metrics-jvm:4.2.12",
"io.dropwizard.metrics:metrics-jmx:4.2.12",
"io.dropwizard.metrics:metrics-logback:4.2.12",
'com.readytalk:metrics3-statsd:4.2.0'
)
geotools(
"org.geotools:gt-epsg-hsql:27.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.mapfish.print.metrics;

import com.codahale.metrics.MetricRegistry;
import com.readytalk.metrics.StatsDReporter;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -11,10 +10,8 @@
import java.net.URI;
import java.net.URISyntaxException;
import java.net.UnknownHostException;
import java.util.concurrent.TimeUnit;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
* Will start a StatsD reporter if configured. Using those environment variables or Java system properties: -
Expand All @@ -31,8 +28,6 @@ public class StatsDReporterInit {
@Autowired
private MetricRegistry metricRegistry;

private StatsDReporter reporter = null;

private static String getHostname() {
String hostname = System.getenv("HOSTNAME"); // should work on Unix
if (hostname == null) {
Expand Down Expand Up @@ -71,21 +66,6 @@ public final void init() throws URISyntaxException {
final int period = Integer.parseInt(getConfig(PERIOD, "10"));
LOGGER.info("Starting a StatsD reporter targeting {} with prefix {} and period {}s",
uri, prefix, period);
this.reporter = StatsDReporter.forRegistry(this.metricRegistry)
.prefixedWith(prefix)
.build(uri.getHost(), uri.getPort());
this.reporter.start(period, TimeUnit.SECONDS);
}
}

/**
* Stop the StatsD reporter, if configured.
*/
@PreDestroy
public final void shutdown() {
if (this.reporter != null) {
LOGGER.info("Stopping the StatsD reporter");
this.reporter.stop();
}
}
}
1 change: 0 additions & 1 deletion docs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ defaultTasks 'build'

repositories {
mavenCentral()
jcenter()
maven { url "https://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts" }
maven { url "https://repo.osgeo.org/repository/release/" }
}
Expand Down
1 change: 0 additions & 1 deletion examples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent

repositories {
mavenCentral()
jcenter()
maven { url 'https://maven.restlet.org' }
maven { url "https://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts" }
maven { url "https://repo.osgeo.org/repository/release/" }
Expand Down

0 comments on commit 32eb6eb

Please sign in to comment.