This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 5e079b0a858 Fix ExampleGeneratorMain null repository variable error
(#37182)
5e079b0a858 is described below
commit 5e079b0a858cfc1ff48214e53f1ec6e985a65e7e
Author: zhan7236 <[email protected]>
AuthorDate: Sun Nov 30 11:20:09 2025 +0800
Fix ExampleGeneratorMain null repository variable error (#37182)
Add null check for repository variable in pom.ftl template using
FreeMarker's ?? operator to prevent template error when repository
property is not configured in config.yaml.
Fixes apache#36965
---
.../src/main/resources/template/pom.ftl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/examples/shardingsphere-jdbc-example-generator/src/main/resources/template/pom.ftl
b/examples/shardingsphere-jdbc-example-generator/src/main/resources/template/pom.ftl
index a5efe84dac5..c82c9deb134 100644
---
a/examples/shardingsphere-jdbc-example-generator/src/main/resources/template/pom.ftl
+++
b/examples/shardingsphere-jdbc-example-generator/src/main/resources/template/pom.ftl
@@ -38,7 +38,7 @@
<version>${r'${project.version}'}</version>
</dependency>
</#if>
- <#if mode?contains("standalone") && repository == "JDBC">
+ <#if mode?contains("standalone") && (repository?? && repository == "JDBC")>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-standalone-mode-repository-jdbc</artifactId>