364571 - Adds alternative form of the bundles and features target that has separate sources for bundles and features. Gemini Web uses such form.
diff --git a/build-virgo-build/build.xml b/build-virgo-build/build.xml
index 8248074..013718e 100644
--- a/build-virgo-build/build.xml
+++ b/build-virgo-build/build.xml
@@ -121,6 +121,24 @@
             <param name="repository" value="${repository.dir}"/>
         </antcall>
         
+        <echo message="[Test]Publish bundles and features using the alternative form to the repository." />
+        <antcall target="p2.publish-bundles-features-alt">
+            <param name="tools.dir" value="${package.output.dir}"/>
+            <param name="repository" value="${repository.dir}"/>
+            <param name="bundles" value="${basedir}/e2e-testdata/plugins-alt"/>
+            <param name="features" value="${basedir}/e2e-testdata/features-alt"/>
+        </antcall>
+        
+        <antcall target="check-repository-exists">
+            <param name="repository" value="${repository.dir}"/>
+        </antcall>
+        <antcall target="check-file-exists">
+            <param name="file" value="${repository.dir}/features/testFeatureC_1.0.0.jar"/>
+        </antcall>
+        <antcall target="check-file-exists">
+            <param name="file" value="${repository.dir}/plugins/testBundleD_1.0.0.jar"/>
+        </antcall>
+        
         <echo message="[Test]Publish base.product to the repository." />
         <antcall target="p2.publish-product">
             <param name="tools.dir" value="${package.output.dir}"/>
diff --git a/build-virgo-build/e2e-testdata/features-alt/testFeatureC/feature.xml b/build-virgo-build/e2e-testdata/features-alt/testFeatureC/feature.xml
new file mode 100755
index 0000000..ed9c715
--- /dev/null
+++ b/build-virgo-build/e2e-testdata/features-alt/testFeatureC/feature.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="testFeatureC"
+      version="1.0.0">
+
+   <description url="http://www.eclipse.org/virgo/">
+   </description>
+
+   <copyright url="http://www.eclipse.org/virgo/">
+   </copyright>
+
+</feature>
diff --git a/build-virgo-build/e2e-testdata/plugins-alt/testBundleD_1.0.0.jar b/build-virgo-build/e2e-testdata/plugins-alt/testBundleD_1.0.0.jar
new file mode 100644
index 0000000..a19d2a1
--- /dev/null
+++ b/build-virgo-build/e2e-testdata/plugins-alt/testBundleD_1.0.0.jar
Binary files differ
diff --git a/multi-bundle/p2tools.xml b/multi-bundle/p2tools.xml
index 7ab93f3..d288224 100644
--- a/multi-bundle/p2tools.xml
+++ b/multi-bundle/p2tools.xml
@@ -109,6 +109,42 @@
         </java>
     </target>
     
+    <target name="p2.publish-bundles-features-alt" description="Alternative form. Publishes bundles and features passed as separate sources.">
+        <fail message="The 'repository' property must be set on this target.">
+            <condition>
+                <not>
+                    <isset property="repository"/>
+                </not>
+            </condition>
+        </fail>
+        <fail message="The 'bundles' property must be set on this target.">
+            <condition>
+                <not>
+                    <isset property="bundles"/>
+                </not>
+            </condition>
+        </fail>
+        <fail message="The 'features' property must be set on this target.">
+            <condition>
+                <not>
+                    <isset property="features"/>
+                </not>
+            </condition>
+        </fail>
+        <java jar="${tools.dir}/plugins/org.eclipse.equinox.launcher_${org.eclipse.equinox.launcher}.jar" fork="true" taskname="p2FeaturesAndBundles" failonerror="true" maxmemory="256m">
+            <!--jvmarg value="-Xdebug"/>
+            <jvmarg value="-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y"/-->
+            <arg line="-application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher"/>
+            <arg line="-metadataRepository file:${repository}"/>
+            <arg line="-artifactRepository file:${repository}"/>
+            <arg line="-bundles ${bundles}"/>
+            <arg line="-features ${features}"/>
+            <arg line="-append"/>
+            <arg line="-compress"/>
+            <arg line="-publishArtifacts"/>
+        </java>
+    </target>
+    
     <target name="p2.publish-product" description="Publishes a product to a p2 repository. The publishing uses ANY environment configurations.">
         <fail message="The 'repository' property must be set on this target.">
             <condition>