ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben Corpus" <ben...@cdw.com>
Subject Telnet to AS400
Date Wed, 13 Sep 2006 22:55:54 GMT
Hi All,

 

I am using Apache Ant 1.6.5.  I want to use its Telnet task to automate
Java deployments to WAS (Websphere Application Server) server running on
the AS400.  The problem I encounter is in the nested <read> tag (line 6)
- it hangs on that line of execution.  

 

Here's the target code:

 

1          <target name="stop">

2                      <echo message="****** Stopping WAS... ******"/>

3                      <echo message="applicationName=${app.name}"/>

4                      <echo message="user.id=${telnet.userid}
pw=${telnet.password}"/>                       

5                      <telnet server="${was.targetmachine}"
userid="${telnet.userid}" password="${telnet.password}">

6                                  <read string=">"/>

7                                  <write>wsadmin</write>

8                                  <read string=">"/>

9                                  <write>set appman [$AdminControl
queryNames type=ApplicationManager,process=server1,*]</write>


10                                 <read string=">"/>


11                                 <write>$AdminControl invoke $appman
stopApplication {"${app.name}"}</write>

12                                 <read string=">"/>

13                                 <write>exit</write>

14                                 <read string=">"/>

15                                 <write>exit</write>        

16                     </telnet>

17         </target>

 

I have checked my dependencies and they are alright:

            - commons-net-1.4.1

            - jakarta-oro-2.0.1

 

I have checked my classpath

 

I have tried these other return characters:

            - "&gt"
            - " "
            - ""        (this stops the hanging, but the remaining lines
of code never execute)

 

I anyone out there has experienced a similar problem and overcome it,
please advise.

 

Thanks,

Ben

 

 


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