You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by ma...@apache.org on 2017/10/28 15:21:14 UTC

[incubator-netbeans] branch master updated: [NETBEANS-54] Module Review extexecution.process (patch)

This is an automated email from the ASF dual-hosted git repository.

matthiasblaesing pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new 5bea340  [NETBEANS-54] Module Review extexecution.process (patch)
     new 68c39e2  Merge branch 'pr/175'
5bea340 is described below

commit 5bea34027c902f96bd977f1a61a4699319e2e8f2
Author: Antonio Vieiro <an...@vieiro.net>
AuthorDate: Sun Oct 22 07:22:24 2017 +0200

    [NETBEANS-54] Module Review extexecution.process (patch)
    
      - We now generate the external/winp-1.14-patched.jar
        binary from Maven sources with a patch.
      - Added license headers & file information to winp.patch
---
 extexecution.process/build.xml              | 43 +++++++++++++++++++++++++++++
 extexecution.process/external/binaries-list |  4 +--
 extexecution.process/external/winp.patch    | 25 +++++++++++++----
 3 files changed, 63 insertions(+), 9 deletions(-)

diff --git a/extexecution.process/build.xml b/extexecution.process/build.xml
index e7740a4..cce235d 100644
--- a/extexecution.process/build.xml
+++ b/extexecution.process/build.xml
@@ -22,4 +22,47 @@
 <project basedir="." default="netbeans" name="extexecution.process">
     <description>Builds, tests, and runs the project org.netbeans.modules.extexecution.process</description>
     <import file="../nbbuild/templates/projectized.xml"/>
+
+    <!-- A task to check if the binary 'external/winp-1.14-patched.jar exists -->
+    <target name="-check-requires-patching-maven-sources">
+        <available file="external/winp-1.14-patched.jar" property="sources-already-patched" />
+    </target>
+
+    <!-- 
+         '-javac-init' task is invoked after maven sources have been downloaded 
+         to 'external/winp-1.14-sources.jar'
+         (see external/binaries-list).
+         Then if 'external/winp-1.14-patched.jar does NOT exist...
+    -->
+    <target name="-prepare-patched-binary" depends="-check-requires-patching-maven-sources" unless="sources-already-patched">
+        <echo message="Patching winp-1.14-sources.jar for Netbeans..." />
+        <taskdef name="patchfile" classname="org.netbeans.nbbuild.extlibs.PatchFile" classpath="${nbantext.jar}"/>
+        <!-- ... 1. Prepares a 'build/external-patch/[sources|classes]' working directories -->
+        <delete dir="build/external-patch" />
+        <mkdir dir="build/external-patch/sources" />
+        <!-- ... 2. Unzips maven sources -->
+        <unzip src="external/winp-1.14-sources.jar" dest="build/external-patch/sources" />
+        <!-- ... 3. Applies patch 'external/winp-1.14-netbeans.patch -->
+        <patchfile dir="build/external-patch/sources"
+            patchfile="external/winp.patch" />
+        <!-- ... 4. Compiles sources to build/external-patch/classes -->
+        <mkdir dir="build/external-patch/classes" />
+        <javac srcdir="build/external-patch/sources"
+            destdir="build/external-patch/classes" >
+            <exclude name="org/apache/xml/resolver/tests/**" />
+        </javac>
+        <!-- ... 4.1. Copy DLLs in sources to classes -->
+        <copy todir="build/external-patch/classes">
+            <fileset dir="build/external-patch/sources">
+                <include name="**/**.dll" />
+            </fileset>
+        </copy>
+        <!-- ... 5. Creates a jar in 'external/winp-1.14-patched.jar' -->
+        <jar destfile="external/winp-1.14-patched.jar">
+            <fileset dir="build/external-patch/classes" />
+        </jar>
+    </target>
+
+    <!-- Hook into harness "-javac-init" task -->
+    <target name="-javac-init" depends="-prepare-patched-binary, projectized-common.-javac-init" />
 </project>
diff --git a/extexecution.process/external/binaries-list b/extexecution.process/external/binaries-list
index 87de4d3..2cc34cd 100644
--- a/extexecution.process/external/binaries-list
+++ b/extexecution.process/external/binaries-list
@@ -15,9 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 #
-# winp-1.14-patcher.jar is a patched version of the maven artifact:
-# 6A56E64B5F9E78D1F30F960425F7758D08B2A390 org.jvnet.winp:winp:1.1
-C9757EFB2CFBA523A7375A78FA9ECFAF0D0AC505 winp-1.14-patched.jar
+40E6E127818C371375F8E8D42BBEAF613BDA63A2 org.jvnet.winp:winp:1.14:sources
 2E07375E5CA3A452472F0E87FB33F243F7A5C08C org.jvnet.libpam4j:libpam4j:1.1
 # processtreekiller is not available in Maven, and its web page was hosted in Kenai, now extinct.
 6819C79348FCF4F5125C834E7D3B742582DCA34D processtreekiller-1.0.7.jar
diff --git a/extexecution.process/external/winp.patch b/extexecution.process/external/winp.patch
index abfa929..c6669bb 100644
--- a/extexecution.process/external/winp.patch
+++ b/extexecution.process/external/winp.patch
@@ -1,9 +1,22 @@
-# This patch file was generated by NetBeans IDE
-# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
-# It uses platform neutral UTF-8 encoding.
-# Above lines and this line are ignored by the patching process.
---- /home/sickboy/Desktop/backup/src/main/java/org/jvnet/winp/Native.java
-+++ /home/sickboy/Desktop/winp/src/main/java/org/jvnet/winp/Native.java
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+diff -ruN org/jvnet/winp/Native.java patched-org/jvnet/winp/Native.java
+--- org/jvnet/winp/Native.java	2009-11-10 10:30:26.000000000 +0100
++++ patched-org/jvnet/winp/Native.java	2017-10-22 07:11:19.462328071 +0200
 @@ -73,8 +73,9 @@
                          filePortion = filePortion.substring(2);
                      filePortion = URLDecoder.decode(filePortion);

-- 
To stop receiving notification emails like this one, please contact
['"commits@netbeans.apache.org" <co...@netbeans.apache.org>'].