You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2022/01/30 18:25:44 UTC
[shardingsphere] branch master updated: Support pom configuration for different frameworks (#15220)
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 75f5225 Support pom configuration for different frameworks (#15220)
75f5225 is described below
commit 75f5225eb38c207a066d596fa8ac9ccf71bbd5dc
Author: Guocheng Tang <to...@qq.com>
AuthorDate: Mon Jan 31 02:24:48 2022 +0800
Support pom configuration for different frameworks (#15220)
---
.../src/main/resources/template/pom.ftl | 57 ++++++++++++++++++++++
1 file changed, 57 insertions(+)
diff --git a/examples/shardingsphere-sample/shardingsphere-example-generator/src/main/resources/template/pom.ftl b/examples/shardingsphere-sample/shardingsphere-example-generator/src/main/resources/template/pom.ftl
index ca523ab..6de7005 100644
--- a/examples/shardingsphere-sample/shardingsphere-example-generator/src/main/resources/template/pom.ftl
+++ b/examples/shardingsphere-sample/shardingsphere-example-generator/src/main/resources/template/pom.ftl
@@ -29,10 +29,66 @@
<name>${r'${project.artifactId}'}</name>
<dependencies>
+ <#if framework=="jdbc">
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-jdbc-core</artifactId>
+ </dependency>
+ </#if>
+ <#if framework?contains("spring-namespace")>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-jdbc-core-spring-namespace</artifactId>
</dependency>
+ <#elseif framework?contains("spring-boot-starter")>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
+ </dependency>
+ </#if>
+ <#if framework?contains("jpa")>
+ <dependency>
+ <groupId>org.hibernate.javax.persistence</groupId>
+ <artifactId>hibernate-jpa-2.1-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-entitymanager</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-orm</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context-support</artifactId>
+ </dependency>
+ <#elseif framework=="spring-boot-starter-jdbc">
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot</artifactId>
+ <version>2.2.0.RELEASE</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-autoconfigure</artifactId>
+ <version>2.2.0.RELEASE</version>
+ </dependency>
+ <#elseif framework=="spring-boot-starter-mybaits">
+ <dependency>
+ <groupId>org.mybatis.spring.boot</groupId>
+ <artifactId>mybatis-spring-boot-starter</artifactId>
+ </dependency>
+ <#elseif framework=="spring-namespace-jdbc">
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ </dependency>
+ <#elseif framework=="spring-namespace-mybatis">
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
@@ -49,5 +105,6 @@
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</dependency>
+ </#if>
</dependencies>
</project>