Re: ssh exec task...

2003-04-01 Thread Stefan Bodewig
On 01 Apr 2003, Stefan Bodewig [EMAIL PROTECTED] wrote:

 The main difference (apart from formatting changes) are that timeout
 uses milliseconds as its value

and defaults to 0

 (like exec)

Stefan


Re: ssh exec task...

2003-04-01 Thread Dale Anson
Thanks -- I take it you saw that jsch 0.1.3 was released this morning? 
Would you mind making one other minor change to the docs, it references 
jsch 0.1.2 as a requirement, but 0.1.3 is the minimum.

Dale Anson
Stefan Bodewig wrote:
On Tue, 25 Mar 2003, Dale Anson [EMAIL PROTECTED] wrote:
 

The updates fix the problem with output not always showing on the
screen (or log).
   

I've committed a slightly modified version.
The main difference (apart from formatting changes) are that timeout
uses milliseconds as its value (like exec) and that I've made sure
the file will get closed - if writing to a file that is.
Thanks
   Stefan
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: ssh exec task...

2003-04-01 Thread Stefan Bodewig
On Tue, 01 Apr 2003, Dale Anson [EMAIL PROTECTED] wrote:

 I take it you saw that jsch 0.1.3 was released this morning?

Yep.

 Would you mind making one other minor change to the docs, it
 references jsch 0.1.2 as a requirement, but 0.1.3 is the minimum.

Already changed in CVS. 8-)

Stefan


Re: ssh exec task...

2003-03-25 Thread Dale Anson
Attached are updates for the SSHExec task and documentation as diffs. 
The updates fix the problem with output not always showing on the screen 
(or log).

This task relies on jsch-0.1.3-rc1, available at 
http://www.jcraft.com/jsch/jsch-0.1.3-rc1.zip. Earlier versions of jsch 
will not work as one of the fixes to this version of jsch was 
implemented specifically for the SSHExec task.

While I was at it, I fixed the timeout attribute so it actually does 
something, plus I added some attributes from the exec task that seemed 
appropriate:
output write the output to a file
append append to or overwrite the output file
outputproperty store the output in a property

Dale Anson
Steve Loughran wrote:
- Original Message -
From: Dale Anson [EMAIL PROTECTED]
To: Ant Developers List [EMAIL PROTECTED]
Sent: Tuesday, March 18, 2003 14:57
Subject: Re: ssh exec task...
 

How do I post changes to the optional/ssh files to cvs?
Dale
   

run cvs diff -u against the files to create .diff files that you post as
patches, then keep reminding people till it gets taken up. Committers take
the files, patch them and commit the changes.
On this subject, who knows where I can get a copy of patch.exe that does not
fail on a two-cpu winXP box, the way the wincvs version does. I am having to
ftp files back to a unix server to patch right now. one extra caveat: I dont
want to have to install cygwin. I just need a URL of an up to date
port/build of the core Gnu unix command toolchain.
-steve
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

Index: SSHExec.java
===
RCS file: 
/home/cvspublic/ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java,v
retrieving revision 1.1
diff -u -r1.1 SSHExec.java
--- SSHExec.java11 Mar 2003 13:15:43 -  1.1
+++ SSHExec.java25 Mar 2003 16:32:13 -
@@ -1,90 +1,94 @@
 /*
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2003 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in
- *the documentation and/or other materials provided with the
- *distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *any, must include the following acknowlegement:
- *   This product includes software developed by the
- *Apache Software Foundation (http://www.apache.org/).
- *Alternately, this acknowlegement may appear in the software itself,
- *if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names Ant and Apache Software
- *Foundation must not be used to endorse or promote products derived
- *from this software without prior written permission. For written
- *permission, please contact [EMAIL PROTECTED]
- *
- * 5. Products derived from this software may not be called Apache
- *nor may Apache appear in their names without prior written
- *permission of the Apache Group.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * 
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * http://www.apache.org/.
- */
-
+* The Apache Software License, Version 1.1
+*
+* Copyright (c) 2003 The Apache Software Foundation.  All rights
+* reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+*
+* 1. Redistributions of source code must retain the above copyright
+*notice, this list

Re: ssh exec task...

2003-03-25 Thread Stefan Bodewig
On Tue, 25 Mar 2003, Dale Anson [EMAIL PROTECTED] wrote:

 Attached are updates for the SSHExec task and documentation as
 diffs. The updates fix the problem with output not always showing on
 the screen (or log).

Thanks.  I'll commit them after the release of jsch 0.1.3 final.

 While I was at it, I fixed the timeout attribute so it actually
 does something,

8-)

 plus I added some attributes from the exec task that seemed
 appropriate:
 
 output write the output to a file
 append append to or overwrite the output file
 outputproperty store the output in a property

input and inputstring are additional candidates IMHO.

Thanks!

Stefan


Re: ssh exec task...

2003-03-21 Thread Stefan Bodewig
On Thu, 20 Mar 2003, Dale Anson [EMAIL PROTECTED] wrote:

 One more question -- how is documentation handled?

The same way as code, you send patches (diff -u).  Docs are a bit more
difficult if you want to send in complete new files as our mailing
list configuration will not accept any HTML part in mails - you'd have
to zip them or something.

The documentation currently consists of static HTML pages, the docs
for sshexec are in docs/manual/OptionalTasks/sshexec.html in Ant's CVS
module.

We may or may not switch to generated docs (generated from comments in
the sources), but we are not there yet.

Stefan


Re: ssh exec task...

2003-03-20 Thread Dale Anson
The problem with the sshexec task not getting good output is due to a 
threading issue in the jsch code base. I've asked Atsuhiko (the jsch 
author) to make a minor change, he says it will be included in the next 
release, scheduled for tomorrow. Once that is done, I'll modify the task 
to capture the output correctly and make the maxwait attribute actually 
work. I didn't see the jsch.jar file in Ant cvs, how are optional 
libraries like this generally handled?

Dale
Steve Loughran wrote:
- Original Message -
From: Dale Anson [EMAIL PROTECTED]
To: Ant Developers List [EMAIL PROTECTED]
Sent: Tuesday, March 18, 2003 14:57
Subject: Re: ssh exec task...
 

How do I post changes to the optional/ssh files to cvs?
Dale
   

run cvs diff -u against the files to create .diff files that you post as
patches, then keep reminding people till it gets taken up. Committers take
the files, patch them and commit the changes.
On this subject, who knows where I can get a copy of patch.exe that does not
fail on a two-cpu winXP box, the way the wincvs version does. I am having to
ftp files back to a unix server to patch right now. one extra caveat: I dont
want to have to install cygwin. I just need a URL of an up to date
port/build of the core Gnu unix command toolchain.
-steve
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: ssh exec task...

2003-03-20 Thread Stefan Bodewig
On Wed, 19 Mar 2003, Dale Anson [EMAIL PROTECTED] wrote:

 I've asked Atsuhiko (the jsch author) to make a minor change, he
 says it will be included in the next release, scheduled for
 tomorrow.

Cool.

 I'll modify the task to capture the output correctly and make the
 maxwait attribute actually work.

Can you rename it to timeout (to mirror exec) at the same time?

 I didn't see the jsch.jar file in Ant cvs,

And it will never go there.

 how are optional libraries like this generally handled?

We expect developers to install them themselves.

Stefan


Re: ssh exec task...

2003-03-18 Thread Dale Anson
How do I post changes to the optional/ssh files to cvs?
Dale
Stefan Bodewig wrote:
On Thu, 13 Mar 2003, Dale Anson [EMAIL PROTECTED] wrote:
 

I had output from the one I wrote going to the log, would you mind
sending me your code and maybe I can see how to get it to output to
the log? Or is it in cvs somewhere?
   

In Ant's CVS
http://cvs.apache.org/viewcvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/
Stefan
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: ssh exec task...

2003-03-18 Thread Steve Loughran

- Original Message -
From: Dale Anson [EMAIL PROTECTED]
To: Ant Developers List [EMAIL PROTECTED]
Sent: Tuesday, March 18, 2003 14:57
Subject: Re: ssh exec task...


 How do I post changes to the optional/ssh files to cvs?

 Dale


run cvs diff -u against the files to create .diff files that you post as
patches, then keep reminding people till it gets taken up. Committers take
the files, patch them and commit the changes.

On this subject, who knows where I can get a copy of patch.exe that does not
fail on a two-cpu winXP box, the way the wincvs version does. I am having to
ftp files back to a unix server to patch right now. one extra caveat: I dont
want to have to install cygwin. I just need a URL of an up to date
port/build of the core Gnu unix command toolchain.

-steve



RE: ssh exec task...

2003-03-12 Thread Anderson, Rob H - VSCM


Attached is the documentation (I hope).

-Rob A

-Original Message-
From: Stefan Bodewig [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 12:35 AM
To: [EMAIL PROTECTED]
Subject: Re: ssh exec task...


On Tue, 11 Mar 2003, Rob H. Anderson [EMAIL PROTECTED]
wrote:

 Attached is the documentation.

No it isn't (no HTML parts on our list, even attachments).  Could you
either send it to me directly or simply zip it up before attaching it?

 I wonder if there is anyway to wait for the thread to finnish?

So do I.  I played with reading from the outputstream (much like the
StreamPumper stuff in exec) in the hope the IO would block, but have
no good results so far.

I'll try to understand the inner workings of jsch (though my time is a
bit limited ATM) and ask on jsch-users if all else fails.  You are
invited to do some research of your own, of course 8-)

 Does this mean that ant will report Build Successfull before the
 command has actually completed (Yuk)?

Potentially.

Stefan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 install.zip 


RE: ssh exec task...

2003-03-12 Thread Anderson, Rob H - VSCM
Crap! I have sent the attachements to your email address
([EMAIL PROTECTED]).

-Rob A

-Original Message-
From: Stefan Bodewig [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 9:05 AM
To: [EMAIL PROTECTED]
Subject: Re: ssh exec task...


On Wed, 12 Mar 2003, Rob H. Anderson [EMAIL PROTECTED]
wrote:

 Attached is the documentation (I hope).

I received nothing.

Stefan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: ssh exec task...

2003-03-11 Thread Stefan Bodewig
Hi Robert,

as you may have seen, our mailing list software strips all HTML parts
from mails.  I'm sure there has been some message in addition to the
tarball 8-)

I've committed modified versions of your code - in particular I've
made the password part of user:[EMAIL PROTECTED]:/path optional to really
enable key based authentication for scp and made your SSHExec task use
SSHBase (more than it did before, at least 8-).

The main thing missing now is documentation for sshexec.

Stefan


Re: ssh exec task...

2003-03-11 Thread Stefan Bodewig
On Tue, 11 Mar 2003, Rob H. Anderson [EMAIL PROTECTED]
wrote:

 There is one problem with the sshexec task that someone should look
 into: I was not able to get the output from the remote command to
 show up in the log.

It works if my machine (the one running Ant) is under heavy load, but
doesn't otherwise. 8-(

The problem seems to be (from some cursory code review on jsch) that
jsch spawns a thread to execute the command - and the task may very
well be finished (and Ant exited) before the thread gets run.

 I will work on some documentation to go with it.

Great.

Stefan


RE: ssh exec task...

2003-03-11 Thread Anderson, Rob H - VSCM
Stefan, Attached is the documentation. I wonder if there is anyway to wait
for the thread to finnish? Does this mean that ant will report Build
Successfull before the command has actually completed (Yuk)?

-Rob A

-Original Message-
From: Stefan Bodewig [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 11, 2003 8:59 AM
To: [EMAIL PROTECTED]
Subject: Re: ssh exec task...


On Tue, 11 Mar 2003, Rob H. Anderson [EMAIL PROTECTED]
wrote:

 There is one problem with the sshexec task that someone should look
 into: I was not able to get the output from the remote command to
 show up in the log.

It works if my machine (the one running Ant) is under heavy load, but
doesn't otherwise. 8-(

The problem seems to be (from some cursory code review on jsch) that
jsch spawns a thread to execute the command - and the task may very
well be finished (and Ant exited) before the thread gets run.

 I will work on some documentation to go with it.

Great.

Stefan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



ssh exec task...

2003-03-10 Thread Robert Anderson


ssh_tasks_src.tar.gz
Description: application/gzip-compressed