From cdfb1e52dbd325a7be9b91d58c93c0edc05c3ba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20L=C3=A4ubrich?= Date: Sat, 4 Feb 2023 12:50:57 +0100 Subject: [PATCH 1/3] Move from compendium to jdbc spec artifact --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index c2e9be953..da9e65620 100644 --- a/pom.xml +++ b/pom.xml @@ -66,7 +66,7 @@ 4.5.3 1.7.0 1.13.3 - 5.0.0 + 1.1.0 4.9.3 2.9.0 1.70 @@ -150,8 +150,8 @@ org.osgi - org.osgi.compendium - ${org.osgi.compendium.version} + org.osgi.service.jdbc + ${osgi.jdbc.version} provided From 945f944b603eea6866b1ecc0aebf9d9302802d1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20L=C3=A4ubrich?= Date: Sat, 4 Feb 2023 12:56:15 +0100 Subject: [PATCH 2/3] Add the new required properties from the updated spec --- .../java/com/microsoft/sqlserver/jdbc/osgi/Activator.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/com/microsoft/sqlserver/jdbc/osgi/Activator.java b/src/main/java/com/microsoft/sqlserver/jdbc/osgi/Activator.java index 241448cad..df29400ee 100644 --- a/src/main/java/com/microsoft/sqlserver/jdbc/osgi/Activator.java +++ b/src/main/java/com/microsoft/sqlserver/jdbc/osgi/Activator.java @@ -38,6 +38,12 @@ public void start(BundleContext context) throws Exception { properties.put(DataSourceFactory.OSGI_JDBC_DRIVER_NAME, "Microsoft JDBC Driver for SQL Server"); properties.put(DataSourceFactory.OSGI_JDBC_DRIVER_VERSION, driver.getMajorVersion() + "." + driver.getMinorVersion()); + properties.put(DataSourceFactory.OSGI_JDBC_CAPABILITY, new String[] { + DataSourceFactory.OSGI_JDBC_CAPABILITY_DRIVER, + DataSourceFactory.OSGI_JDBC_CAPABILITY_DATASOURCE, + DataSourceFactory.OSGI_JDBC_CAPABILITY_CONNECTIONPOOLDATASOURCE, + DataSourceFactory.OSGI_JDBC_CAPABILITY_XADATASOURCE + }); service = context.registerService(DataSourceFactory.class, new SQLServerDataSourceFactory(), properties); SQLServerDriver.register(); } From b51405589720a5619f9a611635378983b17e84a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20L=C3=A4ubrich?= Date: Sat, 4 Feb 2023 13:56:45 +0100 Subject: [PATCH 3/3] Add the official TCK test to check the compliance of the OSGi driver --- pom.xml | 42 ++++++++++++++++++++++++++++++++++++++++++ tck.bndrun | 6 ++++++ 2 files changed, 48 insertions(+) create mode 100644 tck.bndrun diff --git a/pom.xml b/pom.xml index da9e65620..165ed980e 100644 --- a/pom.xml +++ b/pom.xml @@ -67,6 +67,9 @@ 1.7.0 1.13.3 1.1.0 + 8.1.0 + 3.18.200 + 6.3.1 4.9.3 2.9.0 1.70 @@ -240,6 +243,17 @@ ${junit.jupiter.version} test + + org.osgi + org.osgi.test.cases.jdbc + ${osgi.jdbc.tck.version} + + + org.eclipse.platform + org.eclipse.osgi + ${org.eclipse.osgi.version} + test + @@ -509,6 +523,34 @@ + + + biz.aQute.bnd + bnd-testing-maven-plugin + ${bnd.version} + + + osgi-tck-testing + + testing + + + + tck.bndrun + + false + true + true + + compile + runtime + provided + test + + + + + org.apache.maven.plugins maven-javadoc-plugin diff --git a/tck.bndrun b/tck.bndrun new file mode 100644 index 000000000..6effc2074 --- /dev/null +++ b/tck.bndrun @@ -0,0 +1,6 @@ +-runfw: org.eclipse.osgi +-tester: biz.aQute.tester.junit-platform +-runrequires: bnd.identity;id=com.microsoft.sqlserver.mssql-jdbc, \ + bnd.identity;id=org.osgi.test.cases.jdbc, \ + bnd.identity;id=junit-jupiter-engine, \ + bnd.identity;id=junit-platform-launcher \ No newline at end of file