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/22 15:40:37 UTC

[GitHub] matthiasblaesing commented on a change in pull request #175: [NETBEANS-54] Module Review extexecution.process (patch)

matthiasblaesing commented on a change in pull request #175: [NETBEANS-54] Module Review extexecution.process (patch)
URL: https://github.com/apache/incubator-netbeans/pull/175#discussion_r146135262
 
 

 ##########
 File path: extexecution.process/build.xml
 ##########
 @@ -22,4 +22,49 @@
 <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..." />
+        <!-- ... 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 -->
+        <patch dir="build/external-patch/sources"
+            patchfile="external/winp-1.14-netbeans.patch"
+            strip="0" />
+        <!-- ... 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>
+        <!-- ... 6. Cleans up working directory -->
+        <delete dir="build/external-patch" />
 
 Review comment:
   Same as with xml catalog resolver I think it would be good to be able to see the source code when it is build and let the clean task do its work.

----------------------------------------------------------------
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