diff options
author | gjoranv <gv@verizonmedia.com> | 2021-10-20 10:19:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-20 10:19:09 +0200 |
commit | 9b02489489bf59c7bf208aaba4bd07f98f884132 (patch) | |
tree | 13cecab4cbfcc929ba9fa56bb90c47ba9eee3401 | |
parent | 8f06e6da5e007dc254797efcbebf326fb59ac129 (diff) | |
parent | caf36396be34230330f41d53b6169659e09fbdf6 (diff) |
Merge pull request #19644 from vespa-engine/upgrade-velocity_take2
Upgrade from velocity:1.7 to velocity-engine-core:2.3
-rw-r--r-- | config-model/pom.xml | 2 | ||||
-rw-r--r-- | metrics-proxy/pom.xml | 9 | ||||
-rw-r--r-- | node-admin/pom.xml | 9 | ||||
-rw-r--r-- | node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/Template.java | 4 | ||||
-rw-r--r-- | parent/pom.xml | 4 |
5 files changed, 22 insertions, 6 deletions
diff --git a/config-model/pom.xml b/config-model/pom.xml index 3442a81159e..6dfc2e7740f 100644 --- a/config-model/pom.xml +++ b/config-model/pom.xml @@ -113,7 +113,7 @@ </exclusion> <exclusion> <groupId>org.apache.velocity</groupId> - <artifactId>velocity</artifactId> + <artifactId>velocity-engine-core</artifactId> </exclusion> </exclusions> </dependency> diff --git a/metrics-proxy/pom.xml b/metrics-proxy/pom.xml index 83cab8de366..6e43b6c1d62 100644 --- a/metrics-proxy/pom.xml +++ b/metrics-proxy/pom.xml @@ -108,7 +108,14 @@ </dependency> <dependency> <groupId>org.apache.velocity</groupId> - <artifactId>velocity</artifactId> + <artifactId>velocity-engine-core</artifactId> + <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 scope --> 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(); } diff --git a/parent/pom.xml b/parent/pom.xml index 72729b284c2..01c3e335693 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -699,8 +699,8 @@ </dependency> <dependency> <groupId>org.apache.velocity</groupId> - <artifactId>velocity</artifactId> - <version>1.7</version> + <artifactId>velocity-engine-core</artifactId> + <version>2.3</version> </dependency> <dependency> <groupId>org.assertj</groupId> |