[jbosstools-commits] JBoss Tools SVN: r21930 - branches/modular_build/build.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Wed May 5 20:32:23 EDT 2010


Author: nickboldt
Date: 2010-05-05 20:32:22 -0400 (Wed, 05 May 2010)
New Revision: 21930

Modified:
   branches/modular_build/build/build.xml
Log:
add task to audit features in update site zips (eg., why does common include org.eclipse.wst.common_{core,ui}.feature? why does vpe include org.jboss.tools.xulrunner.feature?)

Modified: branches/modular_build/build/build.xml
===================================================================
--- branches/modular_build/build/build.xml	2010-05-05 22:41:27 UTC (rev 21929)
+++ branches/modular_build/build/build.xml	2010-05-06 00:32:22 UTC (rev 21930)
@@ -112,7 +112,7 @@
 
 	<target name="run"
 	        description="run a build, collect test results, generate overall update site"
-	        depends="build, collect.all.test.results, create.overall.update.site"
+	        depends="build, collect.all.test.results, create.overall.update.site, collect.update.site.results"
 	/>
 
 	<target name="build"
@@ -671,6 +671,88 @@
 		</if>
 	</target>
 
+	<!-- collect names, dates, and contained features in all generated update site zips, including the overall one -->
+	<target name="collect.update.site.results" depends="init">
+		<var name="COMPONENTS.to.check" unset="" />
+		<if>
+			<isset property="COMPONENTS.to.build" />
+			<then>
+				<var name="COMPONENTS.to.check" value="${COMPONENTS.to.build}" />
+			</then>
+			<else>
+				<var name="COMPONENTS.to.check" value="${COMPONENTS}" />
+			</else>
+		</if>
+		<if>
+			<not>
+				<contains string="${COMPONENTS.to.check}" substring=",site" />
+			</not>
+			<then>
+				<var name="COMPONENTS.to.check" value="${COMPONENTS.to.check},site" />
+			</then>
+		</if>
+		<for param="COMPONENT" list="${COMPONENTS.to.check}" delimiter=",; 
+	">
+			<sequential>
+				<for param="updateZip">
+					<path>
+						<fileset dir="${WORKINGDIR}/@{COMPONENT}" includes="**/JBossTools*Update*.zip" />
+					</path>
+					<sequential>
+						<propertyregex property="updateZip"
+						               defaultvalue="@{updateZip}"
+						               input="@{updateZip}"
+						               regexp=".+/site/target/([^/]+.+\.zip)"
+						               replace="\1"
+						               override="true"
+						/>
+						<exec executable="unzip" outputproperty="zip.contents">
+							<arg line="-l @{updateZip}" />
+						</exec>
+						<if>
+							<and>
+								<isset property="zip.contents" />
+								<contains string="${zip.contents}" substring="plugins/" />
+								<contains string="${zip.contents}" substring=".jar" />
+							</and>
+							<then>
+								<echo level="info">@{COMPONENT} :: ${updateZip}</echo>
+								<for param="featureJar" list="${zip.contents}" delimiter="
+">
+									<sequential>
+										<if>
+											<and>
+												<contains string="@{featureJar}" substring="features/" />
+												<contains string="@{featureJar}" substring=".jar" />
+											</and>
+											<then>
+												<echo level="info">  :: @{featureJar}</echo>
+											</then>
+										</if>
+									</sequential>
+								</for>
+							</then>
+							<else>
+								<echo level="warn">@{COMPONENT} :: ${updateZip}</echo>
+							</else>
+						</if>
+					</sequential>
+				</for>
+				<if>
+					<not>
+						<isset property="zip.contents" />
+					</not>
+					<then>
+						<echo level="warn">No update site found for @{COMPONENT}.</echo>
+					</then>
+				</if>
+				<var name="zip.contents" unset="true" />
+				<var name="zip.features" unset="true" />
+				<echo level="info"></echo>
+			</sequential>
+		</for>
+	</target>
+
 	<!-- Used to build the overall update site for all components; requires a custom site.xml (generated from category.*.xml) and previously checked in pom.xml -->
 	<target name="create.overall.update.site" depends="init" unless="no.overall">
 		<if>



More information about the jbosstools-commits mailing list