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

Fix OSGI Implementation Details #254

Closed
Boarschti42 opened this issue Oct 15, 2023 · 0 comments
Closed

Fix OSGI Implementation Details #254

Boarschti42 opened this issue Oct 15, 2023 · 0 comments
Milestone

Comments

@Boarschti42
Copy link

Boarschti42 commented Oct 15, 2023

Hello,
i recently discovered, that odfdom specifies OSGI-Details in its Manifest. The problem: they are old and not working anymore for current 0.11.x or newer. Since i dont want to open a pull request for just this one little change, here is the bugfix. I would appreciate if you get it into 0.12.0 branch.

diff --git a/odfdom/pom.xml b/odfdom/pom.xml
index 1e36424..3b13ed5 100644
--- a/odfdom/pom.xml
+++ b/odfdom/pom.xml
@@ -162,8 +162,8 @@
                         <configuration>
                             <instructions>
                                 <Import-Package>
-                                    org.odftoolkit.odfdom;version="${osgi.import.range}",
-                                    org.odftoolkit.odfdom.*;version="${osgi.import.range}",
+                                    !org.odftoolkit.odfdom,
+                                    !org.odftoolkit.odfdom.*,
                                     *
                                 </Import-Package>
                             </instructions>
diff --git a/pom.xml b/pom.xml
index 976d3ab..4dd391c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -52,7 +52,6 @@
         <release.zip.bin>odftoolkit-${project.version}-bin.zip</release.zip.bin>
         <release.zip.doc>odftoolkit-${project.version}-doc.zip</release.zip.doc>
         <release.zip.src>odftoolkit-${project.version}-src.zip</release.zip.src>
-        <osgi.import.range>[1.0,2)</osgi.import.range>
         <supported-odf-version>1.2</supported-odf-version>
         <skipTests>false</skipTests>
         <!-- to skip even compiling the tests is honored by Surefire, Failsafe and Compiler Plugin -->

Background: if the own package is imported with a wrong version (here 1.0.x until 2.0.x), nothing works. Fix would be to exclude the own packages from osgi-import statement.

Thank you

mistmist added a commit that referenced this issue Oct 18, 2023
Apply patch proposed by Boarschti42 to remove incorrect version
constraints. (Possibly they were added at a time when the version number
was 1.0.0-BETA...)
@mistmist mistmist added this to the 0.12.0 milestone Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants