This is an automated email from the ASF dual-hosted git repository.
cbrisson pushed a commit to branch VELOCITY-965
in repository https://gitbox.apache.org/repos/asf/velocity-engine.git
The following commit(s) were added to refs/heads/VELOCITY-965 by this push:
new 30cfa83d Make commons-pool2 dependency optional
30cfa83d is described below
commit 30cfa83d62f86305cf88472d103d7de2d1e7c63a
Author: Claude Brisson <[email protected]>
AuthorDate: Wed Aug 28 12:09:05 2024 +0200
Make commons-pool2 dependency optional
---
velocity-engine-core/pom.xml | 2 ++
.../runtime/resource/loader/CachingDatabaseObjectsFactory.java | 8 ++++++++
2 files changed, 10 insertions(+)
diff --git a/velocity-engine-core/pom.xml b/velocity-engine-core/pom.xml
index 79458e7e..a089a1f8 100644
--- a/velocity-engine-core/pom.xml
+++ b/velocity-engine-core/pom.xml
@@ -239,6 +239,8 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
<version>2.12.0</version>
+ <scope>compile</scope>
+ <optional>true</optional>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
diff --git
a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/CachingDatabaseObjectsFactory.java
b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/CachingDatabaseObjectsFactory.java
index 57999610..86a87a40 100644
---
a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/CachingDatabaseObjectsFactory.java
+++
b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/CachingDatabaseObjectsFactory.java
@@ -18,6 +18,14 @@ import java.util.Optional;
/**
* <p>Database objects factory which will keep a single connection to be able
to cache statements preparation, by means
* of appropriate pools.</p>
+ * <p>This class requires the following optional dependency (maven syntax):</p>
+ * <pre><code>
+ * <dependency>
+ * <groupId>org.apache.commons</groupId>
+ * <artifactId>commons-pool2</artifactId>
+ * <version>2.12.0</version>
+ * </dependency>
+ * </code></pre>
* <p>To use this class, you must add the following property to the example
configuration described in
* @link{org.apache.velocity.runtime.resource.loader.DataSourceResourceLoader}
* </p>