jlahoda commented on a change in pull request #494: Adding 
LICENSE/NOTICE/DISCLAIMER to NBMs, packing OSGi jars into NBMs…
URL: https://github.com/apache/incubator-netbeans/pull/494#discussion_r181570557
 
 

 ##########
 File path: nbbuild/antsrc/org/netbeans/nbbuild/MakeNBM.java
 ##########
 @@ -1029,6 +1053,29 @@ private Document createInfoXml(final Attributes attr) 
throws BuildException {
         return doc;
     }
 
+    private Document createFakeOSGiInfo(File osgiJar) {
+        DOMImplementation domimpl;
+        try {
+            domimpl = 
DocumentBuilderFactory.newInstance().newDocumentBuilder().getDOMImplementation();
+        } catch (ParserConfigurationException x) {
+            throw new BuildException(x, getLocation());
+        }
+
+        log("Creating fake info.xml for OSGi bundle", Project.MSG_VERBOSE);
+        
+        String pub = "-//NetBeans//DTD Autoupdate Module Info 2.5//EN";
+        String sys = "http://www.netbeans.org/dtds/autoupdate-info-2_5.dtd";;
+        Document doc = domimpl.createDocument(null, "module", 
domimpl.createDocumentType("module", pub, sys));
+        
+        try (JarFile jf = new JarFile(osgiJar)) {
+            MakeUpdateDesc.fakeOSGiInfoXml(jf, osgiJar, doc);
 
 Review comment:
   I also thought first that we don't need the license there, but turns out the 
AUC does not contain the license then (and does not contain it for non-NBM OSGi 
bundles, but that's not our immediate problem here). So adding the license to 
the wrapper NBMs.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

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

Reply via email to