ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Parnell, Giles (AU - Sydney)" <>
Subject RE: Determining the value of a property
Date Tue, 05 Aug 2003 01:51:09 GMT

Thanks for the reply.

I think I found the problem here. The url doesn't appear to be valid. I have
my own app - that once started, I can browse through all the pages. However
I don't seem to be able to hit the jmx-console (the url specified in the
isJBossRunning target). I've run the 'default' deployment that comes with
jboss and I can get to the console through that, but can't through from my
own deployed app. My app appears to deploy fine and there are no bind errors
etc. Any idea why I can't see the jmx-console ?

In relation to the stuff below, once I changed the url to one I know I can
get to...the 'isJBossRunning' target works fine... 

Thanks for the help

-----Original Message-----
From: Stefan Bodewig []
Sent: Monday, 4 August 2003 6:17 PM
Subject: Re: Determining the value of a property

On Mon, 4 Aug 2003, Giles Parnell <>

> I'm trying to set a property based on the outcome of a condition.
>    <target name="isJBossRunning">
>         <condition property="alreadyRunning" value="true">
>             <and>
>                 <socket server="${webhost}" port="${webport}"/>
>                 <http
> url="http://${webhost}:${webport}/jmx-console/index.jsp"/>
>             </and>        
>         </condition>
>         <echo>Is jboss running on ${webhost}:${webport}? -
> ${alreadyRunning}</echo>        
>     </target>
> However, i'm not sure of how to structure the system to obtain the
> value of alreadyRunning. At present this doesn't work?

Doesn't look wrong, so I guess that your server isn't running "At
present" and thus your property doesn't get set at all.

Put a <property name="alreadyRunning" value="false"/> between
<condition> and <echo>.  If the condition evaluates to true, your
property will have a value and the <property> task will have no effect
(properties are immutable).  If it doesn't, <condition> will not set
it and <property> provides the default value.


To unsubscribe, e-mail:
For additional commands, e-mail:

***********Confidentiality/Limited Liability Statement***************

This message contains privileged and confidential information intended
only for the use of the addressee named above.  If you are not the 
intended recipient of this message, you must not disseminate, copy or 
take any action in reliance on it.  If you have received this message 
in error, please notify Deloitte Touche Tohmatsu immediately.  Any 
views expressed in this message are those of the individual sender, 
except where the sender specifically states them to be the views of 

The liability of Deloitte Touche Tohmatsu, is limited by, and to the 
extent of, the Accountants' Scheme under the Professional Standards 
Act 1994 (NSW).

The sender cannot guarantee that this email or any attachment to it 
is free of computer viruses or other conditions which may damage or
interfere with data, hardware or software with which it might be used.
It is sent on the strict condition that the user carries out and relies
on its own procedures for ensuring that its use will not interfere with
the recipients systems and the recipient assumes all risk of use and
absolves the sender of all responsibility for any consequence of its use.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message