[Yanel-commits] rev 42312 - in public/yanel/trunk/src: build build/targets test

guillaume at wyona.com guillaume at wyona.com
Wed Apr 8 12:10:30 CEST 2009


Author: guillaume
Date: 2009-04-08 12:10:30 +0200 (Wed, 08 Apr 2009)
New Revision: 42312

Modified:
   public/yanel/trunk/src/build/build.properties
   public/yanel/trunk/src/build/build.xml
   public/yanel/trunk/src/build/targets/add-third-party-realm.xml
   public/yanel/trunk/src/build/targets/check-conf-version.xml
   public/yanel/trunk/src/build/targets/config.xml
   public/yanel/trunk/src/test/build.xml
Log:
Refactoring: using the new Ant property for the absolute path of the configuration directory *everywhere*.
It can now be safely used, see src/build/build.properties for more info!
Also fixed a few messages that only displayed the relative path.

Also removed from build.properties the equivalent but unused "yanel.local.conf.dir" property.
Issue: 6888


Modified: public/yanel/trunk/src/build/build.properties
===================================================================
--- public/yanel/trunk/src/build/build.properties	2009-04-08 09:44:23 UTC (rev 42311)
+++ public/yanel/trunk/src/build/build.properties	2009-04-08 10:10:30 UTC (rev 42312)
@@ -91,6 +91,9 @@
 # Dir name of local configuration
 local.config.dir=conf/local
 
+# Full path of local configuration (NOTE: defining it will override any local.config.dir setting.)
+#local.config.home=/path/to/project/yanel-configuration
+
 # Wyona Maven Repo URL
 maven.url=http://maven2.wyona.org/
 
@@ -117,6 +120,5 @@
 
 yanel.source.version=${yanel.version}-r${yanel.revision}
 yanel.conf.dir=${yanel.source.home}/conf
-yanel.local.conf.dir=${yanel.source.home}/${local.config.dir}
 yanel.build.webapp.classes.dir=${yanel.source.home}/build/webapps/${servlet.context.prefix}/WEB-INF/classes
 yanel.build.webapp.lib.dir=${yanel.source.home}/build/webapps/${servlet.context.prefix}/WEB-INF/lib

Modified: public/yanel/trunk/src/build/build.xml
===================================================================
--- public/yanel/trunk/src/build/build.xml	2009-04-08 09:44:23 UTC (rev 42311)
+++ public/yanel/trunk/src/build/build.xml	2009-04-08 10:10:30 UTC (rev 42312)
@@ -30,7 +30,6 @@
   <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-->
 

Modified: public/yanel/trunk/src/build/targets/add-third-party-realm.xml
===================================================================
--- public/yanel/trunk/src/build/targets/add-third-party-realm.xml	2009-04-08 09:44:23 UTC (rev 42311)
+++ public/yanel/trunk/src/build/targets/add-third-party-realm.xml	2009-04-08 10:10:30 UTC (rev 42312)
@@ -4,7 +4,7 @@
   <description>Add third party realm</description>
 
   <target name="add-realm" description="Add third party realm" depends="init, build-add-realm-task">
-    <echo>Add third party realm ${realm-config} to local config ${yanel.source.home}/${local.config.dir}</echo>
+    <echo>Add third party realm ${realm-config} to local config ${local.config.home}</echo>
 
     <taskdef name="addrealm" classpath="${yanel.source.home}/build/classes" classname="org.wyona.yanel.ant.AddRealmTask"/>
 

Modified: public/yanel/trunk/src/build/targets/check-conf-version.xml
===================================================================
--- public/yanel/trunk/src/build/targets/check-conf-version.xml	2009-04-08 09:44:23 UTC (rev 42311)
+++ public/yanel/trunk/src/build/targets/check-conf-version.xml	2009-04-08 10:10:30 UTC (rev 42312)
@@ -48,7 +48,7 @@
     <condition property="local.resource-types.properties.in.sync">
       <equals arg1="${defaultconf.resource-types.version}" arg2="${localconf.resource-types.version}"/>
     </condition>
-    <fail unless="local.resource-types.properties.in.sync" message="WARNING: It seems that your ${local.config.dir}/local.resource-types.xml is out of date. Please compare your ${local.config.dir}/local.resource-types.xml with the default configuration conf/resource-types.xml (see changes within conf/resource-types.xml) and update accordingly."/>
+    <fail unless="local.resource-types.properties.in.sync" message="WARNING: It seems that your ${local.config.home}/local.resource-types.xml is out of date. Please compare your ${local.config.home}/local.resource-types.xml with the default configuration conf/resource-types.xml (see changes within conf/resource-types.xml) and update accordingly."/>
   </target>
   
 </project>

Modified: public/yanel/trunk/src/build/targets/config.xml
===================================================================
--- public/yanel/trunk/src/build/targets/config.xml	2009-04-08 09:44:23 UTC (rev 42311)
+++ public/yanel/trunk/src/build/targets/config.xml	2009-04-08 10:10:30 UTC (rev 42312)
@@ -95,14 +95,14 @@
   <target name="configure-local" if="yes.continue">
     <echo>Will now create local properties files if these do not exist.</echo>
 
-    <mkdir dir="${yanel.source.home}/${local.config.dir}"/>
+    <mkdir dir="${local.config.home}"/>
 
-    <copy file="${yanel.source.home}/conf/yanel.xml" tofile="${yanel.source.home}/${local.config.dir}/local.yanel.xml" overwrite="false"/>
-    <copy file="${yanel.source.home}/conf/realms.xml" tofile="${yanel.source.home}/${local.config.dir}/local.realms.xml" overwrite="false"/>
-    <copy file="${yanel.source.home}/conf/resource-types.xml" tofile="${yanel.source.home}/${local.config.dir}/local.resource-types.xml" overwrite="false"/>
-    <copy file="${yanel.source.home}/conf/log4j.properties" tofile="${yanel.source.home}/${local.config.dir}/local.log4j.properties" overwrite="false"/>
+    <copy file="${yanel.source.home}/conf/yanel.xml" tofile="${local.config.home}/local.yanel.xml" overwrite="false"/>
+    <copy file="${yanel.source.home}/conf/realms.xml" tofile="${local.config.home}/local.realms.xml" overwrite="false"/>
+    <copy file="${yanel.source.home}/conf/resource-types.xml" tofile="${local.config.home}/local.resource-types.xml" overwrite="false"/>
+    <copy file="${yanel.source.home}/conf/log4j.properties" tofile="${local.config.home}/local.log4j.properties" overwrite="false"/>
 
-    <echo>Customize the ${local.config.dir}/local.* files and run build.sh OR run build.sh first and then customize the config files within build/webapps/yanel/WEB-INF/classes</echo>
+    <echo>Customize the ${local.config.home}/local.* files and run build.sh OR run build.sh first and then customize the config files within build/webapps/yanel/WEB-INF/classes</echo>
   </target>
   
 </project>

Modified: public/yanel/trunk/src/test/build.xml
===================================================================
--- public/yanel/trunk/src/test/build.xml	2009-04-08 09:44:23 UTC (rev 42311)
+++ public/yanel/trunk/src/test/build.xml	2009-04-08 10:10:30 UTC (rev 42312)
@@ -15,7 +15,8 @@
   <property name="test.results.dir" value="${test.data.dir}/test-results"/>
   <property name="test.results.archive.dir" value="${test.data.dir}/test-results-archive"/>  
   <property name="conf.dir" value="${yanel.home.dir}/conf"/>
-  <property name="local.conf.dir" value="${yanel.home.dir}/${local.config.dir}"/>
+  <property name="local.config.home" value="${yanel.home.dir}/${local.config.dir}"/>
+  <!--echo>local.config.home: ${local.config.home}</echo-->
   <property name="build.dir" value="${yanel.home.dir}/build"/>
   <property name="yanel.build.dir" value="${build.dir}/classes"/>
   <property name="junit.build.dir" value="${build.dir}/test/junit"/>
@@ -117,7 +118,7 @@
 
   <target name="build-resources" depends="init" description="Build tests of resources">
     <condition property="local.resource-types.config.exists">
-      <available file="${local.conf.dir}/local.resource-types.xml" type="file"/>
+      <available file="${local.config.home}/local.resource-types.xml" type="file"/>
     </condition>
     <antcall target="generate-resources-test-build-from-default"/>
     <antcall target="generate-resources-test-build-from-local"/>
@@ -140,7 +141,7 @@
 
   <target name="generate-resources-test-build-from-local" depends="init" if="local.resource-types.config.exists">
     <echo>Create ant build file '${build.dir}/test-resources.xml' in order to build tests of resources</echo>
-    <xslt in="${local.conf.dir}/local.resource-types.xml" out="${build.dir}/test-resources.xml" style="test-resources.xsl" force="true"/>
+    <xslt in="${local.config.home}/local.resource-types.xml" out="${build.dir}/test-resources.xml" style="test-resources.xsl" force="true"/>
   </target>
   
   <target name="copy-properties">



More information about the Yanel-commits mailing list