ant - build.xml ignoring <echo> tags and if options -


i have sencha ext.js project , trying user input , take action based on user input in build.xml file.

here's build.xml:

<?xml version="1.0" encoding="utf-8"?> <project xmlns:if="ant:if" xmlns:unless="ant:unless" name="psogn" default=".help">      <import file="${basedir}/.sencha/app/build-impl.xml"/>      <target name="-after-build">         <echo>57 ...</echo>         <property name="realperl" value="/usr/bin/perl"/>         <echo>59 ...</echo>         <exec executable="/bin/hostname" outputproperty="myhost">             <arg value="-s"/>         </exec>         <echo>64 ...</echo>         <exec executable="${realperl}" outputproperty="env">             <arg value="../bin/getcf.pl"/>             <arg value="--config"/>             <arg value="../etc/config/currentcf"/>             <arg value="env"/>         </exec>         <echo>70 ...</echo>         <input message="install ${env} version on ${myhost}?" addproperty="install" validargs="y,n" />         <echo>72 ...</echo>         <condition property="doinstall">                 <equals arg1="${install}" arg2="y" />             </condition>         <echo>hello ...</echo>         <exec executable="${realperl}" outputproperty="htdocspath">             <arg value="../bin/getcf.pl"/>             <arg value="--config"/>             <arg value="../etc/config/currentcf"/>             <arg value="htdocspath"/>         </exec>         <echo>do install ${doinstall}</echo>         <echo if:true="${doinstall}">please wait. executing rsync ${htdocspath}. output logged /tmp/rsync.log.</echo>         <echo if:false="${doinstall}">skipping rsync ${htdocspath}.</echo>         <exec executable="/usr/local/bin/rsync" if:true="${doinstall}">             <arg value="--exclude='*.log'" />             <arg value="--chmod=ugo=rwx" />             <arg value="-rltdq" />             <arg value="../info"/>             <arg value="../sbin"/>             <arg value="../bin"/>             <arg value="../cec"/>             <arg value="../cec.list.html"/>             <arg value="../cgi"/>             <arg value="../common"/>             <arg value="../dblib"/>             <arg value="../etc"/>             <arg value="../ext-2.3.0"/>             <arg value="../framework"/>             <arg value="../help"/>             <arg value="../icon-loading-animated.gif"/>             <arg value="../images"/>             <arg value="../img"/>             <arg value="../include"/>             <arg value="../index.shtml"/>             <arg value="../kicker"/>             <arg value="../lib"/>             <arg value="../msgs"/>             <arg value="../src"/>             <arg value="../thingold"/>             <arg value="../thing"/>             <arg value="${htdocspath}"/>             <redirector output="/tmp/rsync.log" alwayslog="true"/>           </exec>     </target>  </project> 

when run sencha app build invokes ant output build.xml:

install dev version on tools-dev1? (y, n) 

there no output <echo... tags , if answer 'n' can rsync command executes. doing wrong here?

i simplified build.xml

<project xmlns:if="ant:if" xmlns:unless="ant:unless" name="psogn" >          <input message="install ?" addproperty="install" validargs="y,n" />         <condition property="doinstall">                 <equals arg1="${install}" arg2="y" />         </condition>         <echo>do install ${doinstall}</echo>         <echo if:true="${doinstall}">please wait. executing rsync</echo>         <echo unless:true="${doinstall}">skipping rsync </echo>         <exec executable="echo" if:true="${doinstall}">             <arg value="echo executed" />             <redirector output="./rsync.log" alwayslog="true"/>           </exec>   </project> 

and replaced if:false unless:true

<echo unless:true="${doinstall}">skipping rsync </echo> 

everything works fine:

oleg@oleg-thinkpad-x201:~/temp/aa$ ant buildfile: /home/oleg/temp/aa/build.xml     [input] install ? (y, n) y      [echo] install true      [echo] please wait. executing rsync      [exec] echo executed  build successful total time: 2 seconds oleg@oleg-thinkpad-x201:~/temp/aa$ ant buildfile: /home/oleg/temp/aa/build.xml     [input] install ? (y, n) n      [echo] install ${doinstall}      [echo] skipping rsync   build successful total time: 2 seconds 

Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -