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

guillaume at wyona.com guillaume at wyona.com
Mon Apr 6 20:20:14 CEST 2009


Author: guillaume
Date: 2009-04-06 20:20:13 +0200 (Mon, 06 Apr 2009)
New Revision: 42284

Modified:
   public/yanel/trunk/src/build/build.xml
   public/yanel/trunk/src/build/targets/check-conf-version.xml
   public/yanel/trunk/src/build/targets/webapp/webapp.xml
Log:
Refactoring: introduced as a new Ant property the absolute path of the configuration directory.

This still has to be used *everywhere* in the build scripts to be really usable,
 I only changed it in the places where I really need it for now
 (to make use of relative paths in Yanel configuration possible at build time),
 no harm will be done provided you do not use it without completing these changes!

Issue: 6888



Modified: public/yanel/trunk/src/build/build.xml
===================================================================
--- public/yanel/trunk/src/build/build.xml	2009-04-06 17:13:51 UTC (rev 42283)
+++ public/yanel/trunk/src/build/build.xml	2009-04-06 18:20:13 UTC (rev 42284)
@@ -29,6 +29,11 @@
   <property file="local.build.properties"/>
   <property file="build.properties"/>
   <property name="yanel.source.home" value="${basedir}/../../"/>
+
+  <!--TODO: Use this property everywhere and then we may advertise it in build.properties! -->
+  <property name="local.config.home" location="${yanel.source.home}/${local.config.dir}"/>
+  <!--echo>local.config.home: ${local.config.home}</echo-->
+
 <!--
   <echo>Yanel Revision: ${yanel.revision}</echo>
 -->

Modified: public/yanel/trunk/src/build/targets/check-conf-version.xml
===================================================================
--- public/yanel/trunk/src/build/targets/check-conf-version.xml	2009-04-06 17:13:51 UTC (rev 42283)
+++ public/yanel/trunk/src/build/targets/check-conf-version.xml	2009-04-06 18:20:13 UTC (rev 42284)
@@ -4,17 +4,17 @@
     
   <target name="check-config-version" depends="init">
     <condition property="local.yanel.config.exists">
-      <available file="${yanel.source.home}/${local.config.dir}/local.yanel.xml" type="file"/>
+      <available file="${local.config.home}/local.yanel.xml" type="file"/>
     </condition> 
     <antcall target="check-config-version-yanel-xml"/>
 
     <condition property="local.realms.config.exists">
-      <available file="${yanel.source.home}/${local.config.dir}/local.realms.xml" type="file"/>
+      <available file="${local.config.home}/local.realms.xml" type="file"/>
     </condition> 
     <antcall target="check-config-version-realms-xml"/>
 
     <condition property="local.resource-types.config.exists">
-      <available file="${yanel.source.home}/${local.config.dir}/local.resource-types.xml" type="file"/>
+      <available file="${local.config.home}/local.resource-types.xml" type="file"/>
     </condition>
     <antcall target="check-config-version-resource-types-xml"/>
   </target>
@@ -24,7 +24,7 @@
   <target name="check-config-version-yanel-xml" if="local.yanel.config.exists">
     <echo>Check version of local.yanel.xml ...</echo>
     <xmlproperty file="${yanel.source.home}/conf/yanel.xml" prefix="defaultconf" collapseAttributes="true"/>
-    <xmlproperty file="${yanel.source.home}/${local.config.dir}/local.yanel.xml" prefix="localconf" collapseAttributes="true"/>
+    <xmlproperty file="${local.config.home}/local.yanel.xml" prefix="localconf" collapseAttributes="true"/>
     <condition property="local.yanel.properties.in.sync">
       <equals arg1="${defaultconf.yanel.version}" arg2="${localconf.yanel.version}"/>
     </condition>
@@ -34,7 +34,7 @@
   <target name="check-config-version-realms-xml" if="local.realms.config.exists">
     <echo>Check version of local.realms.xml ...</echo>
     <xmlproperty file="${yanel.source.home}/conf/realms.xml" prefix="defaultconf" collapseAttributes="true"/>
-    <xmlproperty file="${yanel.source.home}/${local.config.dir}/local.realms.xml" prefix="localconf" collapseAttributes="true"/>
+    <xmlproperty file="${local.config.home}/local.realms.xml" prefix="localconf" collapseAttributes="true"/>
     <condition property="local.realms.properties.in.sync">
       <equals arg1="${defaultconf.realms.version}" arg2="${localconf.realms.version}"/>
     </condition>
@@ -44,7 +44,7 @@
   <target name="check-config-version-resource-types-xml" if="local.resource-types.config.exists">
     <echo>Check version of local.resource-types.xml ...</echo>
     <xmlproperty file="${yanel.source.home}/conf/resource-types.xml" prefix="defaultconf" collapseAttributes="true"/>
-    <xmlproperty file="${yanel.source.home}/${local.config.dir}/local.resource-types.xml" prefix="localconf" collapseAttributes="true"/>
+    <xmlproperty file="${local.config.home}/local.resource-types.xml" prefix="localconf" collapseAttributes="true"/>
     <condition property="local.resource-types.properties.in.sync">
       <equals arg1="${defaultconf.resource-types.version}" arg2="${localconf.resource-types.version}"/>
     </condition>

Modified: public/yanel/trunk/src/build/targets/webapp/webapp.xml
===================================================================
--- public/yanel/trunk/src/build/targets/webapp/webapp.xml	2009-04-06 17:13:51 UTC (rev 42283)
+++ public/yanel/trunk/src/build/targets/webapp/webapp.xml	2009-04-06 18:20:13 UTC (rev 42284)
@@ -75,26 +75,26 @@
     <copy file="${yanel.source.home}/conf/log4j.properties" todir="${build.dir}/webapps/${servlet.context.prefix}/WEB-INF/classes" overwrite="false"/>
     <!-- Create yanel.xml -->
     <condition property="local.yanel.config.exists">
-      <available file="${yanel.source.home}/${local.config.dir}/local.yanel.xml" type="file"/>
+      <available file="${local.config.home}/local.yanel.xml" type="file"/>
     </condition>
     <antcall target="generate-yanel-properties"/>
 
     <copy file="${yanel.source.home}/conf/realms.xml" todir="${build.dir}/webapps/${servlet.context.prefix}/WEB-INF/classes" overwrite="false"/>
 
     <condition property="local.resource-types.config.exists">
-      <available file="${yanel.source.home}/${local.config.dir}/local.resource-types.xml" type="file"/>
+      <available file="${local.config.home}/local.resource-types.xml" type="file"/>
     </condition>
     <antcall target="generate-resource-types-registry"/>
 
     <condition property="local.yanel.config.exists">
-      <available file="${yanel.source.home}/${local.config.dir}/local.yanel.xml" type="file"/>
+      <available file="${local.config.home}/local.yanel.xml" type="file"/>
     </condition>
     <antcall target="check-config-version-yanel-xml"/>
 
     <!-- Overwrite default by local properties -->
     <!-- TODO: Make the patching selectable within the build.properties of the build ... -->
-    <copy file="${yanel.source.home}/${local.config.dir}/local.log4j.properties" tofile="${build.dir}/webapps/${servlet.context.prefix}/WEB-INF/classes/log4j.properties" overwrite="true" failonerror="false"/>
-    <copy file="${yanel.source.home}/${local.config.dir}/local.realms.xml" tofile="${build.dir}/webapps/${servlet.context.prefix}/WEB-INF/classes/realms.xml" overwrite="true" failonerror="false"/>
+    <copy file="${local.config.home}/local.log4j.properties" tofile="${build.dir}/webapps/${servlet.context.prefix}/WEB-INF/classes/log4j.properties" overwrite="true" failonerror="false"/>
+    <copy file="${local.config.home}/local.realms.xml" tofile="${build.dir}/webapps/${servlet.context.prefix}/WEB-INF/classes/realms.xml" overwrite="true" failonerror="false"/>
     <antcall target="patch-with-local-yanel-config"/>
     <antcall target="patch-with-local-resource-types-registry"/>
 
@@ -215,7 +215,7 @@
   </target>
 
   <target name="patch-with-local-resource-types-registry" if="local.resource-types.config.exists">
-    <copy file="${yanel.source.home}/${local.config.dir}/local.resource-types.xml" tofile="${build.dir}/webapps/${servlet.context.prefix}/WEB-INF/classes/resource-types.xml" overwrite="true"/>
+    <copy file="${local.config.home}/local.resource-types.xml" tofile="${build.dir}/webapps/${servlet.context.prefix}/WEB-INF/classes/resource-types.xml" overwrite="true"/>
   </target>
 
   <target name="generate-yanel-properties" unless="local.yanel.config.exists">
@@ -227,7 +227,7 @@
   </target>
 
   <target name="patch-with-local-yanel-config" if="local.yanel.config.exists">
-    <xslt in="${yanel.source.home}/${local.config.dir}/local.yanel.xml" out="${build.dir}/webapps/${servlet.context.prefix}/WEB-INF/classes/yanel.xml" style="yanel2properties.xsl" force="true">
+    <xslt in="${local.config.home}/local.yanel.xml" out="${build.dir}/webapps/${servlet.context.prefix}/WEB-INF/classes/yanel.xml" style="yanel2properties.xsl" force="true">
       <param name="servlet.context.prefix" expression="${servlet.context.prefix}"/>
       <param name="yanel.revision" expression="${yanel.revision}"/>
       <param name="yanel.version" expression="${yanel.version}"/>



More information about the Yanel-commits mailing list