summaryrefslogtreecommitdiffstats
path: root/vespa-http-client
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@verizonmedia.com>2019-03-22 13:34:36 +0100
committerJon Bratseth <bratseth@verizonmedia.com>2019-03-22 13:34:36 +0100
commit257007e69b3b3bc08f534b132b3b6a279bcb447a (patch)
tree485ef5ee76815c1b03f5fc2368fc99e924a575d0 /vespa-http-client
parent8583daeeef88c06a0fefa239cc4f7b07f3ea13b6 (diff)
Remove component dependency
Diffstat (limited to 'vespa-http-client')
-rw-r--r--vespa-http-client/pom.xml5
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java5
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/Vtag.java7
3 files changed, 9 insertions, 8 deletions
diff --git a/vespa-http-client/pom.xml b/vespa-http-client/pom.xml
index dbae9db01c5..6334fc0db9b 100644
--- a/vespa-http-client/pom.xml
+++ b/vespa-http-client/pom.xml
@@ -48,11 +48,6 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>com.yahoo.vespa</groupId>
- <artifactId>component</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.8.4</version>
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java
index fd228fb99c5..4468355698f 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java
@@ -3,7 +3,6 @@ package com.yahoo.vespa.http.client.core.communication;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
-import com.yahoo.component.Vtag;
import com.yahoo.vespa.http.client.config.ConnectionParams;
import com.yahoo.vespa.http.client.config.Endpoint;
import com.yahoo.vespa.http.client.config.FeedParams;
@@ -412,8 +411,8 @@ class ApacheGatewayConnection implements GatewayConnection {
clientBuilder.setConnectionManager(connMgr);
}
- clientBuilder.setUserAgent(String.format("vespa-http-client (%s)", Vtag.currentVersion.toFullString()));
- clientBuilder.setDefaultHeaders(List.of(new BasicHeader(Headers.CLIENT_VERSION, Vtag.currentVersion.toFullString())));
+ clientBuilder.setUserAgent(String.format("vespa-http-client (%s)", Vtag.currentVersion));
+ clientBuilder.setDefaultHeaders(List.of(new BasicHeader(Headers.CLIENT_VERSION, Vtag.currentVersion)));
clientBuilder.setMaxConnPerRoute(1);
clientBuilder.setMaxConnTotal(1);
clientBuilder.disableContentCompression();
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/Vtag.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/Vtag.java
new file mode 100644
index 00000000000..f21a86dfc1b
--- /dev/null
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/Vtag.java
@@ -0,0 +1,7 @@
+// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+package com.yahoo.vespa.http.client.core.communication;
+
+class Vtag {
+ static final String currentVersion = "7.0.0";
+}