295668 allow xulrunner location to be specified for unit tests
diff --git a/plugins/org.eclipse.wtp.releng.tools/.classpath b/plugins/org.eclipse.wtp.releng.tools/.classpath
index ce73933..2fbb7a2 100644
--- a/plugins/org.eclipse.wtp.releng.tools/.classpath
+++ b/plugins/org.eclipse.wtp.releng.tools/.classpath
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/plugins/org.eclipse.wtp.releng.tools/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.wtp.releng.tools/.settings/org.eclipse.jdt.core.prefs
index c676a66..bbc09e7 100644
--- a/plugins/org.eclipse.wtp.releng.tools/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/org.eclipse.wtp.releng.tools/.settings/org.eclipse.jdt.core.prefs
@@ -1,58 +1,59 @@
-#Thu Jan 03 12:25:56 EST 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=ignore
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+#Fri Nov 20 21:46:23 EST 2009
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
 org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
 org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
 org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
 org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
 org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=ignore
 org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
diff --git a/plugins/org.eclipse.wtp.releng.tools/META-INF/MANIFEST.MF b/plugins/org.eclipse.wtp.releng.tools/META-INF/MANIFEST.MF
index 99996af..2e33f2e 100644
--- a/plugins/org.eclipse.wtp.releng.tools/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.wtp.releng.tools/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
 Bundle-Name: %Bundle-Name.0
 Bundle-SymbolicName: org.eclipse.wtp.releng.tools;singleton:=true
 Bundle-Version: 1.1.0.qualifier
-Require-Bundle: org.apache.ant;bundle-version="[1.7.0,2.0.0)"
+Require-Bundle: org.apache.ant;bundle-version="[1.6.5,2.0.0)"
 Bundle-Localization: plugin
 Bundle-ClassPath: wtpRelengTools.jar
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/plugins/org.eclipse.wtp.releng.tools/src/org/eclipse/wtp/releng/tools/MapFileGenerator.java b/plugins/org.eclipse.wtp.releng.tools/src/org/eclipse/wtp/releng/tools/MapFileGenerator.java
index 9913eda..52300f2 100644
--- a/plugins/org.eclipse.wtp.releng.tools/src/org/eclipse/wtp/releng/tools/MapFileGenerator.java
+++ b/plugins/org.eclipse.wtp.releng.tools/src/org/eclipse/wtp/releng/tools/MapFileGenerator.java
@@ -75,6 +75,10 @@
 	private String p2MapFile;
 	private String p2Repository;
 	private String buildlabel;
+	private String pwd;
+	private String username;
+	private String addressPrefix;
+	private String httpMapFile;
 
 	static class BundleInfo implements Comparable {
 		String id;
@@ -99,6 +103,12 @@
 			if (p2MapFile != null && p2Repository != null)
 				writeList(listfeatureinfo, listbundleinfo, p2MapFile);
 
+			// just do bunles for tradtional http-get map file (features don't
+			// make sense)
+			if (httpMapFile != null) {
+				writeList(listbundleinfo, httpMapFile);
+			}
+
 		}
 		catch (IOException e) {
 			new BuildException(e);
@@ -196,4 +206,58 @@
 	public void setBuildlabel(String buildlabel) {
 		this.buildlabel = buildlabel;
 	}
+
+	private void writeList(List bundleDetailsList, String output) throws IOException {
+		BufferedWriter writer = null;
+		try {
+			writer = new BufferedWriter(new FileWriter(output));
+			writer.write("!*** This file was created on " + dateFormat.format(new Date()));
+			writer.write("!*** Build Label: " + buildlabel + EOL);
+			Collections.sort(bundleDetailsList);
+			Iterator iterator = bundleDetailsList.iterator();
+			while (iterator.hasNext()) {
+				BundleInfo info = (BundleInfo) iterator.next();
+				// double space for readability
+				writer.write(EOL);
+				writer.write(generateCVSFetch(info));
+			}
+		}
+		finally {
+			if (writer != null)
+				writer.close();
+		}
+	}
+
+	// plugin@my.bundle.id,1.0.0=GET,http://eclipse.org/downloads/orbit/my.bundle.id_1.0.0.v20081201.zip,unpack=true|false
+	private String generateCVSFetch(BundleInfo info) {
+		String fileName = info.id + "_" + info.fullVersion;
+		boolean shouldUnpack = shouldUnpack(fileName);
+		return new String(BUNDLE_LINE_PREFIX + "@" + info.id + ',' + info.version + "=GET," + addressPrefix + fileName + (shouldUnpack ? ".jar,unpack=true" : ".jar") + (username == null ? "" : ',' + username) + (pwd == null ? "" : ',' + pwd) + EOL);
+	}
+
+	private boolean shouldUnpack(String path) {
+		// TODO: unlike the orbit bundle system, we should look at feature
+		// attribute (in feature, or p2 metadata)
+		// to decide unpack attribute
+// File checked = new File(root, path + ".jar");
+// if (checked.exists())
+// return true;
+		return false;
+	}
+
+	public String getAddressPrefix() {
+		return addressPrefix;
+	}
+
+	public void setAddressPrefix(String addressPrefix) {
+		this.addressPrefix = addressPrefix;
+	}
+
+	public String getHttpMapFile() {
+		return httpMapFile;
+	}
+
+	public void setHttpMapFile(String httpMapFile) {
+		this.httpMapFile = httpMapFile;
+	}
 }
diff --git a/plugins/org.eclipse.wtp.releng.tools/src/org/eclipse/wtp/releng/tools/handy.jpage b/plugins/org.eclipse.wtp.releng.tools/src/org/eclipse/wtp/releng/tools/handy.jpage
index c95be0d..94964f0 100644
--- a/plugins/org.eclipse.wtp.releng.tools/src/org/eclipse/wtp/releng/tools/handy.jpage
+++ b/plugins/org.eclipse.wtp.releng.tools/src/org/eclipse/wtp/releng/tools/handy.jpage
@@ -19,3 +19,9 @@
 
 
 "test.xml.package.xml".replaceAll(".xml$", ".html");
+
+
+String a = (true ? ".jar" : ".jar,unpack=true");
+System.out.println(a);
+
+