ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian DeWeese <brd1_reut...@yahoo.com>
Subject Re: overwriting a property - is this possible?
Date Thu, 28 Feb 2002 16:24:38 GMT

It ain't pretty but here's what I do.

      <condition property="build_src_dir"  value="${build_dir}/src">    <and><equals
arg1="a" arg2="a"/></and></condition>


The condition always evaluates to true so the property is always set.

I think it would be nice if the <property> task had an overwrite attribute.  What I'm
not sure about is how it is decide which property is a user property and which is a project
property.  It appears the latter can never be overridden no matter what.

Brian


--- Ralph Jocham <rjocham72@yahoo.com> wrote: 
> I am trying to make my ant-xml file more readable by 
> using tmp properties. But it doesn't work :( Only the 
> first assignment is used in the 2nd target. 
> 
> TIA Ralph 
> 
> <!-- 
> =================================================================== 
> --> 
> <!-- ChemistryPreparationSP EJB 
> --> 
> <!-- 
> =================================================================== 
> --> 
> <target name="ChemistryPreparationSP"> 
> <property name="NAME" 
> value="ChemistryPreparationSP"/> 
> <property name="CLASSDIR" 
> value="${build.dir}/com/apldbio/arrays/illumina/chemprep"/> 
> <property name="XMLDIR" 
> value="${ejb.dir}/ChemistryPreparation"/> 
> 
> <delete file="${jar.dir}/EJB/${NAME}.jar"/> 
> <delete file="${XMLDIR}/META-INF/ejb-jar.xml"/> 
> <delete file="${XMLDIR}/META-INF/jboss.xml"/> 
> <copy file="${XMLDIR}/${NAME}-ejb-jar.xml" 
> tofile="${XMLDIR}/META-INF/ejb-jar.xml"/> 
> <copy file="${XMLDIR}/${NAME}-jboss.xml" 
> tofile="${XMLDIR}/META-INF/jboss.xml"/> 
> <jar jarfile="${jar.dir}/EJB/${NAME}.jar"> 
> <fileset dir="${CLASSDIR}" 
> includes="I${NAME}Proxy.class,I${NAME}Home.class,${NAME}Bean.class"/> 
> <fileset dir="${XMLDIR}" 
> includes="META-INF/*.xml"/> 
> </jar> 
> <copy file="${jar.dir}/EJB/${NAME}.jar" 
> todir="${deploy.dir}"/> 
> </target> 
> 
> <!-- 
> =================================================================== 
> --> 
> <!-- ChemistryPreparationTask EJB 
> --> 
> <!-- 
> =================================================================== 
> --> 
> <target name="ChemistryPreparationTask"> 
> <property name="NAME" 
> value="ChemistryPreparationTask"/> 
> <property name="CLASSDIR" 
> value="${build.dir}/com/apldbio/arrays/illumina/chemprep"/> 
> <property name="XMLDIR" 
> value="${ejb.dir}/ChemistryPreparation"/> 
> 
> <delete file="${jar.dir}/EJB/${NAME}.jar"/> 
> <delete file="${XMLDIR}/META-INF/ejb-jar.xml"/> 
> <delete file="${XMLDIR}/META-INF/jboss.xml"/> 
> <copy file="${XMLDIR}/${NAME}-ejb-jar.xml" 
> tofile="${XMLDIR}/META-INF/ejb-jar.xml"/> 
> <copy file="${XMLDIR}/${NAME}-jboss.xml" 
> tofile="${XMLDIR}/META-INF/jboss.xml"/> 
> <jar jarfile="${jar.dir}/EJB/${NAME}.jar"> 
> <fileset dir="${CLASSDIR}" 
> includes="I${NAME}Proxy.class,I${NAME}Home.class,${NAME}Bean.class"/> 
> <fileset dir="${XMLDIR}" 
> includes="META-INF/*.xml"/> 
> </jar> 
> <copy file="${jar.dir}/EJB/${NAME}.jar" 
> todir="${deploy.dir}"/> 
> </target> 
> 
> __________________________________________________ 
> Do You Yahoo!? 
> Yahoo! Greetings - Send FREE e-cards for every occasion! 
> http://greetings.yahoo.com 
> 
> -- 
> To unsubscribe, e-mail: 
> <mailto:ant-user-unsubscribe@jakarta.apache.org> 
> For additional commands, e-mail: 
> <mailto:ant-user-help@jakarta.apache.org> 
> 




---------------------------------
Do You Yahoo!?
Yahoo! Greetings - Send FREE e-cards for every occasion!
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message