Skip to content

Commit d7affa8

Browse files
schaudermp911de
authored andcommitted
Add database dependencies for Relational.
The R2DBC dependencies are only found if they are defined in spring-data-relational, which is done by spring-projects/spring-data-relational#1892 Closes #97
1 parent b6455f8 commit d7affa8

File tree

3 files changed

+36
-1
lines changed

3 files changed

+36
-1
lines changed

src/main/java/org/springframework/data/release/infra/Dependencies.java

+16
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
/**
2424
* @author Mark Paluch
25+
* @author Jens Schauder
2526
*/
2627
public class Dependencies {
2728

@@ -134,6 +135,21 @@ public class Dependencies {
134135

135136
public static final Dependency MAVEN = Dependency.of("Maven Wrapper", "org.apache.maven:apache-maven");
136137

138+
public static final Dependency H2 = Dependency.of("H2 Database", "com.h2database:h2");
139+
public static final Dependency H2_R2DBC = Dependency.of("H2 R2DBC Driver", "io.r2dbc:r2dbc-h2");
140+
public static final Dependency HSQLDB = Dependency.of("HSQL Database", "org.hsqldb:hsqldb");
141+
public static final Dependency DB2_JDBC = Dependency.of("DB2 JDBC Driver", "com.ibm.db2:jcc");
142+
public static final Dependency MARIADB_JDBC = Dependency.of("MariaDB JDBC Driver", "org.mariadb.jdbc:mariadb-java-client");
143+
public static final Dependency MARIADB_R2DBC = Dependency.of("MariaDB R2DBC Driver", "rg.mariadb:r2dbc-mariadb");
144+
public static final Dependency MS_SQLSERVER_JDBC = Dependency.of("Microsoft SqlServer JDBC Driver", "com.microsoft.sqlserver:mssql-jdbc");
145+
public static final Dependency MS_SQLSERVER_R2DBC = Dependency.of("Microsoft SqlServer R2DBC Driver", "io.r2dbc:r2dbc-mssql");
146+
public static final Dependency MYSQL_JDBC = Dependency.of("MySql JDBC Driver", "mysql:mysql-connector-java");
147+
public static final Dependency MYSQL_R2DBC = Dependency.of("MySql R2DBC Driver", "io.asyncer:r2dbc-mysql");
148+
public static final Dependency POSTGRES_JDBC = Dependency.of("Postgres JDBC Driver", "org.postgresql:postgresql");
149+
public static final Dependency POSTGRES_R2DBC = Dependency.of("Postgres R2DBC Driver", "org.postgresql:r2dbc-postgresql");
150+
public static final Dependency ORACLE_JDBC = Dependency.of("Oracle JDBC Driver", "com.oracle.database.jdbc:ojdbc11");
151+
public static final Dependency ORACLE_R2DBC = Dependency.of("Oracle R2DBC Driver", "com.oracle.database.r2dbc:oracle-r2dbc");
152+
137153
static {
138154

139155
ReflectionUtils.doWithFields(Dependencies.class, field -> {

src/main/java/org/springframework/data/release/infra/DependencyOperations.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
* Operations for dependency management.
7676
*
7777
* @author Mark Paluch
78+
* @author Jens Schauder
7879
*/
7980
@Component
8081
@RequiredArgsConstructor
@@ -476,7 +477,8 @@ DependencyVersions getCurrentDependencies(SupportedProject supportedProject) {
476477
Dependency dependency = projectDependency.getDependency();
477478

478479
if (!(project == Projects.MONGO_DB && projectDependency.getProperty().equals("mongo.reactivestreams")
479-
|| project == Projects.NEO4J || project == Projects.BUILD || project == Projects.JPA)) {
480+
|| project == Projects.NEO4J || project == Projects.BUILD || project == Projects.JPA
481+
|| project == Projects.RELATIONAL)) {
480482

481483
if (it.getDependencyVersion(dependency.getArtifactId()) == null
482484
&& it.getManagedDependency(dependency.getArtifactId()) == null) {

src/main/java/org/springframework/data/release/infra/ProjectDependencies.java

+17
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
* Configuration of dependencies for a specific project.
3232
*
3333
* @author Mark Paluch
34+
* @author Jens Schauder
3435
*/
3536
public class ProjectDependencies implements Streamable<ProjectDependencies.ProjectDependency> {
3637

@@ -99,6 +100,22 @@ public class ProjectDependencies implements Streamable<ProjectDependencies.Proje
99100
ProjectDependency.ofProperty("elasticsearch-java", Dependencies.ELASTICSEARCH_REST_CLIENT));
100101

101102
config.add(Projects.LDAP, ProjectDependency.ofProperty("spring-ldap", Dependencies.SPRING_LDAP));
103+
104+
config.add(Projects.RELATIONAL, ProjectDependency.ofProperty("h2.version", Dependencies.H2));
105+
config.add(Projects.RELATIONAL, ProjectDependency.ofProperty("hsqldb.version", Dependencies.HSQLDB));
106+
config.add(Projects.RELATIONAL, ProjectDependency.ofProperty("db2.version", Dependencies.DB2_JDBC));
107+
config.add(Projects.RELATIONAL, ProjectDependency.ofProperty("mariadb-java-client.version", Dependencies.MARIADB_JDBC));
108+
config.add(Projects.RELATIONAL, ProjectDependency.ofProperty("mssql.version", Dependencies.MS_SQLSERVER_JDBC));
109+
config.add(Projects.RELATIONAL, ProjectDependency.ofProperty("mysql-connector-java.version", Dependencies.MYSQL_JDBC));
110+
config.add(Projects.RELATIONAL, ProjectDependency.ofProperty("postgresql.version", Dependencies.POSTGRES_JDBC));
111+
config.add(Projects.RELATIONAL, ProjectDependency.ofProperty("oracle.version", Dependencies.ORACLE_JDBC));
112+
113+
config.add(Projects.RELATIONAL, ProjectDependency.ofProperty("r2dbc-postgresql.version", Dependencies.POSTGRES_R2DBC));
114+
config.add(Projects.RELATIONAL, ProjectDependency.ofProperty("r2dbc-h2.version", Dependencies.H2_R2DBC));
115+
config.add(Projects.RELATIONAL, ProjectDependency.ofProperty("r2dbc-mariadb.version", Dependencies.MARIADB_R2DBC));
116+
config.add(Projects.RELATIONAL, ProjectDependency.ofProperty("r2dbc-mssql.version", Dependencies.MS_SQLSERVER_R2DBC));
117+
config.add(Projects.RELATIONAL, ProjectDependency.ofProperty("r2dbc-mysql.version", Dependencies.MYSQL_R2DBC));
118+
config.add(Projects.RELATIONAL, ProjectDependency.ofProperty("oracle-r2dbc.version", Dependencies.ORACLE_R2DBC));
102119
}
103120

104121
private final List<ProjectDependency> dependencies;

0 commit comments

Comments
 (0)