ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <ste...@apache.org>
Subject Re: Ant-WebLogic problem
Date Thu, 30 Nov 2006 10:27:56 GMT
Pieter Temmerman wrote:
> Hi Guys,
> 
> Please excuse me if this is not the proper mailing list to post my message:
> 
> I am trying to connect to my WebLogic 9.2 server through Ant. This is my 
> build.xml snippet: (wlserver is a weblogic ant task)
> 
> <project name="test" default="verify">
> <target name="verify">
> <wlserver action="connect" host="127.0.0.1" domainname="wl_server"
> servername="examplesServer" port="7001" failonerror="true" timeout="5"
> username="weblogic" password="weblogic" />
> </target>
> </project>
> 
> When I run Ant with this build.xml file I get BUILD SUCCESSFUL as a 
> result, seems fine right?
> However, if I change my server information into something erronious (ie; 
> change port, change username, ...) and execute Ant, then again I get 
> BUILD SUCCESSFUL. (even when I shutdown the WebLogic server I get a 
> positive result) This is not really what I want..I want to be able to 
> detect if the server details were wrong, by trying to make a connection 
> to it.

I know nothng about wl tasks, which come from BEA, so out of my scope.

What ant does have is a <get> task, and the <socket> and <http> 
conditions. You can do some low level lookups for sockets and for 
functional app servers

<fail>
  <condition>
    <not><socket server="localhost" port="7001" /></not>
  </condition>
  Port 7001 is closed. Either the application is not running, or a 
firewall is in the way
</fail>

Its not as intimate as the weblogic example, but it may work, and you 
can give good diagnostics messages

-steve



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message