[Yanel-commits] rev 42448 - in public/yanel/trunk/src/build: . targets

michi at wyona.com michi at wyona.com
Tue Apr 21 14:56:46 CEST 2009


Author: michi
Date: 2009-04-21 14:56:45 +0200 (Tue, 21 Apr 2009)
New Revision: 42448

Modified:
   public/yanel/trunk/src/build/targets/resources.xml
   public/yanel/trunk/src/build/yanel2resources.xsl
Log:
generation of resource types build file simplified

Modified: public/yanel/trunk/src/build/targets/resources.xml
===================================================================
--- public/yanel/trunk/src/build/targets/resources.xml	2009-04-21 08:33:28 UTC (rev 42447)
+++ public/yanel/trunk/src/build/targets/resources.xml	2009-04-21 12:56:45 UTC (rev 42448)
@@ -37,18 +37,8 @@
 
     <antcall target="prepare-realms-config"/>
     <antcall target="prepare-global-resource-types-config"/>
-
     <merge-resource-types-configs defaultrealmsconfigdir="${yanel.source.home}/conf/" localrealmsconfigdir="${local.config.home}/"/>
-
-    <condition property="local.resource-types.config.exists">
-      <available file="${local.config.home}/local.resource-types.xml" type="file"/>
-    </condition>
-    <antcall target="generate-resources-build-from-default"/>
-    <antcall target="generate-resources-build-from-local"/>
-
-    <replace file="../../build/build-resource-types.xml" value="${yanel.source.home.forward.slashes}">
-      <replacetoken>@YANEL_SRC_DIR@</replacetoken>
-    </replace>
+    <antcall target="generate-resources-build-file"/>
   </target>
 
   <target name="prepare-global-resource-types-config">
@@ -85,22 +75,15 @@
     </replace>
   </target>
 
-  <target name="generate-resources-build-from-default" description="Generate resources build from default config" depends="init" unless="local.resource-types.config.exists">
-    <xslt in="${yanel.source.home}/conf/resource-types.xml" out="../../build/build-resource-types.xml" style="yanel2resources.xsl" force="false">
+  <target name="generate-resources-build-file" description="Generate resources build file" depends="init">
+    <xslt in="${classes.dir}/resource-types.xml" out="../../build/build-resource-types.xml" style="yanel2resources.xsl" force="true">
       <param name="servlet.context.prefix" expression="${servlet.context.prefix}"/>
       <param name="yanel.source.version" expression="${yanel.version}-r${yanel.revision}"/>
       <param name="maven.url" expression="${maven.url}"/>
+      <param name="yanel.source.home" expression="${yanel.source.home.forward.slashes}"/>
     </xslt>
   </target>
 
-  <target name="generate-resources-build-from-local" description="Generate resources build from local config" depends="init" if="local.resource-types.config.exists">
-    <xslt in="${local.config.home}/local.resource-types.xml" out="../../build/build-resource-types.xml" style="yanel2resources.xsl" force="true">
-      <param name="servlet.context.prefix" expression="${servlet.context.prefix}"/>
-      <param name="yanel.source.version" expression="${yanel.version}-r${yanel.revision}"/>
-      <param name="maven.url" expression="${maven.url}"/>
-    </xslt>
-  </target>
-
   <target name="build-resources" description="Build resources" depends="generate-resources-build">
     <condition property="local.resource-types.config.exists">
       <available file="${local.config.home}/local.resource-types.xml" type="file"/>

Modified: public/yanel/trunk/src/build/yanel2resources.xsl
===================================================================
--- public/yanel/trunk/src/build/yanel2resources.xsl	2009-04-21 08:33:28 UTC (rev 42447)
+++ public/yanel/trunk/src/build/yanel2resources.xsl	2009-04-21 12:56:45 UTC (rev 42448)
@@ -10,6 +10,7 @@
 <xsl:param name="servlet.context.prefix" select="'NULL_servlet_context_prefix'"/>
 <xsl:param name="yanel.source.version" select="'NULL_yanel_source_version'"/>
 <xsl:param name="maven.url" select="'NULL_maven_url'"/>
+<xsl:param name="yanel.source.home" select="'NULL_yanel_source_home'"/>
 
 <xsl:template match="/">
 
@@ -41,21 +42,21 @@
     <ant inheritAll="false" antfile="{@src}/build.xml" target="compile">
       <property name="yanel.source.version" value="{$yanel.source.version}"/>
       <property name="maven.url" value="{$maven.url}"/>
-      <property name="yanel.source.home" value="@YANEL_SRC_DIR@"/>
+      <property name="yanel.source.home" value="{$yanel.source.home}"/>
     </ant>
         </xsl:when>
         <xsl:when test="starts-with(@src, '@YANEL_SRC_DIR@')">
     <ant inheritAll="false" antfile="{@src}/build.xml" target="compile">
       <property name="yanel.source.version" value="{$yanel.source.version}"/>
       <property name="maven.url" value="{$maven.url}"/>
-      <property name="yanel.source.home" value="@YANEL_SRC_DIR@"/>
+      <property name="yanel.source.home" value="{$yanel.source.home}"/>
     </ant>
         </xsl:when>
         <xsl:otherwise>
     <ant inheritAll="false" antfile="${{build.dir}}/{@src}/build.xml" target="compile">
       <property name="yanel.source.version" value="{$yanel.source.version}"/>
       <property name="maven.url" value="{$maven.url}"/>
-      <property name="yanel.source.home" value="@YANEL_SRC_DIR@"/>
+      <property name="yanel.source.home" value="{$yanel.source.home}"/>
     </ant>
         </xsl:otherwise>
       </xsl:choose>
@@ -154,7 +155,7 @@
       <property name="servlet.context.prefix" value="{$servlet.context.prefix}"/>
       <property name="yanel.source.version" value="{$yanel.source.version}"/>
       <property name="maven.url" value="{$maven.url}"/>
-      <property name="yanel.source.home" value="@YANEL_SRC_DIR@"/>
+      <property name="yanel.source.home" value="{$yanel.source.home}"/>
     </ant>
       </xsl:when>
       <xsl:when test="starts-with(@src, '@YANEL_SRC_DIR@')">
@@ -163,7 +164,7 @@
       <property name="servlet.context.prefix" value="{$servlet.context.prefix}"/>
       <property name="yanel.source.version" value="{$yanel.source.version}"/>
       <property name="maven.url" value="{$maven.url}"/>
-      <property name="yanel.source.home" value="@YANEL_SRC_DIR@"/>
+      <property name="yanel.source.home" value="{$yanel.source.home}"/>
     </ant>
       </xsl:when>
       <xsl:otherwise>
@@ -172,7 +173,7 @@
       <property name="servlet.context.prefix" value="{$servlet.context.prefix}"/>
       <property name="yanel.source.version" value="{$yanel.source.version}"/>
       <property name="maven.url" value="{$maven.url}"/>
-      <property name="yanel.source.home" value="@YANEL_SRC_DIR@"/>
+      <property name="yanel.source.home" value="{$yanel.source.home}"/>
     </ant>
       </xsl:otherwise>
     </xsl:choose>



More information about the Yanel-commits mailing list