[Yanel-commits] rev 29089 - public/yanel/trunk/src/build

michi at wyona.com michi at wyona.com
Tue Nov 20 22:27:59 CET 2007


Author: michi
Date: 2007-11-20 22:27:58 +0100 (Tue, 20 Nov 2007)
New Revision: 29089

Modified:
   public/yanel/trunk/src/build/yanel2resources.xsl
Log:
copy resources if copy attribute has been set to true

Modified: public/yanel/trunk/src/build/yanel2resources.xsl
===================================================================
--- public/yanel/trunk/src/build/yanel2resources.xsl	2007-11-20 19:56:32 UTC (rev 29088)
+++ public/yanel/trunk/src/build/yanel2resources.xsl	2007-11-20 21:27:58 UTC (rev 29089)
@@ -62,10 +62,28 @@
 
   <xsl:comment>INFO: Deploy libs of resources</xsl:comment>
   <target name="deploy-resources" description="Deploy resources" depends="init">
+    <mkdir dir="${{build.dir}}/webapps/{$servlet.context.prefix}/resources"/>
 <xsl:for-each select="/yanel:resource-types/yanel:resource-type">
 
-    <xsl:if test="@copy">
+    <xsl:if test="@copy and @copy = 'true'">
       <xsl:comment>TODO: Copy sources ...</xsl:comment>
+    <xsl:choose>
+      <xsl:when test="starts-with(@src, '/') or string-length(substring-before(@src, ':/'))='1'">
+    <copy todir="${{build.dir}}/webapps/{$servlet.context.prefix}/resources">
+      <fileset dir="{@src}" excludes="build/**, src/java/**, src/build/**, build.xml"/>
+    </copy>
+      </xsl:when>
+      <xsl:when test="starts-with(@src, '@YANEL_SRC_DIR@')">
+    <copy todir="${{build.dir}}/webapps/{$servlet.context.prefix}/resources/pdf">
+      <fileset dir="{@src}" excludes="build/**, src/java/**, src/build/**, build.xml"/>
+    </copy>
+      </xsl:when>
+      <xsl:otherwise>
+    <copy todir="${{build.dir}}/webapps/{$servlet.context.prefix}/resources">
+      <fileset dir="${{build.dir}}/{@src}" excludes="build/**, src/java/**, src/build/**, build.xml"/>
+    </copy>
+      </xsl:otherwise>
+    </xsl:choose>
     </xsl:if>
 
     <xsl:choose>



More information about the Yanel-commits mailing list