You can have either Java modules or OSGI. Please use version 2.5.2 for OSGI, or version 2.6.0 for modules support. The jars are functionally identical in other respects.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ahm, no, why should this not work? I would obviously not use both module systems at runtime, but there's no reason to not include OSGi metadata at the same time as Java Module information.
From the release notes my understanding was that 2.6.0 adds the module information and is thus compiled against Java 11.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem is the stone-aged bnd library that is used, which cannot deal with Java 11 classes/jars. The following patch creates a proper manifest just fine.
I'm not sure if the ivy.xml changes are really needed or if there are other places that need fixing - the complexity of the build system is beyond my comprehension.
diff -u build/build.xml ../Projects/hsqldb/hsqldb-svn-r6348/base/trunk/build/build.xml--- build/build.xml 2021-05-14 23:51:15.000000000 +0200+++ ../Projects/hsqldb/hsqldb-svn-r6348/base/trunk/build/build.xml 2021-06-09 00:00:41.835142400 +0200@@ -1151,9 +1151,9 @@ <sysproperty key="build.description" value="${description}"/>
<sysproperty key="hsqldb.title" value="${hsqldb.title}"/>
<arg value="wrap"/>
- <arg value="-output"/>+ <arg value="--output"/> <arg value="hsqldb-osgi.jar"/>
- <arg value="-properties"/>+ <arg value="--properties"/> <arg file="build/hsqldb.bnd"/>
<arg value="hsqldb.jar"/>
</java>
diff -u build/dependencies.gradle ../Projects/hsqldb/hsqldb-svn-r6348/base/trunk/build/dependencies.gradle--- build/dependencies.gradle 2020-11-22 22:04:40.000000000 +0100+++ ../Projects/hsqldb/hsqldb-svn-r6348/base/trunk/build/dependencies.gradle 2021-06-08 23:06:31.832688000 +0200@@ -39,6 +39,6 @@ It is also added to the XSLT CLASSPATH only to add the XInclude
settings file to the CLASSPATH. Needed by Xalan during XSLT.
*/
- bndJar('biz.aQute:bnd:0.0.384')+ bndJar('biz.aQute.bnd:biz.aQute.bnd:5.3.0') bndJar('de.jflex:jflex:1.4.3')
}
Common subdirectories: build/gradle and ../Projects/hsqldb/hsqldb-svn-r6348/base/trunk/build/gradle
diff -u build/hsqldb.bnd ../Projects/hsqldb/hsqldb-svn-r6348/base/trunk/build/hsqldb.bnd--- build/hsqldb.bnd 2011-11-14 01:08:28.000000000 +0100+++ ../Projects/hsqldb/hsqldb-svn-r6348/base/trunk/build/hsqldb.bnd 2021-06-08 23:07:15.448768200 +0200@@ -1,8 +1,11 @@# File for use by 'bnd' utility for generating OSGi Bundle descriptions.
-# http://www.aqute.biz/Code/Bnd+# https://bnd.bndtools.org/Bundle-Version: ${hsqldb.version}
Build-Vendor: ${build.vendor}
Bundle-Description: ${build.description}
Bundle-Name: ${hsqldb.title}
Bundle-SymbolicName: org.hsqldb.hsqldb
+Export-Package: *+Import-Package: *;resolution:=optional+-removeheaders: Bnd-*, Tool, Require-Capabilitydiff -u build/ivy.xml ../Projects/hsqldb/hsqldb-svn-r6348/base/trunk/build/ivy.xml--- build/ivy.xml 2011-11-03 12:40:48.000000000 +0100+++ ../Projects/hsqldb/hsqldb-svn-r6348/base/trunk/build/ivy.xml 2021-06-08 18:49:11.820026300 +0200@@ -51,7 +51,7 @@ It is also added to the XSLT CLASSPATH only to add the XInclude
settings file to the CLASSPATH. Needed by Xalan during XSLT.
-->
- <dependency name="bnd" org="biz.aQute" rev="0.0.384" conf="bndJar"/>+ <dependency name="biz.aQute.bnd" org="biz.aQute.bnd" rev="5.3.0" conf="bndJar"/> <dependency name="jflex" org="de.jflex" rev="1.4.3" conf="jflexJar"/>
</dependencies>
</ivy-module>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you very much Ingo! I will incorporate the patch and check the usage of the library.
The complexity of the Ant build is due to multiple JVM targets as well as the DocBook build which required Ivy. The Gradle part acts mainly as a user-friendly wrapper for Ant, as it doesn't require installing the build software.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You can have either Java modules or OSGI. Please use version 2.5.2 for OSGI, or version 2.6.0 for modules support. The jars are functionally identical in other respects.
Ahm, no, why should this not work? I would obviously not use both module systems at runtime, but there's no reason to not include OSGi metadata at the same time as Java Module information.
From the release notes my understanding was that 2.6.0 adds the module information and is thus compiled against Java 11.
You can try to modify the Ant and Gradle build to add OSGI to the module jar. It didn't work when we tried.
The problem is the stone-aged bnd library that is used, which cannot deal with Java 11 classes/jars. The following patch creates a proper manifest just fine.
I'm not sure if the ivy.xml changes are really needed or if there are other places that need fixing - the complexity of the build system is beyond my comprehension.
Thank you very much Ingo! I will incorporate the patch and check the usage of the library.
The complexity of the Ant build is due to multiple JVM targets as well as the DocBook build which required Ivy. The Gradle part acts mainly as a user-friendly wrapper for Ant, as it doesn't require installing the build software.
Patch committed to SVN /base/trunk