[jbosstools-commits] JBoss Tools SVN: r31178 - in workspace/rstryker: manifestVersions/FixManifests and 2 other directories.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Tue May 10 08:51:25 EDT 2011


Author: rob.stryker at jboss.com
Date: 2011-05-10 08:51:25 -0400 (Tue, 10 May 2011)
New Revision: 31178

Added:
   workspace/rstryker/andre2/
   workspace/rstryker/manifestVersions/FixManifests/shellcommands.txt
Modified:
   workspace/rstryker/manifestVersions/FixManifests/bin/Main.class
   workspace/rstryker/manifestVersions/FixManifests/src/Main.java
Log:
workspace stuff

Modified: workspace/rstryker/manifestVersions/FixManifests/bin/Main.class
===================================================================
(Binary files differ)

Added: workspace/rstryker/manifestVersions/FixManifests/shellcommands.txt
===================================================================
--- workspace/rstryker/manifestVersions/FixManifests/shellcommands.txt	                        (rev 0)
+++ workspace/rstryker/manifestVersions/FixManifests/shellcommands.txt	2011-05-10 12:51:25 UTC (rev 31178)
@@ -0,0 +1,6 @@
+generate manifest list
+ ls -1 /home/rob/code/jbtools/jbosstools/trunk/ | grep -v "xml$" | awk '{ print "ls -d -1 /home/rob/code/jbtools/jbosstools/trunk/" $0 "/plugins/*";}' | sh | grep -v "pom.xml" | awk '{ print $0 "/META-INF/MANIFEST.MF";}' > tmp/manifests.file.list
+
+
+execute on each manifest
+ cat ~/tmp/manifests.file.list | grep "as/plugins" | awk '{ print "java Main /home/rob/apps/eclipse/workspaces/pluginVersionUtils/manifests/bin/data.mf " $0 " > tmp && mv tmp " $0;}' | sh

Modified: workspace/rstryker/manifestVersions/FixManifests/src/Main.java
===================================================================
--- workspace/rstryker/manifestVersions/FixManifests/src/Main.java	2011-05-10 10:53:14 UTC (rev 31177)
+++ workspace/rstryker/manifestVersions/FixManifests/src/Main.java	2011-05-10 12:51:25 UTC (rev 31178)
@@ -38,7 +38,7 @@
 			for( int i = 0; i < allManifests.length; i++ ) {
 				String fixed = getFixedManifestText(map, allManifests[i]);
 				//System.out.println("for file " + allManifests[i].getAbsolutePath());
-				//System.out.print(fixed);
+				System.out.print(fixed);
 			}
 		}
 //		System.out.println("Added: " + TOTAL_ADDED);
@@ -69,11 +69,11 @@
 	public static final String VERSION_SECTION = ";bundle-version=\"";
 	public static String getFixedManifestText(HashMap<String, String> map, File manifest) {
 		String newText = "";
+		BufferedReader br = null;
 		try {
 			FileReader reader = new FileReader(manifest);
-			BufferedReader br = new BufferedReader(reader);
+			br = new BufferedReader(reader);
 			String line = br.readLine();
-			String bundle, version;
 			boolean inRequires = false;
 			while(line != null ) {
 				if( line.startsWith(REQUIRE_BUNDLE)) {
@@ -96,6 +96,11 @@
 		} catch(IOException ioe) {
 			ioe.printStackTrace();
 		}
+		try {
+			if( br != null )
+				br.close();
+		} catch(IOException ioe) {
+		}
 		return newText;
 	}
 	



More information about the jbosstools-commits mailing list