Index: tmp/org.eclipse.pde.hack/src/org/eclipse/pde/internal/build/site/QualifierReplacer.java
===================================================================
--- tmp/org.eclipse.pde.hack/src/org/eclipse/pde/internal/build/site/QualifierReplacer.java	(revision 3065)
+++ tmp/org.eclipse.pde.hack/src/org/eclipse/pde/internal/build/site/QualifierReplacer.java	(revision 3066)
@@ -10,19 +10,13 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.build.site;
 
-import com.ibm.icu.util.Calendar;
-
 import java.io.BufferedReader;
 import java.io.File;
-import java.io.FileOutputStream;
 import java.io.FileWriter;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.nio.charset.StandardCharsets;
-import java.text.SimpleDateFormat;
 import java.util.Properties;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
 
 import org.eclipse.pde.internal.build.AbstractScriptGenerator;
 import org.eclipse.pde.internal.build.IBuildPropertiesConstants;
@@ -36,29 +30,37 @@
 //import org.tmatesoft.svn.core.wc.SVNRevision;
 //import org.tmatesoft.svn.core.wc.SVNWCClient;
 
+import com.ibm.icu.util.Calendar;
+
 public class QualifierReplacer implements IBuildPropertiesConstants {
+	
 	private static final String PROPERTY_SVN = "svn";
-	//	private static final String DOT_QUALIFIER = '.' + PROPERTY_QUALIFIER;
+	
+	// private static final String DOT_QUALIFIER = '.' + PROPERTY_QUALIFIER;
 	private static String globalQualifier = null;
-
-
+	
+	
 	private static void printDebug(String mess) {
 		FileWriter writer = null;
 		try {
 			writer = new FileWriter(new File(System.getProperty("java.io.tmpdir"), "pde_build.txt"), true);
-			writer.write(mess+"\n");
+			writer.write(mess + "\n");
 			writer.close();
-		} catch(Exception e) {}
+		}
+		catch (Exception e) {
+		}
 		finally {
 			if (writer != null)
 				try {
-					writer.close();
-				} catch (IOException e) {
-					// TODO Auto-generated catch block
-					e.printStackTrace();
+				writer.close();
 				}
+				catch (IOException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+				}
 		}
 	}
+	
 	/**
 	 * Replaces the 'qualifier' in the given version with the qualifier replacement.
 	 * 
@@ -69,45 +71,48 @@
 	 * @return string version with qualifier replaced
 	 */
 	public static String replaceQualifierInVersion(String version, String id, String replaceTag, Properties newVersions) {
-
-		//printDebug("REPLACE version="+version+" id="+id+" replaceTag="+replaceTag+" newVersions="+newVersions);
-		//newVersions.put(PROPERTY_QUALIFIER, "fdp");
-
+		
+		// printDebug("REPLACE version="+version+" id="+id+" replaceTag="+replaceTag+" newVersions="+newVersions);
+		// newVersions.put(PROPERTY_QUALIFIER, "fdp");
+		
 		if (!AbstractScriptGenerator.getPropertyAsBoolean(IBuildPropertiesConstants.PROPERTY_PACKAGER_AS_NORMALIZER))
 			return version;
 		if (!version.endsWith(PROPERTY_QUALIFIER))
 			return version;
-
+		
 		String newQualifier = null;
 		if (replaceTag == null || replaceTag.equalsIgnoreCase(PROPERTY_CONTEXT)) {
 			if (globalQualifier != null)
 				newQualifier = globalQualifier;
-
-			if (newQualifier == null && newVersions != null && newVersions.size() != 0) { //Skip the lookup in the file if there is no entries
-				newQualifier = (String) newVersions.get(getQualifierKey(id, version)); //First we check to see if there is a precise version
-				if (newQualifier == null) //If not found, then lookup for the id,0.0.0
+			
+			if (newQualifier == null && newVersions != null && newVersions.size() != 0) { // Skip the lookup in the file if there is no entries
+				newQualifier = (String) newVersions.get(getQualifierKey(id, version)); // First we check to see if there is a precise version
+				if (newQualifier == null) // If not found, then lookup for the id,0.0.0
 					newQualifier = (String) newVersions.get(id + ',' + Version.emptyVersion.toString());
 				if (newQualifier == null)
 					newQualifier = newVersions.getProperty(DEFAULT_MATCH_ALL);
 			}
-
-
+			
+			
 			if (newQualifier == null)
 				newQualifier = getDateQualifier();
-		} else if (replaceTag.equalsIgnoreCase(PROPERTY_NONE)) {
+		}
+		else if (replaceTag.equalsIgnoreCase(PROPERTY_NONE)) {
 			newQualifier = ""; //$NON-NLS-1$
-		} else if (replaceTag.equalsIgnoreCase(PROPERTY_SVN)) {
-			newQualifier = getSVNQualifier(id); //$NON-NLS-1$
-		} else {
+		}
+		else if (replaceTag.equalsIgnoreCase(PROPERTY_SVN)) {
+			newQualifier = getSVNQualifier(id);
+		}
+		else {
 			newQualifier = replaceTag;
 		}
-
+		
 		version = version.replaceFirst(PROPERTY_QUALIFIER, newQualifier);
 		if (version.endsWith(".")) //$NON-NLS-1$
 			version = version.substring(0, version.length() - 1);
 		return version;
 	}
-
+	
 	/**
 	 * find out the last SVN revision number of a project
 	 * 
@@ -115,53 +120,55 @@
 	 * @return
 	 */
 	public static String getSVNQualifier(String id) {
-		File projectDirectory = new File(System.getProperty("user.home"), "workspace047/"+id+"/");
-		File svnDirectory = new File(projectDirectory, ".svn"); 
+		File projectDirectory = new File(System.getProperty("user.home"), "workspace047/" + id + "/");
+		File svnDirectory = new File(projectDirectory, ".svn");
 		String projectDirectoryPath = projectDirectory.getAbsolutePath();
 		if (!projectDirectoryPath.endsWith("/")) projectDirectoryPath += "/";
 		
 		try {
-			//		SVNWCClient client = SVNClientManager.newInstance().getWCClient();
-			//		SVNInfo info = client.doInfo(projectDirectory, SVNRevision.WORKING);
-			//		SVNURL location = info.getURL();
-			//		SVNRepository repository = SVNRepositoryFactory.create(location);
-			//		
-			////		long latestRevision = repository.getLatestRevision();
-			////		System.out.println("[" + location.toString() + "] latest revision: " + latestRevision); 
+			// SVNWCClient client = SVNClientManager.newInstance().getWCClient();
+			// SVNInfo info = client.doInfo(projectDirectory, SVNRevision.WORKING);
+			// SVNURL location = info.getURL();
+			// SVNRepository repository = SVNRepositoryFactory.create(location);
 			//
+			//// long latestRevision = repository.getLatestRevision();
+			//// System.out.println("[" + location.toString() + "] latest revision: " + latestRevision);
 			//
-			//		SVNDirEntry entry = repository.info(".", -1);
-			////		System.out.println("[" + location.toString() + "] latest revision: " + entry.getRevision());
-			////		System.out.println("[" + location.toString() + "] latest date: " + entry.getDate());
-			//		String svndate = entry.getDate()
-			//printDebug("svn info in "+projectDirectory);
+			//
+			// SVNDirEntry entry = repository.info(".", -1);
+			//// System.out.println("[" + location.toString() + "] latest revision: " + entry.getRevision());
+			//// System.out.println("[" + location.toString() + "] latest date: " + entry.getDate());
+			// String svndate = entry.getDate()
+			// printDebug("svn info in "+projectDirectory);
 			if (projectDirectory.exists() && svnDirectory.exists()) {
 				String rev = getVersions("svnversion", projectDirectoryPath).trim();
 				if (rev.contains(":")) {
-					rev = rev.substring(rev.indexOf(":")+1);
+					rev = rev.substring(rev.indexOf(":") + 1);
 				}
 				if (rev.endsWith("M")) {
-					rev = rev.substring(0, rev.length()-1);
+					rev = rev.substring(0, rev.length() - 1);
 				}
-				//printDebug("xml "+xml);
-				printDebug(id+"="+rev);
+				// printDebug("xml "+xml);
+				printDebug(id + "=" + rev);
 				return rev;
-			} else {
+			}
+			else {
 				return getDateQualifier();
 			}
 			
 			/*
-		String svndate = null;
-		SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd-HHmm");
-		//SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmm");
-		return formatter.format(svndate);
+			 * String svndate = null;
+			 * SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd-HHmm");
+			 * //SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmm");
+			 * return formatter.format(svndate);
 			 */
-		} catch (Exception e) {
+		}
+		catch (Exception e) {
 			e.printStackTrace();
-			return "svn_error_"+id+"_"+projectDirectory;
+			return "svn_error_" + id + "_" + projectDirectory;
 		}
 	}
-
+	
 	private static String getVersions(String... args) throws IOException {
 		ProcessBuilder builder = new ProcessBuilder(args);
 		builder.redirectErrorStream(true);
@@ -169,22 +176,22 @@
 		BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream(), StandardCharsets.UTF_8));
 		StringBuilder sb = new StringBuilder();
 		String line = null;
-		while ((line = reader.readLine ()) != null) {
-			sb.append(line+"\n");
+		while ((line = reader.readLine()) != null) {
+			sb.append(line + "\n");
 		}
 		reader.close();
 		return sb.toString();
 	}
-
-	//given a version ending in "qualifier" return the key to look up the replacement
+	
+	// given a version ending in "qualifier" return the key to look up the replacement
 	public static String getQualifierKey(String id, String version) {
 		if (version == null || !version.endsWith(PROPERTY_QUALIFIER))
 			return null;
-
+		
 		Version osgiVersion = new Version(version);
 		String qualifier = osgiVersion.getQualifier();
 		qualifier = qualifier.substring(0, qualifier.length() - PROPERTY_QUALIFIER.length());
-
+		
 		StringBuffer keyBuffer = new StringBuffer(id);
 		keyBuffer.append(',');
 		keyBuffer.append(osgiVersion.getMajor());
@@ -192,42 +199,44 @@
 		keyBuffer.append(osgiVersion.getMinor());
 		keyBuffer.append('.');
 		keyBuffer.append(osgiVersion.getMicro());
-
+		
 		if (qualifier.length() > 0) {
 			keyBuffer.append('.');
 			keyBuffer.append(qualifier);
 		}
 		return keyBuffer.toString();
 	}
-
+	
 	/**
 	 * Returns the current date/time as a string to be used as a qualifier
-	 * replacement.  This is the default qualifier replacement.  Will
+	 * replacement. This is the default qualifier replacement. Will
 	 * be of the form YYYYMMDDHHMM.
-	 * @return current date/time as a qualifier replacement 
+	 * 
+	 * @return current date/time as a qualifier replacement
 	 */
 	public static String getDateQualifier() {
 		final String empty = ""; //$NON-NLS-1$
 		int monthNbr = Calendar.getInstance().get(Calendar.MONTH) + 1;
 		String month = (monthNbr < 10 ? "0" : empty) + monthNbr; //$NON-NLS-1$
-
+		
 		int dayNbr = Calendar.getInstance().get(Calendar.DAY_OF_MONTH);
 		String day = (dayNbr < 10 ? "0" : empty) + dayNbr; //$NON-NLS-1$
-
+		
 		int hourNbr = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);
 		String hour = (hourNbr < 10 ? "0" : empty) + hourNbr; //$NON-NLS-1$
-
+		
 		int minuteNbr = Calendar.getInstance().get(Calendar.MINUTE);
 		String minute = (minuteNbr < 10 ? "0" : empty) + minuteNbr; //$NON-NLS-1$
-
+		
 		return empty + Calendar.getInstance().get(Calendar.YEAR) + month + day + hour + minute;
 	}
-
+	
 	/**
 	 * Sets the global variable used as the qualifier replacement during calls to
 	 * {@link #replaceQualifierInVersion(String, String, String, Properties)}
 	 * Setting the qualifier to <code>null</code> will result in the default
 	 * date qualifier being used.
+	 * 
 	 * @param globalQualifier string replacement or <code>null</code>
 	 */
 	public static void setGlobalQualifier(String globalQualifier) {
