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

michi at wyona.com michi at wyona.com
Thu Dec 10 15:06:20 CET 2009


Author: michi
Date: 2009-12-10 15:06:20 +0100 (Thu, 10 Dec 2009)
New Revision: 45945

Modified:
   public/yanel/trunk/src/build/targets/check-conf-version.xml
Log:
check version of log4j properties file

Modified: public/yanel/trunk/src/build/targets/check-conf-version.xml
===================================================================
--- public/yanel/trunk/src/build/targets/check-conf-version.xml	2009-12-10 13:16:39 UTC (rev 45944)
+++ public/yanel/trunk/src/build/targets/check-conf-version.xml	2009-12-10 14:06:20 UTC (rev 45945)
@@ -2,7 +2,8 @@
 
 <project name="check-conf-version" default="check">
     
-  <target name="check-config-version" depends="init">
+<!-- INFO: The various antcall-targets are used individually at various places
+  <target name="check-configs-re-version" depends="init">
     <condition property="local.yanel.config.exists">
       <available file="${local.config.home}/local.yanel.xml" type="file"/>
     </condition> 
@@ -17,10 +18,14 @@
       <available file="${local.config.home}/local.resource-types.xml" type="file"/>
     </condition>
     <antcall target="check-config-version-resource-types-xml"/>
+
+    <condition property="local.log4j.config.exists">
+      <available file="${local.config.home}/local.log4j.properties" type="file"/>
+    </condition>
+    <antcall target="check-config-version-log4j-properties"/>
   </target>
+-->
 
-
-
   <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"/>
@@ -31,6 +36,22 @@
     <fail unless="local.yanel.properties.in.sync" message="It seems that your local.yanel.xml is out of date. Please compare your local.yanel.xml with the default configuration conf/yanel.xml and update accordingly."/>
   </target>
 
+  <target name="check-config-version-log4j-properties" if="local.log4j.config.exists">
+    <echo>Check version of local.log4j.properties ...</echo>
+
+    <!-- TODO: Check if property actually exists or rather is set! -->
+    <property file="${local.config.home}/local.log4j.properties" prefix="local.log4j"/>
+    <property file="${yanel.source.home}/conf/log4j.properties"/>
+
+    <echo>Local log4j properties version: ${local.log4j.version.log4j.properties}</echo>
+    <echo>Source log4j properties version: ${version.log4j.properties}</echo>
+
+    <condition property="local.log4j.properties.in.sync">
+      <equals arg1="${local.log4j.version.log4j.properties}" arg2="${version.log4j.properties}"/>
+    </condition>
+    <fail unless="local.log4j.properties.in.sync" message="WARNING: It seems that your local.log4j.properties is out of date. Please compare your local.log4j.properties with the default configuration conf/log4j.properties (see changes within conf/log4j.properties) and update accordingly."/>
+  </target>
+
   <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"/>



More information about the Yanel-commits mailing list