Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade osgi jdbc add tck #2066

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 45 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@
<azure-security-keyvault-keys.version>4.5.3</azure-security-keyvault-keys.version>
<azure-identity.version>1.7.0</azure-identity.version>
<msal.version>1.13.3</msal.version>
<org.osgi.compendium.version>5.0.0</org.osgi.compendium.version>
<osgi.jdbc.version>1.1.0</osgi.jdbc.version>
<osgi.jdbc.tck.version>8.1.0</osgi.jdbc.tck.version>
<org.eclipse.osgi.version>3.18.200</org.eclipse.osgi.version>
<bnd.version>6.3.1</bnd.version>
<antlr-runtime.version>4.9.3</antlr-runtime.version>
<com.google.code.gson.version>2.9.0</com.google.code.gson.version>
<bcprov-jdk15on.version>1.70</bcprov-jdk15on.version>
Expand Down Expand Up @@ -150,8 +153,8 @@
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.compendium</artifactId>
<version>${org.osgi.compendium.version}</version>
<artifactId>org.osgi.service.jdbc</artifactId>
<version>${osgi.jdbc.version}</version>
<scope>provided</scope>
</dependency>

Expand Down Expand Up @@ -240,6 +243,17 @@
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.test.cases.jdbc</artifactId>
<version>${osgi.jdbc.tck.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.osgi</artifactId>
<version>${org.eclipse.osgi.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<profiles>
Expand Down Expand Up @@ -509,6 +523,34 @@
</execution>
</executions>
</plugin>
<!-- Execute OSGi Compatibility Test -->
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-testing-maven-plugin</artifactId>
<version>${bnd.version}</version>
<executions>
<execution>
<id>osgi-tck-testing</id>
<goals>
<goal>testing</goal>
</goals>
<configuration>
<bndruns>
<include>tck.bndrun</include>
</bndruns>
<failOnChanges>false</failOnChanges>
<includeDependencyManagement>true</includeDependencyManagement>
<resolve>true</resolve>
<scopes>
<scope>compile</scope>
<scope>runtime</scope>
<scope>provided</scope>
<scope>test</scope>
</scopes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
6 changes: 6 additions & 0 deletions tck.bndrun
Original file line number Diff line number Diff line change
@@ -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