Author: nickboldt
Date: 2010-05-08 10:52:00 -0400 (Sat, 08 May 2010)
New Revision: 21971
Modified:
branches/modular_build/build/build.xml
Log:
better approach: if no features/ or plugins/ found in target/site, delete the site.zip and
report a warning/error
Modified: branches/modular_build/build/build.xml
===================================================================
--- branches/modular_build/build/build.xml 2010-05-08 14:49:16 UTC (rev 21970)
+++ branches/modular_build/build/build.xml 2010-05-08 14:52:00 UTC (rev 21971)
@@ -880,30 +880,59 @@
</else>
</if>
- <!-- rename resulting update site zip -->
- <move file="${WORKINGDIR}/${update.site.path}/target/site.zip"
- tofile="${destinationZip}"
- overwrite="true"
- preservelastmodified="false"
- />
-
- <!-- Copy zip into workspace so it can be archived by Hudson -->
<if>
- <not>
- <equals arg1="${basedir}" arg2="${WORKINGDIR}" />
- </not>
+ <and>
+ <available file="${WORKINGDIR}/${update.site.path}/target/site/plugins"
type="dir" />
+ <available file="${WORKINGDIR}/${update.site.path}/target/site/features"
type="dir" />
+ </and>
<then>
- <mkdir dir="${basedir}/${update.site.path}/target" />
- <copy todir="${basedir}/${update.site.path}/target"
- flatten="true"
- preservelastmodified="true"
+ <!-- rename resulting update site zip -->
+ <move file="${WORKINGDIR}/${update.site.path}/target/site.zip"
+ tofile="${destinationZip}"
overwrite="true"
- >
- <fileset dir="${WORKINGDIR}/${update.site.path}/target"
includes="*Update*.zip" />
+ preservelastmodified="false"
+ />
+
+ <!-- Create real update site zip, including web UI -->
+ <copy todir="${WORKINGDIR}/${update.site.path}/target/site">
+ <fileset dir="${WORKINGDIR}/${update.site.path}" includes="web/*,
index.html" />
</copy>
+ <zip destfile="${destinationZip}"
+ basedir="${WORKINGDIR}/${update.site.path}/target/site"
+ update="true"
+ includes="web/*, index.html"
+ />
+
+ <!-- Copy zip into workspace so it can be archived by Hudson -->
+ <if>
+ <not>
+ <equals arg1="${basedir}" arg2="${WORKINGDIR}" />
+ </not>
+ <then>
+ <mkdir dir="${basedir}/${update.site.path}/target" />
+ <copy todir="${basedir}/${update.site.path}/target"
+ flatten="true"
+ preservelastmodified="true"
+ overwrite="true"
+ >
+ <fileset dir="${WORKINGDIR}/${update.site.path}/target"
includes="*Update*.zip" />
+ </copy>
+ </then>
+ </if>
</then>
+ <else>
+ <delete file="${WORKINGDIR}/${update.site.path}/target/site.zip"
quiet="true" />
+ <if>
+ <equals arg1="${update.site.path}" arg2="site" />
+ <then>
+ <fail>Overall update site zip contains no features!</fail>
+ </then>
+ <else>
+ <echo level="info">Update site zip for ${COMPONENTS.to.build}
contains no features!</echo>
+ </else>
+ </if>
+ </else>
</if>
-
</target>
<!-- Used to build the update site of a component; requires a site.xml and pom.xml be
generated first -->
Show replies by date