From b736c394535b71437ddbc3033f1c49e561e5dd00 Mon Sep 17 00:00:00 2001 From: Eusebio Resende Date: Fri, 8 Sep 2023 11:03:30 -0400 Subject: [PATCH 1/2] Remove duplication of the JDBC driver jar file Keep the JDBC jar file that includes the version and remove the one without it. --- client/pkg/jdbc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/pkg/jdbc.py b/client/pkg/jdbc.py index 24abef6..53b083f 100644 --- a/client/pkg/jdbc.py +++ b/client/pkg/jdbc.py @@ -42,8 +42,9 @@ def download(self): self.setversion(mvn.version) - self._jar = Artifact(self.name, 'nuodbjdbc.jar', - '{}/{}/{}'.format(mvn.baseurl, mvn.version, self.__JAR.format(mvn.version))) + jar_name = self.__JAR.format(mvn.version) + self._jar = Artifact(self.name, jar_name, + '{}/{}/{}'.format(mvn.baseurl, mvn.version, jar_name)) # We only download the actual jar file self._jar.update() @@ -55,7 +56,6 @@ def unpack(self): savefile(os.path.join(self.pkgroot, 'LICENSE.txt'), self.getlicense('3BSD')) def install(self): - self.stage.stage('jar', ['nuodbjdbc.jar']) self.stage.stage('doc', ['LICENSE.txt']) nuodb = self.get_package('nuodb') From 3004ed9de651c769a0288c8134c4e9504249f815 Mon Sep 17 00:00:00 2001 From: Eusebio Resende Date: Fri, 8 Sep 2023 11:28:48 -0400 Subject: [PATCH 2/2] Make sure to add the correct JDBC driver When building the client package, there will be two versions of the JDBC driver: one from the jdbc package and another from the migrator tool which might be different from the latest JDBC driver available. --- client/pkg/jdbc.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/client/pkg/jdbc.py b/client/pkg/jdbc.py index 53b083f..c7163d1 100644 --- a/client/pkg/jdbc.py +++ b/client/pkg/jdbc.py @@ -22,6 +22,7 @@ class JDBCPackage(Package): def __init__(self): super(JDBCPackage, self).__init__(self.__PKGNAME) self._jar = None + self._jar_name = None self.staged = [Stage('nuodbjdbc', title='NuoDB JDBC Driver', @@ -42,9 +43,9 @@ def download(self): self.setversion(mvn.version) - jar_name = self.__JAR.format(mvn.version) - self._jar = Artifact(self.name, jar_name, - '{}/{}/{}'.format(mvn.baseurl, mvn.version, jar_name)) + self._jar_name = self.__JAR.format(mvn.version) + self._jar = Artifact(self.name, self._jar_name, + '{}/{}/{}'.format(mvn.baseurl, mvn.version, self._jar_name)) # We only download the actual jar file self._jar.update() @@ -56,6 +57,7 @@ def unpack(self): savefile(os.path.join(self.pkgroot, 'LICENSE.txt'), self.getlicense('3BSD')) def install(self): + self.stage.stage('jar', [self._jar_name]) self.stage.stage('doc', ['LICENSE.txt']) nuodb = self.get_package('nuodb')