[eclipse-jbosstools] Add missing patch files

Gerard Ryan galileo at fedoraproject.org
Tue Oct 16 23:33:14 UTC 2012


commit d5d50e5c6a6323c3487fad5854165cf1af353960
Author: Gerard Ryan <gerard at ryan.lt>
Date:   Wed Oct 17 00:33:08 2012 +0100

    Add missing patch files

 ...pse-jbosstools-as-archives.webtools-4.0.0.patch |  117 ++++++++++++++++++++
 eclipse-jbosstools-freemarker-4.0.0.patch          |   39 +++++++
 2 files changed, 156 insertions(+), 0 deletions(-)
---
diff --git a/eclipse-jbosstools-as-archives.webtools-4.0.0.patch b/eclipse-jbosstools-as-archives.webtools-4.0.0.patch
new file mode 100644
index 0000000..376a1f4
--- /dev/null
+++ b/eclipse-jbosstools-as-archives.webtools-4.0.0.patch
@@ -0,0 +1,117 @@
+--- as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/LocalZippedPublisherUtil.java.orig	2012-10-13 02:25:20.849925873 +0100
++++ as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/LocalZippedPublisherUtil.java	2012-10-14 22:31:56.205658644 +0100
+@@ -11,6 +11,8 @@
+  ******************************************************************************/ 
+ package org.jboss.ide.eclipse.archives.webtools.modules;
+ 
++import java.io.IOException;
++
+ import java.io.File;
+ import java.util.ArrayList;
+ import java.util.Arrays;
+@@ -48,7 +50,7 @@
+ import org.jboss.ide.eclipse.as.core.util.ServerConverter;
+ import org.jboss.ide.eclipse.as.wtp.core.util.ServerModelUtilities;
+ 
+-import de.schlichtherle.io.ArchiveDetector;
++import de.schlichtherle.truezip.file.TArchiveDetector;
+ 
+ public class LocalZippedPublisherUtil extends PublishUtil {
+ 	
+@@ -230,7 +232,7 @@
+ 		try {
+ 			IPath path = getOutputFilePath(combine(parent, last));
+ 			path = path.removeLastSegments(1);
+-			de.schlichtherle.io.File root = TrueZipUtil.getFile(path, TrueZipUtil.getJarArchiveDetector());
++			de.schlichtherle.truezip.file.TFile root = TrueZipUtil.getFile(path, TrueZipUtil.getJarArchiveDetector());
+ 			IModuleResource[] resources = getResources(last, new NullProgressMonitor());
+ 			results.addAll(Arrays.asList(copy(root, resources)));
+ 			TrueZipUtil.umount();
+@@ -248,7 +250,7 @@
+ 			FileUtil.safeDelete(path.toFile(), null);
+ 			
+ 			TrueZipUtil.createArchive(path);
+-			de.schlichtherle.io.File root = TrueZipUtil.getFile(path, TrueZipUtil.getJarArchiveDetector());
++			de.schlichtherle.truezip.file.TFile root = TrueZipUtil.getFile(path, TrueZipUtil.getJarArchiveDetector());
+ 			IModuleResource[] resources = getResources(module);
+ 			IDeployableServerBehaviour beh = ServerConverter.getDeployableServerBehavior(server);
+ 			IModulePathFilter filter = beh.getPathFilter(module);
+@@ -283,7 +285,7 @@
+ 	
+ 	protected IStatus[] publishChanges(IServer server, String deployRoot, IModule[] module) {
+ 		IPath path = getOutputFilePath(module);
+-		de.schlichtherle.io.File root = TrueZipUtil.getFile(path, TrueZipUtil.getJarArchiveDetector());
++		de.schlichtherle.truezip.file.TFile root = TrueZipUtil.getFile(path, TrueZipUtil.getJarArchiveDetector());
+ 		IModuleResourceDelta[] deltas = ((Server)server).getPublishedResourceDelta(module);
+ 		IDeployableServerBehaviour beh = ServerConverter.getDeployableServerBehavior(server);
+ 		IModulePathFilter filter = beh.getPathFilter(module);
+@@ -295,7 +297,7 @@
+ 	 * @since 2.3
+ 	 */
+ 	protected IStatus[] publishChanges(IServer server, IModuleResourceDelta[] deltas, 
+-			de.schlichtherle.io.File root, IModulePathFilter filter) {
++			de.schlichtherle.truezip.file.TFile root, IModulePathFilter filter) {
+ 		ArrayList<IStatus> results = new ArrayList<IStatus>();
+ 		if( deltas == null || deltas.length == 0 )
+ 			return new IStatus[]{};
+@@ -315,10 +317,15 @@
+ 					results.addAll(Arrays.asList(publishChanges(server, deltas[i].getAffectedChildren(), root, filter)));
+ 				}
+ 			} else if( dKind == IModuleResourceDelta.REMOVED) {
+-				de.schlichtherle.io.File f = getFileInArchive(root, 
++				de.schlichtherle.truezip.file.TFile f = getFileInArchive(root, 
+ 						resource.getModuleRelativePath().append(
+ 								resource.getName()));
+-				boolean b = f.deleteAll();
++				boolean b = true;
++				try {
++				    de.schlichtherle.truezip.file.TFile tf = f.rm_r();
++				    if (!tf.exists()) { b = false; }
++				} catch (IOException e) { b = false; }
++
+ 				if( !b )
+ 					results.add(generateDeleteFailedStatus(f));
+ 				hasBeenChanged = true;
+@@ -331,18 +338,24 @@
+ 	}
+ 
+ 	
+-	protected IStatus[] copy(de.schlichtherle.io.File root, IModuleResource[] children) {
++	protected IStatus[] copy(de.schlichtherle.truezip.file.TFile root, IModuleResource[] children) {
+ 		ArrayList<IStatus> results = new ArrayList<IStatus>();
+ 		for( int i = 0; i < children.length; i++ ) {
+ 			if( children[i] instanceof IModuleFile ) {
+ 				IModuleFile mf = (IModuleFile)children[i];
+ 				java.io.File source = getFile(mf);
+-				de.schlichtherle.io.File destination = getFileInArchive(root, mf.getModuleRelativePath().append(mf.getName()));
+-				boolean b = new de.schlichtherle.io.File(source, ArchiveDetector.NULL).archiveCopyAllTo(destination);
++				de.schlichtherle.truezip.file.TFile destination = getFileInArchive(root, mf.getModuleRelativePath().append(mf.getName()));
++
++				boolean b = true;
++				try {
++				    de.schlichtherle.truezip.file.TFile tf = new de.schlichtherle.truezip.file.TFile(source, TArchiveDetector.NULL).cp_rp(destination);
++				    if (!tf.exists()) { b = false; }
++				} catch (IOException e) { b = false; }
++
+ 				if( !b )
+ 					results.add(generateCopyFailStatus(source, destination));
+ 			} else if( children[i] instanceof IModuleFolder ) {
+-				de.schlichtherle.io.File destination = getFileInArchive(root, children[i].getModuleRelativePath().append(children[i].getName()));
++				de.schlichtherle.truezip.file.TFile destination = getFileInArchive(root, children[i].getModuleRelativePath().append(children[i].getName()));
+ 				destination.mkdirs();
+ 				IModuleFolder mf = (IModuleFolder)children[i];
+ 				results.addAll(Arrays.asList(copy(root, mf.members())));
+@@ -362,10 +375,10 @@
+ 		return new Status(IStatus.ERROR, IntegrationPlugin.PLUGIN_ID, "Copy of " + source + " to " + destination + " has failed");//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+ 	}
+ 	
+-	protected de.schlichtherle.io.File getFileInArchive(de.schlichtherle.io.File root, IPath relative) {
++	protected de.schlichtherle.truezip.file.TFile getFileInArchive(de.schlichtherle.truezip.file.TFile root, IPath relative) {
+ 		while(relative.segmentCount() > 0 ) {
+-			root = new de.schlichtherle.io.File(root, 
+-					relative.segment(0), ArchiveDetector.NULL);
++			root = new de.schlichtherle.truezip.file.TFile(root, 
++					relative.segment(0), TArchiveDetector.NULL);
+ 			relative = relative.removeFirstSegments(1);
+ 		}
+ 		return root;
diff --git a/eclipse-jbosstools-freemarker-4.0.0.patch b/eclipse-jbosstools-freemarker-4.0.0.patch
new file mode 100644
index 0000000..6ef7c17
--- /dev/null
+++ b/eclipse-jbosstools-freemarker-4.0.0.patch
@@ -0,0 +1,39 @@
+--- freemarker/plugins/org.jboss.ide.eclipse.freemarker/.classpath.orig	2012-07-22 14:25:42.768119690 +0100
++++ freemarker/plugins/org.jboss.ide.eclipse.freemarker/.classpath	2012-07-22 14:26:03.125731591 +0100
+@@ -1,6 +1,6 @@
+ <?xml version="1.0" encoding="UTF-8"?>
+ <classpath>
+-	<classpathentry exported="true" kind="lib" path="freemarker-2.3.18.jar"/>
++	<classpathentry exported="true" kind="lib" path="freemarker.jar"/>
+ 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ 	<classpathentry kind="src" path="src"/>
+--- freemarker/plugins/org.jboss.ide.eclipse.freemarker/build.properties.orig	2012-07-22 14:28:21.027101531 +0100
++++ freemarker/plugins/org.jboss.ide.eclipse.freemarker/build.properties	2012-07-22 14:28:44.958644928 +0100
+@@ -1,6 +1,6 @@
+ jars.compile.order = freemarker-ide.jar
+ bin.includes = plugin.*,\
+-               freemarker-2.3.18.jar,\
++               freemarker.jar,\
+                META-INF/,\
+                .,\
+                icons/,\
+@@ -13,6 +13,6 @@
+                icons/,\
+                META-INF/,\
+                License.txt,\
+-               freemarker-2.3.18.jar
++               freemarker.jar
+ source.freemarker-ide.jar = src/
+ output.freemarker-ide.jar = bin/
+--- freemarker/plugins/org.jboss.ide.eclipse.freemarker/META-INF/MANIFEST.MF.orig	2012-07-22 14:27:14.930362365 +0100
++++ freemarker/plugins/org.jboss.ide.eclipse.freemarker/META-INF/MANIFEST.MF	2012-07-22 14:27:33.120015436 +0100
+@@ -22,7 +22,7 @@
+  org.jboss.tools.usage;bundle-version="1.0.0";resolution:=optional;x-installation:=greedy
+ Bundle-ActivationPolicy: lazy
+ Bundle-ClassPath: freemarker-ide.jar,
+- freemarker-2.3.18.jar
++ freemarker.jar
+ Bundle-Vendor: %providerName
+ Export-Package: freemarker.core,
+  freemarker.template,


More information about the scm-commits mailing list