summaryrefslogtreecommitdiffstats
path: root/node-admin
diff options
context:
space:
mode:
authorgjoranv <gv@verizonmedia.com>2021-10-18 12:41:52 +0200
committergjoranv <gv@verizonmedia.com>2021-10-19 16:46:30 +0200
commitcaf36396be34230330f41d53b6169659e09fbdf6 (patch)
tree5a3588eae9ea922406483d7531743902d0e94e7c /node-admin
parentf996eb3c39db4c83b856495ec64984ba7fddc344 (diff)
Upgrade from velocity:1.7 to velocity-engine-core:2.3
Diffstat (limited to 'node-admin')
-rw-r--r--node-admin/pom.xml9
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/Template.java4
2 files changed, 11 insertions, 2 deletions
diff --git a/node-admin/pom.xml b/node-admin/pom.xml
index 29bc8406b15..8fe5b2aecd1 100644
--- a/node-admin/pom.xml
+++ b/node-admin/pom.xml
@@ -73,8 +73,15 @@
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
- <artifactId>velocity</artifactId>
+ <artifactId>velocity-engine-core</artifactId>
<scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <!-- Must use the one provided by Jdisc to prevent two instances of slf4j classes. -->
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<!-- Test -->
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/Template.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/Template.java
index 26d97d06724..f0ba6272679 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/Template.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/Template.java
@@ -3,6 +3,8 @@ package com.yahoo.vespa.hosted.node.admin.task.util.file;
import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.Velocity;
+import org.apache.velocity.runtime.RuntimeConstants;
+import org.slf4j.helpers.NOPLogger;
import java.io.StringWriter;
import java.nio.file.Files;
@@ -19,7 +21,7 @@ import static com.yahoo.yolean.Exceptions.uncheck;
public class Template {
static {
- Velocity.addProperty(Velocity.RUNTIME_LOG_LOGSYSTEM_CLASS, "org.apache.velocity.runtime.log.NullLogSystem");
+ Velocity.addProperty(RuntimeConstants.RUNTIME_LOG_INSTANCE, NOPLogger.NOP_LOGGER);
Velocity.init();
}