Quantcast

pre condition for ant build

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

pre condition for ant build

Kamal Ahmed
Hi,
Does someone have any insight and suggestion, as to what would work best in the following scenario.

I want to have a pre-check in place, which will verify if a particular WSDL is available , and if it IS ( meaning we get WSDL XML ) 
only then kick off the ant task which runs some functional tests

Thanks,
-Kamal.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: pre condition for ant build

Qazwart-2
You can use the <available> in Ant to check for the URL and have Ant fail the build if it's not available. 

In fact this can be placed in a fail task. 

<fail message="${wsdl.url} isn't available">
    <condition>
        <not>
            <available url="${wsdl.url}"/>
        </not>
    </condition>
</fail>

--
David Weintraub

On Aug 14, 2012, at 10:39 AM, Kamal Ahmed <[hidden email]> wrote:

Hi,
Does someone have any insight and suggestion, as to what would work best in the following scenario.

I want to have a pre-check in place, which will verify if a particular WSDL is available , and if it IS ( meaning we get WSDL XML ) 
only then kick off the ant task which runs some functional tests

Thanks,
-Kamal.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: pre condition for ant build

Kamal Ahmed
Thanks Qazwart

I am new to ant, so i am guessing that i declare wsdl.url outside build.xml

like:

export wsdl.url="http://www.example.com/help?wsdl

I also found:

<typedef
     
name="httpcontains"
     
classname="HttpContains"
   
/>

 
<waitfor maxwait="10" maxwaitunit="minute" checkevery="500">
   
<httpcontains contains="Running" url="http://myurl"/>
 
</waitfor>


From: Qazwart <[hidden email]>
To: "[hidden email]" <[hidden email]>
Sent: Tuesday, August 14, 2012 5:46 PM
Subject: Re: pre condition for ant build

You can use the <available> in Ant to check for the URL and have Ant fail the build if it's not available. 

In fact this can be placed in a fail task. 

<fail message="${wsdl.url} isn't available">
    <condition>
        <not>
            <available url="${wsdl.url}"/>
        </not>
    </condition>
</fail>

--
David Weintraub

On Aug 14, 2012, at 10:39 AM, Kamal Ahmed <[hidden email]> wrote:

Hi,
Does someone have any insight and suggestion, as to what would work best in the following scenario.

I want to have a pre-check in place, which will verify if a particular WSDL is available , and if it IS ( meaning we get WSDL XML ) 
only then kick off the ant task which runs some functional tests

Thanks,
-Kamal.


Loading...