You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by GitBox <gi...@apache.org> on 2017/10/28 11:54:16 UTC

[GitHub] matthiasblaesing closed pull request #181: [NETBEANS-54] Module Review libs.osgi (followup)

matthiasblaesing closed pull request #181: [NETBEANS-54] Module Review libs.osgi (followup)
URL: https://github.com/apache/incubator-netbeans/pull/181
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/libs.osgi/build.xml b/libs.osgi/build.xml
index 3a50ab838..978f82a50 100644
--- a/libs.osgi/build.xml
+++ b/libs.osgi/build.xml
@@ -22,4 +22,29 @@
 <project basedir="." default="netbeans" name="libs.osgi">
     <description>Builds, tests, and runs the project org.netbeans.libs.osgi</description>
     <import file="../nbbuild/templates/projectized.xml"/>
+    
+    <!-- A task to check if the binary 'external/osgi.cmpn-4.2.jar' exists -->
+    <target name="-check-requires-patching-maven-sources">
+        <available file="external/osgi.cmpn-4.2.jar" property="sources-already-patched" />
+    </target>
+    
+    <!-- 
+         '-javac-init' task is invoked after maven sources have been downloaded 
+         to 'external/org.osgi.compendium-4.2.0.jar'
+         (see external/binaries-list).
+         Netbeans had its own copy of osgi.cmpn-4.2.jar, which is identical to
+         the downloaded binary. The downloaded binary contains the source code
+         in addition to the compiled class files.
+         The sources are now stripped from the binary to create the original file
+         netbeans used to bundle.
+    -->
+    <target name="-prepare-patched-binary" depends="-check-requires-patching-maven-sources" unless="sources-already-patched">
+        <echo message="Patching org.osgi.compendium-4.2.0 for Netbeans..." />
+        <zip destfile="external/osgi.cmpn-4.2.jar">
+            <zipfileset src="external/org.osgi.compendium-4.2.0.jar" excludes="OSGI-OPT/**" />
+        </zip>
+    </target>
+    
+    <!-- Hook into harness "-javac-init" task -->
+    <target name="-javac-init" depends="-prepare-patched-binary, projectized-common.-javac-init" />
 </project>
diff --git a/libs.osgi/external/binaries-list b/libs.osgi/external/binaries-list
index 17e5e684e..04a2d9c82 100644
--- a/libs.osgi/external/binaries-list
+++ b/libs.osgi/external/binaries-list
@@ -14,5 +14,5 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-972E6455724DC6ADB1C1912F53B5E3D7DF20C5FD org.netbeans.external:osgi.cmpn:4.2
+1E506145EC53132BCE79CE8798D98026B598FD48 org.osgi:org.osgi.compendium:4.2.0
 2F2FBFF3FB80F91B159A7FA9F0C42A894BB8BCC5 org.osgi:osgi.core:5.0.0
diff --git a/libs.osgi/external/osgi-5.0-license.txt b/libs.osgi/external/osgi-5.0-license.txt
index 84b2da9b0..807a5531d 100644
--- a/libs.osgi/external/osgi-5.0-license.txt
+++ b/libs.osgi/external/osgi-5.0-license.txt
@@ -1,6 +1,6 @@
 Name: OSGi
 Version: 5.0
-Files: osgi.core-5.0.0.jar osgi.cmpn-4.2.jar
+Files: osgi.core-5.0.0.jar osgi.cmpn-4.2.jar org.osgi.compendium-4.2.0.jar
 Description: OSGi specification (core & compendium).
 License: Apache-2.0
 Origin: OSGi


 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services