325037 -  Slightly inconsistent results of repos versus zips
diff --git a/releng.wtpbuilder/components/dali-sdk/category.xml b/releng.wtpbuilder/components/dali-sdk/category.xml
index 757fa9a..f7bbcfe 100644
--- a/releng.wtpbuilder/components/dali-sdk/category.xml
+++ b/releng.wtpbuilder/components/dali-sdk/category.xml
@@ -4,38 +4,38 @@
        
         id="org.eclipse.jpt_sdk.feature">
         <category
-            name="Web Tools Platform SDK (WTP SDK) 3.2.2"/>
+            name="Web Tools Platform SDK (WTP SDK) @buildversionid@"/>
     </feature>
     <feature
                 id="org.eclipse.jpt.eclipselink_sdk.feature">
         <category
-            name="Web Tools Platform SDK (WTP SDK) 3.2.2"/>
+            name="Web Tools Platform SDK (WTP SDK) @buildversionid@"/>
     </feature>
 
     <feature
                 id="org.eclipse.jpt.feature">
         <category
-            name="Web Tools Platform (WTP) 3.2.2"/>
+            name="Web Tools Platform (WTP) @buildversionid@"/>
     </feature>
     <feature
     id="org.eclipse.jpt.eclipselink.feature">
         <category
-            name="Web Tools Platform (WTP) 3.2.2"/>
+            name="Web Tools Platform (WTP) @buildversionid@"/>
     </feature>
 
 
 
 
     <category-def
-        name="Web Tools Platform (WTP) 3.2.2"
-        label="Web Tools Platform (WTP) 3.2.2">
+        name="Web Tools Platform (WTP) @buildversionid@"
+        label="Web Tools Platform (WTP) @buildversionid@">
         <description>
             These features provide functionality with the executable code only and are recommended for most users.
         </description>
     </category-def>
     <category-def
-        name="Web Tools Platform SDK (WTP SDK) 3.2.2"
-        label="Web Tools Platform SDK (WTP SDK) 3.2.2">
+        name="Web Tools Platform SDK (WTP SDK) @buildversionid@"
+        label="Web Tools Platform SDK (WTP SDK) @buildversionid@">
         <description>
             These features provide functionality with the executable code and the source code and are recommended for those
             extending or debugging
diff --git a/releng.wtpbuilder/components/dali.tests/category.xml b/releng.wtpbuilder/components/dali.tests/category.xml
index 36b2626..bd657b4 100644
--- a/releng.wtpbuilder/components/dali.tests/category.xml
+++ b/releng.wtpbuilder/components/dali.tests/category.xml
@@ -4,11 +4,11 @@
     <feature
         id="org.eclipse.jpt.tests">
         <category
-            name="Web Tools Platform Tests (WTP Tests) 3.2.2"/>
+            name="Web Tools Platform Tests (WTP Tests) @buildversionid@"/>
     </feature>
     <category-def
-        name="Web Tools Platform Tests (WTP Tests) 3.2.2"
-        label="Web Tools Platform Tests (WTP Tests) 3.2.2">
+        name="Web Tools Platform Tests (WTP Tests) @buildversionid@"
+        label="Web Tools Platform Tests (WTP Tests) @buildversionid@">
         <description>
             These features provide Unit tests for WTP. WTP Committers, or others testing WTP, will need these in at least
             their PDE Targets.
diff --git a/releng.wtpbuilder/components/jst-sdk/category.xml b/releng.wtpbuilder/components/jst-sdk/category.xml
index a88d6d3..1ddc857 100644
--- a/releng.wtpbuilder/components/jst-sdk/category.xml
+++ b/releng.wtpbuilder/components/jst-sdk/category.xml
@@ -3,94 +3,94 @@
     <feature
         id="org.eclipse.jst.enterprise_ui.feature">
         <category
-            name="Web Tools Platform (WTP) 3.2.2"/>
+            name="Web Tools Platform (WTP) @buildversionid@"/>
     </feature>
     <feature
         id="org.eclipse.jsf.feature">
         <category
-            name="Web Tools Platform (WTP) 3.2.2"/>
+            name="Web Tools Platform (WTP) @buildversionid@"/>
     </feature>
     <feature
         id="org.eclipse.jst.enterprise_sdk.feature">
         <category
-            name="Web Tools Platform SDK (WTP SDK) 3.2.2"/>
+            name="Web Tools Platform SDK (WTP SDK) @buildversionid@"/>
     </feature>
     <feature
         id="org.eclipse.jsf_sdk.feature">
         <category
-            name="Web Tools Platform SDK (WTP SDK) 3.2.2"/>
+            name="Web Tools Platform SDK (WTP SDK) @buildversionid@"/>
     </feature>
 
     <feature
         id="org.eclipse.jst.ws.jaxws_sdk.feature">
         <category
-            name="Web Tools Platform SDK (WTP SDK) 3.2.2"/>
+            name="Web Tools Platform SDK (WTP SDK) @buildversionid@"/>
     </feature>
     <feature
         id="org.eclipse.jst.ws.jaxws.dom_sdk.feature">
         <category
-            name="Web Tools Platform SDK (WTP SDK) 3.2.2"/>
+            name="Web Tools Platform SDK (WTP SDK) @buildversionid@"/>
     </feature>
     <feature
         id="org.eclipse.jst.ws.cxf_sdk.feature">
         <category
-            name="Web Tools Platform SDK (WTP SDK) 3.2.2"/>
+            name="Web Tools Platform SDK (WTP SDK) @buildversionid@"/>
     </feature>
     <feature
         id="org.eclipse.jst.jsf.apache.trinidad.tagsupport_sdk.feature">
         <category
-            name="Web Tools Platform SDK (WTP SDK) 3.2.2"/>
+            name="Web Tools Platform SDK (WTP SDK) @buildversionid@"/>
     </feature>
     <feature
         id="org.eclipse.jst.ws.axis2tools_sdk.feature">
         <category
-            name="Web Tools Platform SDK (WTP SDK) 3.2.2"/>
+            name="Web Tools Platform SDK (WTP SDK) @buildversionid@"/>
     </feature>
     <feature
         id="org.eclipse.jst.webpageeditor_sdk.feature">
         <category
-            name="Web Tools Platform SDK (WTP SDK) 3.2.2"/>
+            name="Web Tools Platform SDK (WTP SDK) @buildversionid@"/>
     </feature>
     <feature
         id="org.eclipse.jst.ws.axis2tools.feature">
         <category
-            name="Web Tools Platform (WTP) 3.2.2"/>
+            name="Web Tools Platform (WTP) @buildversionid@"/>
     </feature>
     <feature
         id="org.eclipse.jst.webpageeditor.feature">
         <category
-            name="Web Tools Platform (WTP) 3.2.2"/>
+            name="Web Tools Platform (WTP) @buildversionid@"/>
     </feature>
     <feature
         id="org.eclipse.jst.ws.jaxws.feature">
         <category
-            name="Web Tools Platform (WTP) 3.2.2"/>
+            name="Web Tools Platform (WTP) @buildversionid@"/>
     </feature>
     <feature
         id="org.eclipse.jst.ws.jaxws.dom.feature">
         <category
-            name="Web Tools Platform (WTP) 3.2.2"/>
+            name="Web Tools Platform (WTP) @buildversionid@"/>
     </feature>
     <feature
         id="org.eclipse.jst.jsf.apache.trinidad.tagsupport.feature">
         <category
-            name="Web Tools Platform (WTP) 3.2.2"/>
+            name="Web Tools Platform (WTP) @buildversionid@"/>
     </feature>
     <feature
         id="org.eclipse.jst.ws.cxf.feature">
         <category
-            name="Web Tools Platform (WTP) 3.2.2"/>
+            name="Web Tools Platform (WTP) @buildversionid@"/>
     </feature>
     <category-def
-        name="Web Tools Platform (WTP) 3.2.2"
-        label="Web Tools Platform (WTP) 3.2.2">
+        name="Web Tools Platform (WTP) @buildversionid@"
+        label="Web Tools Platform (WTP) @buildversionid@">
         <description>
             These features provide functionality with the executable code only and are recommended for most users.
         </description>
     </category-def>
     <category-def
-        name="Web Tools Platform SDK (WTP SDK) 3.2.2"
-        label="Web Tools Platform SDK (WTP SDK) 3.2.2">
+        name="Web Tools Platform SDK (WTP SDK) @buildversionid@"
+        label="Web Tools Platform SDK (WTP SDK) @buildversionid@">
         <description>
             These features provide functionality with the executable code and the source code and are recommended for those
             extending or debugging
diff --git a/releng.wtpbuilder/components/jst.tests/category.xml b/releng.wtpbuilder/components/jst.tests/category.xml
index 23f57f4..ca831aa 100644
--- a/releng.wtpbuilder/components/jst.tests/category.xml
+++ b/releng.wtpbuilder/components/jst.tests/category.xml
@@ -3,51 +3,51 @@
     <feature
         id="org.eclipse.jst.ws.jaxws_tests.feature">
         <category
-            name="Web Tools Platform Tests (WTP Tests) 3.2.2"/>
+            name="Web Tools Platform Tests (WTP Tests) @buildversionid@"/>
     </feature>
     <feature
         id="org.eclipse.jst.ws.cxf_tests.feature">
         <category
-            name="Web Tools Platform Tests (WTP Tests) 3.2.2"/>
+            name="Web Tools Platform Tests (WTP Tests) @buildversionid@"/>
     </feature>
     <feature
         id="org.eclipse.jst.jsf.tests.feature">
         <category
-            name="Web Tools Platform Tests (WTP Tests) 3.2.2"/>
+            name="Web Tools Platform Tests (WTP Tests) @buildversionid@"/>
     </feature>
     <feature
         id="org.eclipse.jst.web_tests.feature">
         <category
-            name="Web Tools Platform Tests (WTP Tests) 3.2.2"/>
+            name="Web Tools Platform Tests (WTP Tests) @buildversionid@"/>
     </feature>
     <feature
         id="org.eclipse.jst.enterprise_tests.feature">
         <category
-            name="Web Tools Platform Tests (WTP Tests) 3.2.2"/>
+            name="Web Tools Platform Tests (WTP Tests) @buildversionid@"/>
     </feature>
     <feature
         id="org.eclipse.jst.server_tests.feature">
         <category
-            name="Web Tools Platform Tests (WTP Tests) 3.2.2"/>
+            name="Web Tools Platform Tests (WTP Tests) @buildversionid@"/>
     </feature>
     <feature
         id="org.eclipse.jst.server_adapters.ext_tests.feature">
         <category
-            name="Web Tools Platform Tests (WTP Tests) 3.2.2"/>
+            name="Web Tools Platform Tests (WTP Tests) @buildversionid@"/>
     </feature>
     <feature
         id="org.eclipse.wtp.releng.tools.feature">
         <category
-            name="Web Tools Platform Tests (WTP Tests) 3.2.2"/>
+            name="Web Tools Platform Tests (WTP Tests) @buildversionid@"/>
     </feature>
     <feature
         id="org.eclipse.jst.ws.jaxws.dom_tests.feature">
         <category
-            name="Web Tools Platform Tests (WTP Tests) 3.2.2"/>
+            name="Web Tools Platform Tests (WTP Tests) @buildversionid@"/>
     </feature>
     <category-def
-        name="Web Tools Platform Tests (WTP Tests) 3.2.2"
-        label="Web Tools Platform Tests (WTP Tests) 3.2.2">
+        name="Web Tools Platform Tests (WTP Tests) @buildversionid@"
+        label="Web Tools Platform Tests (WTP Tests) @buildversionid@">
         <description>
             These features provide Unit tests for WTP. WTP Committers, or others testing WTP, will need these in at least
             their PDE Targets.
diff --git a/releng.wtpbuilder/components/wst-sdk/category.xml b/releng.wtpbuilder/components/wst-sdk/category.xml
index 456f001..b332454 100644
--- a/releng.wtpbuilder/components/wst-sdk/category.xml
+++ b/releng.wtpbuilder/components/wst-sdk/category.xml
@@ -3,73 +3,73 @@
     <feature
                 id="org.eclipse.wst.common.fproj.sdk">
         <category
-            name="Web Tools Platform SDK (WTP SDK) 3.2.2"/>
+            name="Web Tools Platform SDK (WTP SDK) @buildversionid@"/>
     </feature>
     <feature
                 id="org.eclipse.wst.xml_sdk.feature">
         <category
-            name="Web Tools Platform SDK (WTP SDK) 3.2.2"/>
+            name="Web Tools Platform SDK (WTP SDK) @buildversionid@"/>
     </feature>
     <feature
                 id="org.eclipse.wst.web_sdk.feature">
         <category
-            name="Web Tools Platform SDK (WTP SDK) 3.2.2"/>
+            name="Web Tools Platform SDK (WTP SDK) @buildversionid@"/>
     </feature>
     <feature
                 id="org.eclipse.wst.xsl_sdk.feature">
         <category
-            name="Web Tools Platform SDK (WTP SDK) 3.2.2"/>
+            name="Web Tools Platform SDK (WTP SDK) @buildversionid@"/>
     </feature>
     <feature
                 id="org.eclipse.wst.server_adapters.sdk.feature">
         <category
-            name="Web Tools Platform SDK (WTP SDK) 3.2.2"/>
+            name="Web Tools Platform SDK (WTP SDK) @buildversionid@"/>
     </feature>
     <feature
                 id="org.eclipse.wst.common.fproj">
         <category
-            name="Web Tools Platform (WTP) 3.2.2"/>
+            name="Web Tools Platform (WTP) @buildversionid@"/>
     </feature>
     <feature
                 id="org.eclipse.wst.xsl.feature">
         <category
-            name="Web Tools Platform (WTP) 3.2.2"/>
+            name="Web Tools Platform (WTP) @buildversionid@"/>
     </feature>
     <feature
                 id="org.eclipse.wst.server_adapters.feature">
         <category
-            name="Web Tools Platform (WTP) 3.2.2"/>
+            name="Web Tools Platform (WTP) @buildversionid@"/>
     </feature>
     <feature
                 id="org.eclipse.wst.web_ui.feature">
         <category
-            name="Web Tools Platform (WTP) 3.2.2"/>
+            name="Web Tools Platform (WTP) @buildversionid@"/>
     </feature>
     <feature
                 id="org.eclipse.wst.xml_ui.feature">
         <category
-            name="Web Tools Platform (WTP) 3.2.2"/>
+            name="Web Tools Platform (WTP) @buildversionid@"/>
     </feature>
     <feature
                 id="org.eclipse.wst.jsdt.feature">
         <category
-            name="Web Tools Platform (WTP) 3.2.2"/>
+            name="Web Tools Platform (WTP) @buildversionid@"/>
     </feature>
     <feature
     id="org.eclipse.wst.jsdt_sdk.feature">
         <category
-            name="Web Tools Platform SDK (WTP SDK) 3.2.2"/>
+            name="Web Tools Platform SDK (WTP SDK) @buildversionid@"/>
     </feature>
     <category-def
-        name="Web Tools Platform (WTP) 3.2.2"
-        label="Web Tools Platform (WTP) 3.2.2">
+        name="Web Tools Platform (WTP) @buildversionid@"
+        label="Web Tools Platform (WTP) @buildversionid@">
         <description>
             These features provide functionality with the executable code only and are recommended for most users.
       </description>
     </category-def>
     <category-def
-        name="Web Tools Platform SDK (WTP SDK) 3.2.2"
-        label="Web Tools Platform SDK (WTP SDK) 3.2.2">
+        name="Web Tools Platform SDK (WTP SDK) @buildversionid@"
+        label="Web Tools Platform SDK (WTP SDK) @buildversionid@">
         <description>
             These features provide functionality with the executable code and the source code and are recommended for those
             extending or debugging
diff --git a/releng.wtpbuilder/components/wst-sdk/customTargets.xml b/releng.wtpbuilder/components/wst-sdk/customTargets.xml
index e3d6954..cb0333d 100644
--- a/releng.wtpbuilder/components/wst-sdk/customTargets.xml
+++ b/releng.wtpbuilder/components/wst-sdk/customTargets.xml
@@ -46,9 +46,17 @@
     <property
         name="p2.build.repo"
         value="file://${p2buildrepoDirectory}/"/>
+	
+       
+    <property
+        name="p2.category.definition.file"
+        value="${wtp.builder.home}/components/${component}/category.xml"/>
+	
     <property
         name="p2.category.definition"
-        value="file:/${wtp.builder.home}/components/${component}/category.xml"/>
+        value="file:/${p2.category.definition.file}"/>
+    	
+	
     <echo
         message="p2.build.repo: ${p2.build.repo}"/>
     <echo
@@ -134,6 +142,9 @@
         <!-- Get the dependencies -->
         <antcall
             target="getDependencies"/>
+    	
+    	 <antcall 
+	     target="updateCategoriesFiles" />
     </target>
     <!--
         =====================================================================
@@ -352,6 +363,29 @@
         </antcall>
     </target>
 
+<!--
+   Note: buildId is typically of the form "3.3.0"
+   may want to use buildLabel, which is of form I-3.3.0-20100912032913
+   -->
+
+	    <target
+	        name="updateCategoriesFiles"
+	    	 depends="checkCategoriesFiles"
+	        if="categoryFileExists">
+              <replace
+                  file="${p2.category.definition.file)"
+                  value="${buildId}"
+                  token="@buildversionid@">
+              </replace>
+	        
+	    	 	
+	    </target>
+       <target
+           name="checkCategoriesFiles">
+           <available file="${p2.category.definition.file}" property="categoryFileExists" />
+       </target>	
+	
+	
     <!--
         Default target
     -->
diff --git a/releng.wtpbuilder/components/wst.tests/category.xml b/releng.wtpbuilder/components/wst.tests/category.xml
index 2fe40fe..f4813be 100644
--- a/releng.wtpbuilder/components/wst.tests/category.xml
+++ b/releng.wtpbuilder/components/wst.tests/category.xml
@@ -3,41 +3,41 @@
     <feature
         id="org.eclipse.wst.jsdt_tests.feature">
         <category
-            name="Web Tools Platform Tests (WTP Tests) 3.2.2"/>
+            name="Web Tools Platform Tests (WTP Tests) @buildversionid@"/>
     </feature>
     <feature
         id="org.eclipse.jst.ws.jaxws_tests.feature">
         <category
-            name="Web Tools Platform Tests (WTP Tests) 3.2.2"/>
+            name="Web Tools Platform Tests (WTP Tests) @buildversionid@"/>
     </feature>
     <feature
         id="org.eclipse.wst.server_tests.feature">
         <category
-            name="Web Tools Platform Tests (WTP Tests) 3.2.2"/>
+            name="Web Tools Platform Tests (WTP Tests) @buildversionid@"/>
     </feature>
     <feature
         id="org.eclipse.wst.common_tests.feature">
         <category
-            name="Web Tools Platform Tests (WTP Tests) 3.2.2"/>
+            name="Web Tools Platform Tests (WTP Tests) @buildversionid@"/>
     </feature>
     <feature
         id="org.eclipse.wtp.releng.tests.feature">
         <category
-            name="Web Tools Platform Tests (WTP Tests) 3.2.2"/>
+            name="Web Tools Platform Tests (WTP Tests) @buildversionid@"/>
     </feature>
     <feature
         id="org.eclipse.wst.web_tests.feature">
         <category
-            name="Web Tools Platform Tests (WTP Tests) 3.2.2"/>
+            name="Web Tools Platform Tests (WTP Tests) @buildversionid@"/>
     </feature>
     <feature
         id="org.eclipse.wst.xml_tests.feature">
         <category
-            name="Web Tools Platform Tests (WTP Tests) 3.2.2"/>
+            name="Web Tools Platform Tests (WTP Tests) @buildversionid@"/>
     </feature>
     <category-def
-        name="Web Tools Platform Tests (WTP Tests) 3.2.2"
-        label="Web Tools Platform Tests (WTP Tests) 3.2.2">
+        name="Web Tools Platform Tests (WTP Tests) @buildversionid@"
+        label="Web Tools Platform Tests (WTP Tests) @buildversionid@">
         <description>
             These features provide Unit tests for WTP. WTP Committers, or others testing WTP, will need these in at least
             their PDE Targets.