sid-srini commented on code in PR #9254:
URL: https://github.com/apache/netbeans/pull/9254#discussion_r3330220876


##########
platform/o.apache.commons.lang3/build.xml:
##########
@@ -21,5 +21,19 @@
 -->
 <project name="platform/o.apache.commons.lang3" default="build" basedir=".">
     <import file="../../nbbuild/templates/projectized.xml"/>
-    <target name="jar"/>
+    <!--
+        The NetBeans module org.apache.commons.lang3 is just a repackaging
+        of the original bundle, with problematic elements relating to OSGI
+        and Netbinox replaced in the MANIFEST.
+    -->

Review Comment:
   - The commons-lang3 jar versions >= 3.18.0 are built with a newer OSGi `Bnd` 
tool which adds an `Import-Package` entry in the manifest containing references 
to jdk packages.
   - This is allowed by OSGi >= 7.
   - The Netbeans OSGi module has version 8.
   - However, its loader uses the Netbinox module which has an older version of 
Equinox and OSGi.
   - This causes a `ClassNotFoundException` even though the jar is on the 
classpath.
   - The jar repackaging with a manifest containing a dummy `Import-Package` 
entry allows Netbinox to load the new jar.
   - A similar fix had been done earlier in the commons-logging module too.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to