Well, I don't see a <http> task anywhere in ANT 1.4.1 or 1.5b. In 1.5b, there's a <waitfor> that you should use I guess. In any case, if you look at the docs, <condition> doesn't support <http> for sure. --DD
-----Original Message----- From: Emerson Cargnin - MSA [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 16, 2002 9:48 AM To: Ant Users List Subject: Re: How to execute task just if a propertie is set Someone coul'd explain why i'm getting this error : BUILD FAILED c:\eclipse\workspace\Cobranca\script\build.xml:279: The <condition> task doesn't support the nested "http" element. <condition property="tomcat.started"> <http url="${tomcat.url}"> </condition> ----- Original Message ----- From: "Emerson Cargnin - MSA" <[EMAIL PROTECTED]> To: "Ant Users List" <[EMAIL PROTECTED]> Sent: Thursday, May 16, 2002 11:36 AM Subject: Re: How to execute task just if a propertie is set > > Ok if I create a task to be executed before my tomcat deploy so that it will > create the propertie in case the http call succeed. Question : aren't local > properties invisible to other ones??? > > take a look on the task : > > <!-- Deploy for tomcat --> > <target name="testTomcat" depends="deployjboss" > > <condition property="tomcat.started"> > <http url="${tomcat.url}"> > </condition> > </target> > > <target name="deploytomcat" depends="deployjboss" > > <delete includeEmptyDirs="true" failonerror="false"> > <fileset dir="${tomcat.deploy.dir}/${tomcat.path}" /> > </delete> > <echo message="Undeploy tomcat app"/> > <unwar src="${dist.dir}/${name}-web.war" > dest="${tomcat.deploy.dir}/${tomcat.path}" /> > <echo message="descompactou app web"/> > </target> > > <target name="reloadtomcat" depends="deploytomcat,testTomcat" > if="tomcat.started" > > <reload url="${tomcat.url}" username="${tomcat.username}" > password="${tomcat.password}" > path="${tomcat.path}"/> > <echo message="deployou-- tomcat app"/> > </target> > ----- Original Message ----- > From: Dominique Devienne > To: 'Ant Users List' > Sent: Thursday, May 16, 2002 11:12 AM > Subject: RE: How to execute task just if a propertie is set > > > Check out the if/unless attributes of <target>. Note that dependent targets > (listed in the depends attribute) are executed before the if/unless > condition are evaluated. --DD > > -----Original Message----- > From: Emerson Cargnin - MSA [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 16, 2002 9:04 AM > To: [EMAIL PROTECTED] > Subject: How to execute task just if a propertie is set > > How do I execute an ant task conditionally? I want to reload a tomcat > context just in case tomcat is started. I was thinking in setting a > propertie with condition and http (to make sure tomcat is on). Just need to > know how to execute the tomcat reload task if this propertie is set. > > Regards > > Emerson > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>