Scp is this possible?

2006-05-09 Thread Kev Jackson

Hi all,

I'm messing with a hideous integration project and part of the 
requirements involve aggregating log files from servers via a web 
interface.  I'm using ant's scp task to try and grab the log files (as 
we are not allowed to install anything on the servers).


What I want to do is to use a fileset to filter the log files *before* 
pulling them back to the aggregation server.  I thought that this was 
possible as scp takes a fileset which can use different selectors


ie

   
   dir="weblogic:[EMAIL PROTECTED]:/home/weblogic/logs" includes="*.log" />

   

Ok this is obviously not a realistic example as I can simply use a 
wildcard in the file attribute to achive this, but my real use case 
involves filtering the logs based on from/to dates - I thought the new 
TimeComparison stuff would be perfect for this, but I cannot get scp to 
work with todir set to a normal path, it always wants 
user:[EMAIL PROTECTED]:/path, which isn't what I want.


So basically two questions:

1 - is it possible to use scp task with a fileset in this manner (ie 
filter files on remote server before pulling back)


2 - any work arounds if it's impossible

Thanks
Kev

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



Re: Scp is this possible?

2006-05-09 Thread Steve Loughran

Kev Jackson wrote:

Hi all,

I'm messing with a hideous integration project and part of the 
requirements involve aggregating log files from servers via a web 
interface.  I'm using ant's scp task to try and grab the log files (as 
we are not allowed to install anything on the servers).




ah the joy of a world where the ops team doesnt trust the developers. 
Which is why I'm hosting my current endpoint on a laptop at home -I am 
the ops team.


What I want to do is to use a fileset to filter the log files *before* 
pulling them back to the aggregation server.  I thought that this was 
possible as scp takes a fileset which can use different selectors


ie

   
   dir="weblogic:[EMAIL PROTECTED]:/home/weblogic/logs" includes="*.log" />

   

Ok this is obviously not a realistic example as I can simply use a 
wildcard in the file attribute to achive this, but my real use case 
involves filtering the logs based on from/to dates - I thought the new 
TimeComparison stuff would be perfect for this, but I cannot get scp to 
work with todir set to a normal path, it always wants 
user:[EMAIL PROTECTED]:/path, which isn't what I want.


So basically two questions:

1 - is it possible to use scp task with a fileset in this manner (ie 
filter files on remote server before pulling back)


Not according to the docs; filesets are for local stuff only.

Maybe its time to add more features to scp.


2 - any work arounds if it's impossible


rsync.



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



Re: Scp is this possible?

2006-05-09 Thread Kevin Jackson


ah the joy of a world where the ops team doesnt trust the developers.
Which is why I'm hosting my current endpoint on a laptop at home -I am
the ops team.



In this case it's more like, the joys of being told to do the
impossible (use http to transfer log files from servers running on the
network as it's the only 'sanctioned' protocol, unfortunately you
aren't allowed to install anything that can respond to a http get/post
request on said servers... (can you see where this is going yet)

ssh is the compromise when they realised that what they wanted first
time around was impossible


> 1 - is it possible to use scp task with a fileset in this manner (ie
> filter files on remote server before pulling back)

Not according to the docs; filesets are for local stuff only.

Maybe its time to add more features to scp.


If it's not currently possible, I suppose that's one way to achieve it



> 2 - any work arounds if it's impossible

rsync.


[sigh] I wish they'd allow me some freedom to build this when they
want it next week.

Kev

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



svn commit: r405440 - /ant/core/trunk/WHATSNEW

2006-05-09 Thread mbenson
Author: mbenson
Date: Tue May  9 07:12:17 2006
New Revision: 405440

URL: http://svn.apache.org/viewcvs?rev=405440&view=rev
Log:
fix typo

Modified:
ant/core/trunk/WHATSNEW

Modified: ant/core/trunk/WHATSNEW
URL: 
http://svn.apache.org/viewcvs/ant/core/trunk/WHATSNEW?rev=405440&r1=405439&r2=405440&view=diff
==
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Tue May  9 07:12:17 2006
@@ -215,7 +215,7 @@
   standardized improperly included objselect and objsel property accessors to
   delegate to the inherited objSelect property accessor. Bugzilla report 37766.
 
-*  and  and  now correctly merge multiple nested patternsets.
   Bugzilla Report 38973.
 
 Other changes:



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



Re: Setting Xalan to junitreport

2006-05-09 Thread Matt Benson
Antoine:  Does this put us back to needing a "scheme"
to translate a string (attribute value) to a Resource?

-Matt

--- Antoine Levy-Lambert <[EMAIL PROTECTED]> wrote:

> Hello Toby,
> 
> it is not 100% straightforward.
> 
> junitreport normally works by pulling the
> stylesheets from ant.jar.
> 
> The  task normally only works with plain
> files as stylesheets.
> 
> So I will first process a bug report showing how to
> use a resource as 
> the stylesheet in the  task.
> 
> Afterwards, if the other ant committers are happy
> with the change, I 
> will refactor junitreport to delegate to .
> 
> If you want to follow the discussion further, we
> should do it on the 
> developer list (dev at ant.apache.org).
> 
> Regards,
> 
> Antoine
> 
> Weston, Toby wrote:
> > Hi Antoine,
> >
> > Sounds good, do you think it'll be straight
> forward? 
> >
> > Thanks again,
> > Toby
> >
> > Antoine Levy-Lambert wrote:
> >   
> >> Hello Toby,
> >>
> >> I am thinking of changing junitreport to make it
> wrap around ant's
> >> style task. 
> >>
> >> Regards,
> >>
> >> Antoine
> >>
> >> Weston, Toby wrote:
> >> 
> >>> Hi Folks,
> >>>
> >>> I'm having problems with junitreport... its
> picking up every other
> >>> transformation engine than the default Xalan one
> (via the
> >>> javax.xml.transform.TransformerFactory=xxx
> mechanism).
> >>>
> >>> So basically, I get;
> >>>
> >>> - Could not find a valid processor version
> implementation from xxx
> >>>
> >>> I've got Saxon in ANT_HOME\lib so it picks that
> up, plus I've got
> >>> some JARs on the classpath, so it picks them up.
> >>>
> >>> My question is, can I force the transformation
> factory on the
> >>> junitreport task? For example, with 

Re: Setting Xalan to junitreport

2006-05-09 Thread Antoine Levy-Lambert

Hello Toby,

it is not 100% straightforward.

junitreport normally works by pulling the stylesheets from ant.jar.

The  task normally only works with plain files as stylesheets.

So I will first process a bug report showing how to use a resource as 
the stylesheet in the  task.


Afterwards, if the other ant committers are happy with the change, I 
will refactor junitreport to delegate to .


If you want to follow the discussion further, we should do it on the 
developer list (dev at ant.apache.org).


Regards,

Antoine

Weston, Toby wrote:

Hi Antoine,

Sounds good, do you think it'll be straight forward? 


Thanks again,
Toby

Antoine Levy-Lambert wrote:
  

Hello Toby,

I am thinking of changing junitreport to make it wrap around ant's
style task. 


Regards,

Antoine

Weston, Toby wrote:


Hi Folks,

I'm having problems with junitreport... its picking up every other
transformation engine than the default Xalan one (via the
javax.xml.transform.TransformerFactory=xxx mechanism).

So basically, I get;

- Could not find a valid processor version implementation from xxx

I've got Saxon in ANT_HOME\lib so it picks that up, plus I've got
some JARs on the classpath, so it picks them up.

My question is, can I force the transformation factory on the
junitreport task? For example, with 

DO NOT REPLY [Bug 39532] New: - an implementation of sftp task

2006-05-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39532

   Summary: an implementation of sftp task
   Product: Ant
   Version: 1.7Alpha (nightly)
  Platform: All
OS/Version: other
Status: NEW
  Severity: normal
  Priority: P2
 Component: Optional Tasks
AssignedTo: dev@ant.apache.org
ReportedBy: [EMAIL PROTECTED]


The attached patch is a quick hack to implement sftp task, which
is based on ftp task and using jsch for sftp functionality.
It accepts attributes for ftp and scp tasks except for 'binary',
'passive', 'separator' and 'umask'.

It seems following tasks are working on my testing, however, frankly to say,
I'm not familiar with ftp task and have never used and run it, so I may
mis-understand its operational semantics.  Comments, suggestions and feedbacks
are welcome.

PS 1. that patch is for ant_20060509104815.tar.gz
PS 2. jsch-0.1.28 is required.

 

 

 

 
   
 
   
 

 
   
 
   
 

 
   
 
   
 

 

 
   
 
   
 

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 39532] - an implementation of sftp task

2006-05-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39532





--- Additional Comments From [EMAIL PROTECTED]  2006-05-09 14:35 ---
Created an attachment (id=18250)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=18250&action=view)
an implementation of sftp task


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



Re: Setting Xalan to junitreport / bug report 39407

2006-05-09 Thread Antoine Levy-Lambert

Matt,

I plan to use the bug report :

.
which contains an attachment where the resource is instantiated using the URL 
schemes.

I did not test it though to make sure that it does work with a jar:file: URL 
(not sure what the exact syntax is).

:-)

Regards,

Antoine


Matt Benson wrote:

Antoine:  Does this put us back to needing a "scheme"
to translate a string (attribute value) to a Resource?

-Matt

--- Antoine Levy-Lambert <[EMAIL PROTECTED]> wrote:

  




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



Re: Setting Xalan to junitreport / bug report 39407

2006-05-09 Thread Matt Benson
I can see that in this case since the resource in
question is unique to the task, it should be
sufficient to assume that a nested resource is a
stylesheet.

The real requirement that will necessitate the
attribute syntax, as I see it, is enforcing that a
single resource be specified as the output destination
for a given task.  :)

-Matt

--- Antoine Levy-Lambert <[EMAIL PROTECTED]> wrote:

> Matt,
> 
> I plan to use the bug report :
> 
>
.
> which contains an attachment where the resource is
> instantiated using the URL schemes.
> 
> I did not test it though to make sure that it does
> work with a jar:file: URL (not sure what the exact
> syntax is).
> 
> :-)
> 
> Regards,
> 
> Antoine
> 
> 
> Matt Benson wrote:
> > Antoine:  Does this put us back to needing a
> "scheme"
> > to translate a string (attribute value) to a
> Resource?
> >
> > -Matt
> >
> > --- Antoine Levy-Lambert <[EMAIL PROTECTED]> wrote:
> >
> >   
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: Scp is this possible?

2006-05-09 Thread Atsuhiko Yamanaka

Hi,

2006/5/9, Kev Jackson <[EMAIL PROTECTED]>:

2 - any work arounds if it's impossible


I have posted a patch[1] to implement sftp task.
By using sftp task,  you can do as follows,

 
   
 
  


If you are interested in it, please try it.

[1] http://issues.apache.org/bugzilla/show_bug.cgi?id=39532

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



DO NOT REPLY [Bug 39373] - scp task does not work for some sshd, which does not scp1 protocol.

2006-05-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39373





--- Additional Comments From [EMAIL PROTECTED]  2006-05-09 17:12 ---
Created an attachment (id=18251)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=18251&action=view)
Patch to scp.html manual page


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.

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



DO NOT REPLY [Bug 39532] - an implementation of sftp task

2006-05-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39532


[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



Re: Scp is this possible?

2006-05-09 Thread Martin Menzel Apache
Hi Kevin,

with the ANT task I don't know how to solve your problem, but I have
used Mindterms SSH library

http://www.appgate.com/products/80_MindTerm/

or jsch

http://www.jcraft.com/jsch/

and you can execute ssh or scp command from within your java
application. If you think about to use rsync have a look to the jarsync
library.

Good luck

Martin

Kevin Jackson schrieb:
>>
>> ah the joy of a world where the ops team doesnt trust the developers.
>> Which is why I'm hosting my current endpoint on a laptop at home -I am
>> the ops team.
>>
>
> In this case it's more like, the joys of being told to do the
> impossible (use http to transfer log files from servers running on the
> network as it's the only 'sanctioned' protocol, unfortunately you
> aren't allowed to install anything that can respond to a http get/post
> request on said servers... (can you see where this is going yet)
>
> ssh is the compromise when they realised that what they wanted first
> time around was impossible
>
>> > 1 - is it possible to use scp task with a fileset in this manner (ie
>> > filter files on remote server before pulling back)
>>
>> Not according to the docs; filesets are for local stuff only.
>>
>> Maybe its time to add more features to scp.
>
> If it's not currently possible, I suppose that's one way to achieve it
>
>>
>> > 2 - any work arounds if it's impossible
>>
>> rsync.
>
> [sigh] I wish they'd allow me some freedom to build this when they
> want it next week.
>
> Kev
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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



svn commit: r405523 - in /ant/core/trunk/src/main/org/apache/tools/ant: MagicNames.java PropertyHelper.java util/ClasspathUtils.java

2006-05-09 Thread stevel
Author: stevel
Date: Tue May  9 13:23:03 2006
New Revision: 405523

URL: http://svn.apache.org/viewcvs?rev=405523&view=rev
Log:
Moving some magic names to a single file

Modified:
ant/core/trunk/src/main/org/apache/tools/ant/MagicNames.java
ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java
ant/core/trunk/src/main/org/apache/tools/ant/util/ClasspathUtils.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/MagicNames.java
URL: 
http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/MagicNames.java?rev=405523&r1=405522&r2=405523&view=diff
==
--- ant/core/trunk/src/main/org/apache/tools/ant/MagicNames.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/MagicNames.java Tue May  9 
13:23:03 2006
@@ -144,5 +144,24 @@
  */
 public static final String BUILD_JAVAC_TARGET = "ant.build.javac.target";
 
+/**
+ * Name of the magic property that controls classloader reuse 
+ * @since Ant 1.4.
+ * Value: [EMAIL PROTECTED]
+ */
+public static final String REFID_CLASSPATH_REUSE_LOADER = 
"ant.reuse.loader";
+
+/**
+ * Prefix used to store classloader references.
+ * Value: [EMAIL PROTECTED]
+ */
+public static final String REFID_CLASSPATH_LOADER_PREFIX = "ant.loader.";
+
+/**
+ * Reference used to store the property helper
+ * Value: [EMAIL PROTECTED]
+ */
+public static final String REFID_PROPERTY_HELPER = "ant.PropertyHelper";
+
 }
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java
URL: 
http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java?rev=405523&r1=405522&r2=405523&view=diff
==
--- ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java Tue May  9 
13:23:03 2006
@@ -124,14 +124,14 @@
 public static synchronized
 PropertyHelper getPropertyHelper(Project project) {
 PropertyHelper helper
-= (PropertyHelper) project.getReference("ant.PropertyHelper");
+= (PropertyHelper) 
project.getReference(MagicNames.REFID_PROPERTY_HELPER);
 if (helper != null) {
 return helper;
 }
 helper = new PropertyHelper();
 helper.setProject(project);
 
-project.addReference("ant.PropertyHelper", helper);
+project.addReference(MagicNames.REFID_PROPERTY_HELPER, helper);
 return helper;
 }
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/util/ClasspathUtils.java
URL: 
http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/util/ClasspathUtils.java?rev=405523&r1=405522&r2=405523&view=diff
==
--- ant/core/trunk/src/main/org/apache/tools/ant/util/ClasspathUtils.java 
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/util/ClasspathUtils.java Tue 
May  9 13:23:03 2006
@@ -20,6 +20,7 @@
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.ProjectComponent;
+import org.apache.tools.ant.MagicNames;
 import org.apache.tools.ant.types.Path;
 import org.apache.tools.ant.types.Reference;
 
@@ -64,11 +65,11 @@
  * @since Ant 1.6
  */
 public class ClasspathUtils {
-private static final String LOADER_ID_PREFIX = "ant.loader.";
+
 /**
  * Name of the magic property that controls classloader reuse in Ant 1.4.
  */
-public static final String REUSE_LOADER_REF = "ant.reuse.loader";
+public static final String REUSE_LOADER_REF = 
MagicNames.REFID_CLASSPATH_REUSE_LOADER;
 
 /**
  * Convenience overloaded version of [EMAIL PROTECTED]
@@ -111,7 +112,7 @@
 + pathId
 + " does not reference a Path.");
 }
-String loaderId = LOADER_ID_PREFIX + pathId;
+String loaderId = MagicNames.REFID_CLASSPATH_LOADER_PREFIX + pathId;
 return getClassLoaderForPath(p, (Path) path, loaderId, reverseLoader);
 }
 
@@ -441,7 +442,7 @@
  * @return The class loader.
  */
 public ClassLoader getClassLoader() {
-return ClasspathUtils.getClassLoaderForPath(
+return getClassLoaderForPath(
 getContextProject(),
 this.classpath,
 getClassLoadId(),
@@ -462,7 +463,7 @@
  */
 public String getClassLoadId() {
 return this.loaderId == null && this.classpathId != null
-? ClasspathUtils.LOADER_ID_PREFIX + this.classpathId
+? MagicNames.REFID_CLASSPATH_LOADER_PREFIX + this.classpathId
 : this.loaderId;
 }
 



-
To unsub

svn commit: r405524 - in /ant/core/trunk/src: main/org/apache/tools/ant/taskdefs/Execute.java main/org/apache/tools/ant/taskdefs/rmic/ForkingSunRmic.java testcases/org/apache/tools/ant/taskdefs/Execut

2006-05-09 Thread stevel
Author: stevel
Date: Tue May  9 13:25:48 2006
New Revision: 405524

URL: http://svn.apache.org/viewcvs?rev=405524&view=rev
Log:
Adding a new non-static method, isFailure() to Execute. As well as simplifying 
a common operation, it is a foundation for instance specific logic to decide if 
an execute failed, which could be of use in VMS land.

Modified:
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Execute.java

ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/ForkingSunRmic.java

ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/ExecuteWatchdogTest.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Execute.java
URL: 
http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Execute.java?rev=405524&r1=405523&r2=405524&view=diff
==
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Execute.java 
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Execute.java Tue May  
9 13:25:48 2006
@@ -47,7 +47,9 @@
  */
 public class Execute {
 
-/** Invalid exit code. **/
+/** Invalid exit code. 
+ * set to [EMAIL PROTECTED] Integer#MAX_VALUE}
+ */
 public static final int INVALID = Integer.MAX_VALUE;
 
 private static final FileUtils FILE_UTILS = FileUtils.getFileUtils();
@@ -584,6 +586,16 @@
 // for other platforms nonzero exit value signals failure
 return Os.isFamily("openvms")
 ? (exitValue % 2 == 0) : (exitValue != 0);
+}
+
+/**
+ * Did this execute return in a failure.
+ * @see #isFailure(int) 
+ * @return true if and only if the exit code is interpreted as a failure
+ * @since Ant1.7
+ */
+public boolean isFailure() {
+return isFailure(getExitValue());
 }
 
 /**

Modified: 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/ForkingSunRmic.java
URL: 
http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/ForkingSunRmic.java?rev=405524&r1=405523&r2=405524&view=diff
==
--- 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/ForkingSunRmic.java 
(original)
+++ 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/ForkingSunRmic.java 
Tue May  9 13:25:48 2006
@@ -65,9 +65,8 @@
 exe.setAntRun(project);
 exe.setWorkingDirectory(project.getBaseDir());
 exe.setCommandline(args);
-
 exe.execute();
-return exe.getExitValue() == 0;
+return !exe.isFailure();
 } catch (IOException exception) {
 throw new BuildException("Error running " + SunRmic.RMIC_EXECUTABLE
 + " -maybe it is not on the path", exception);

Modified: 
ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/ExecuteWatchdogTest.java
URL: 
http://svn.apache.org/viewcvs/ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/ExecuteWatchdogTest.java?rev=405524&r1=405523&r2=405524&view=diff
==
--- 
ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/ExecuteWatchdogTest.java
 (original)
+++ 
ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/ExecuteWatchdogTest.java
 Tue May  9 13:25:48 2006
@@ -27,12 +27,12 @@
  */
 public class ExecuteWatchdogTest extends TestCase {
 
-private final static int TIME_OUT = 5000;
+private final static long TIME_OUT = 5000;
 
 private final static String TEST_CLASSPATH = getTestClassPath();
 
 private final static int CLOCK_ERROR=200;
-private final static int TIME_OUT_TEST=TIME_OUT-CLOCK_ERROR;
+private final static long TIME_OUT_TEST=TIME_OUT-CLOCK_ERROR;
 
 private ExecuteWatchdog watchdog;
 
@@ -58,7 +58,7 @@
 return classpath;
 }
 
-private Process getProcess(int timetorun) throws Exception {
+private Process getProcess(long timetorun) throws Exception {
 String[] cmdArray = {
 JavaEnvUtils.getJreExecutable("java"), "-classpath", 
TEST_CLASSPATH,
 TimeProcess.class.getName(), String.valueOf(timetorun)
@@ -94,7 +94,7 @@
 watchdog.start(process);
 int retCode = waitForEnd(process);
 assertTrue("process should not have been killed", 
!watchdog.killedProcess());
-assertEquals(0, retCode);
+assertFalse(Execute.isFailure(retCode));
 }
 
 // test that the watchdog ends the process



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



DO NOT REPLY [Bug 39536] New: - scp: protocol error: received directory without -r

2006-05-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39536

   Summary: scp: protocol error: received directory without -r
   Product: Ant
   Version: 1.6.1
  Platform: PC
OS/Version: AIX
Status: NEW
  Severity: blocker
  Priority: P2
 Component: Optional Tasks
AssignedTo: dev@ant.apache.org
ReportedBy: [EMAIL PROTECTED]


We started receiving this error after our AIX server was upgraded from 5.2 to 
5.3

>From a discussion about this on the JSch forums at: 
http://sourceforge.net/mailarchive/forum.php?
forum_id=12628&max_rows=25&style=nested&viewmonth=200412
it seems like it's related to differences between OpenSSH 3.4 and 3.9

The patch described in this post fixed our problem so it seemed like something 
that might be good for the official Ant release.

http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/scp.c.diff?
r1=1.113&r2=1.114


diff -Naur apache-ant-
1.6.2/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessage.java 
apache-ant-
1.6.2.new/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessage.java
--apache-ant-
1.6.2/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessage.java
Fri Jul 16 00:57:40 2004
+++ apache-ant-
1.6.2.new/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessage.java
Sat Dec 18 05:51:39 2004
@@ -112,7 +112,7 @@
 }
 
 private void doMultipleTransfer() throws IOException, JSchException {
-Channel channel = openExecChannel("scp -d -t " + remotePath);
+Channel channel = openExecChannel("scp -r -d -t " + remotePath);
 try {
 OutputStream out = channel.getOutputStream();
 InputStream in = channel.getInputStream();


Here's the build target that we encountered the error with:
  

  





  

  

We're running the build script on a W2K PC, transfering files to an AIX 5.3 
server

Thanks!

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



svn commit: r405557 - /ant/core/trunk/src/main/org/apache/tools/ant/util/ResourceUtils.java

2006-05-09 Thread stevel
Author: stevel
Date: Tue May  9 15:31:51 2006
New Revision: 405557

URL: http://svn.apache.org/viewcvs?rev=405557&view=rev
Log:
javadoc

Modified:
ant/core/trunk/src/main/org/apache/tools/ant/util/ResourceUtils.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/util/ResourceUtils.java
URL: 
http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/util/ResourceUtils.java?rev=405557&r1=405556&r2=405557&view=diff
==
--- ant/core/trunk/src/main/org/apache/tools/ant/util/ResourceUtils.java 
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/util/ResourceUtils.java Tue 
May  9 15:31:51 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2005 The Apache Software Foundation
+ * Copyright 2003-2006 The Apache Software Foundation
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -539,7 +539,7 @@
  * Log which Resources (if any) have been modified in the future.
  * @param logTo the ProjectComponent to do the logging.
  * @param rc the collection of Resources to check.
- * @param long the timestamp granularity to use.
+ * @param granularity the timestamp granularity to use.
  * @since Ant 1.7
  */
 private static void logFuture(ProjectComponent logTo,



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



RE: # character causes problem parsing -lib paths

2006-05-09 Thread Paul.Mackay
Hello,

I have tested an SVN snapshot of Ant with the fix in for parsing # in
the path. It works using Java 1.4.2 but not Java 1.3.1. My understanding
is that 1.3 is intended to be supported for Ant 1.7 based on this page
http://wiki.apache.org/ant/Ant17/Planning. Is it possible to test this
functionality using 1.3?

thanks

paul

>-Original Message-
>From: ext Peter Reilly [mailto:[EMAIL PROTECTED] 
>Sent: Wednesday, April 19, 2006 3:52 AM
>To: Ant Developers List
>Subject: Re: # character causes problem parsing -lib paths
>
>I have just checked.
>This is a problem - the ant launcher code does some conversion 
>of file names to URLs. The '#' character is not converted The 
>only work-around (at the moment) is to use symbolic links.
>I have made a change to ant SVN to fix this.
>
>Peter
>
>On 4/19/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>>
>> Hello,
>>
>> I have found that if I specify a -lib option with a path 
>that contains 
>> a hash "#" character, it cannot find the libraries. Without the # 
>> character in the path they can be picked up fine.
>>
>> This is not easily avoided in our environment, as we use Synergy for 
>> SCM, which defaults to using # in the path when checking out 
>projects.
>> This can be changed, but that is not desirable.
>>
>> Is this a known bug? Does anyone know of any workarounds?
>>
>> Many thanks
>>
>> paul
>>
>>
>

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



Re: Scp is this possible?

2006-05-09 Thread Kevin Jackson


or jsch

http://www.jcraft.com/jsch/


I'm already using this one (wrapped with the ant task).  I decided to
use the Ant task for two reasons

1) I can test certain things just using ant without having to deploy a
full web application
2) The SSHExec and Scp tasks are well tested and well documented, why
re-invent the wheel

As for rsync, I agree it makes sense, but the customer will not allow
it on the servers.

Thanks for the suggestion
Kev

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



Re: Scp is this possible?

2006-05-09 Thread Kevin Jackson

I have posted a patch[1] to implement sftp task.


Yes it was discussed yesterday on the dev list


By using sftp task,  you can do as follows,

  

  
   
 



Assuming that the fileset operates on the remote side, that is exactly
what I want - I will give it a try yes.


If you are interested in it, please try it.



Thanks, I will certainly try it and use it if it works.


[1] http://issues.apache.org/bugzilla/show_bug.cgi?id=39532



Kev

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



DO NOT REPLY [Bug 39536] - scp: protocol error: received directory without -r

2006-05-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39536





--- Additional Comments From [EMAIL PROTECTED]  2006-05-10 03:34 ---
(In reply to comment #0)
> We started receiving this error after our AIX server was upgraded from 5.2 to 
> 5.3
> 
> From a discussion about this on the JSch forums at: 
> http://sourceforge.net/mailarchive/forum.php?
> forum_id=12628&max_rows=25&style=nested&viewmonth=200412
> it seems like it's related to differences between OpenSSH 3.4 and 3.9
> 
> The patch described in this post fixed our problem so it seemed like 
> something 
> that might be good for the official Ant release.
...

That patch has been already applied[1] to SVN trunk.
Please try recent nightly build.


[1]
http://svn.apache.org/viewcvs.cgi/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessage.java?rev=277253&r1=277184&r2=277253

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 39373] - scp task does not work for some sshd, which does not scp1 protocol.

2006-05-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39373





--- Additional Comments From [EMAIL PROTECTED]  2006-05-10 03:48 ---
(In reply to comment #19)
> We also need an update of scp's manual page.  IIUC we should recommend to set
> the sftp attribute to true if the ssh server supports ssh2, correct?

IMHO, if users have satisfied with original scp task, there are not any merit
to use sftp attribute, becase scp1 protocol is more efficent than sftp protocol.
So, I hesitate to recommend to use it explicitly.  That attribute is only for
some users, whose sshd does not support scp1 anymore.  Almost users will use
OpenSSH's sshd and it will continue to support scp1 for a while.



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.

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



Re: Scp is this possible?

2006-05-09 Thread Stefan Bodewig
On Wed, 10 May 2006, Kevin Jackson <[EMAIL PROTECTED]> wrote:

> Thanks, I will certainly try it and use it if it works.

If you want to apply ymnk's patch, I committed everything except fpr
the files starting with all uppercase SCP.

Please let us know what you find.

Stefan

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



Re: svn commit: r405524 - in /ant/core/trunk/src: main/org/apache/tools/ant/taskdefs/Execute.java main/org/apache/tools/ant/taskdefs/rmic/ForkingSunRmic.java testcases/org/apache/tools/ant/taskdefs/Ex

2006-05-09 Thread Stefan Bodewig
On Tue, 09 May 2006, <[EMAIL PROTECTED]> wrote:

> As well as simplifying a common operation, it is a foundation for
> instance specific logic to decide if an execute failed, which could
> be of use in VMS land.

You better check with your contacts in the OpenVMS group for some of
your changes.

The tasks executing Java VMs (this includes tasks running rmic or
javac) explicitly checked for a 0 exit code since we've been told the
Java VM wouldn't be playing be OpenVMS rules and return 0 on success.

Stefan

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



Re: Scp is this possible?

2006-05-09 Thread Atsuhiko Yamanaka

Hi,

2006/5/10, Stefan Bodewig <[EMAIL PROTECTED]>:

On Wed, 10 May 2006, Kevin Jackson <[EMAIL PROTECTED]> wrote:

> Thanks, I will certainly try it and use it if it works.

If you want to apply ymnk's patch, I committed everything except fpr
the files starting with all uppercase SCP.


FYI, that attached patch[1] on Bug entry 39532[2] includes only files
for sftp task
and it must be applied to ant_20060509104815.tar.gz without any errors.

[1] http://issues.apache.org/bugzilla/attachment.cgi?id=18250
[2] http://issues.apache.org/bugzilla/show_bug.cgi?id=39532

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



svn commit: r405626 - in /ant/core/trunk/src: main/org/apache/tools/ant/PropertyHelper.java main/org/apache/tools/ant/taskdefs/rmic/ForkingSunRmic.java testcases/org/apache/tools/ant/taskdefs/ExecuteW

2006-05-09 Thread bodewig
Author: bodewig
Date: Tue May  9 21:19:31 2006
New Revision: 405626

URL: http://svn.apache.org/viewcvs?rev=405626&view=rev
Log:
2006

Modified:
ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java

ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/ForkingSunRmic.java

ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/ExecuteWatchdogTest.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java
URL: 
http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java?rev=405626&r1=405625&r2=405626&view=diff
==
--- ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java Tue May  9 
21:19:31 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright  2002-2005 The Apache Software Foundation
+ * Copyright  2002-2006 The Apache Software Foundation
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.

Modified: 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/ForkingSunRmic.java
URL: 
http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/ForkingSunRmic.java?rev=405626&r1=405625&r2=405626&view=diff
==
--- 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/ForkingSunRmic.java 
(original)
+++ 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/ForkingSunRmic.java 
Tue May  9 21:19:31 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright  2005 The Apache Software Foundation
+ * Copyright 2005-2006 The Apache Software Foundation
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.

Modified: 
ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/ExecuteWatchdogTest.java
URL: 
http://svn.apache.org/viewcvs/ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/ExecuteWatchdogTest.java?rev=405626&r1=405625&r2=405626&view=diff
==
--- 
ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/ExecuteWatchdogTest.java
 (original)
+++ 
ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/ExecuteWatchdogTest.java
 Tue May  9 21:19:31 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright  2000-2005 The Apache Software Foundation
+ * Copyright  2000-2006 The Apache Software Foundation
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.



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



Re: Scp is this possible?

2006-05-09 Thread Kev Jackson

Atsuhiko Yamanaka wrote:


Hi,

2006/5/10, Stefan Bodewig <[EMAIL PROTECTED]>:


On Wed, 10 May 2006, Kevin Jackson <[EMAIL PROTECTED]> wrote:

> Thanks, I will certainly try it and use it if it works.

If you want to apply ymnk's patch, I committed everything except fpr
the files starting with all uppercase SCP.



FYI, that attached patch[1] on Bug entry 39532[2] includes only files
for sftp task
and it must be applied to ant_20060509104815.tar.gz without any errors.


I've applied the patch to my local trunk of ant, I made a couple of 
minor changes (mainly getting rid of unused imports etc) - so far so 
good, I can get the files from the remote machine using a contains 
selector, next test is the difficult one, with two date selectors to 
implement between. (ie from-date < file < to-date)


Fantastic timing of the patch by the way, makes my life about 1000% 
simpler :)


For all SSH related stuff, is the consensus to keep it as an optional 
task, or would an antlib make sense for 1.7?


Kev

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



Re: Scp is this possible?

2006-05-09 Thread Kev Jackson

Kev Jackson wrote:


Atsuhiko Yamanaka wrote:


Hi,

2006/5/10, Stefan Bodewig <[EMAIL PROTECTED]>:


On Wed, 10 May 2006, Kevin Jackson <[EMAIL PROTECTED]> wrote:

> Thanks, I will certainly try it and use it if it works.

If you want to apply ymnk's patch, I committed everything except fpr
the files starting with all uppercase SCP.




FYI, that attached patch[1] on Bug entry 39532[2] includes only files
for sftp task
and it must be applied to ant_20060509104815.tar.gz without any errors.



I've applied the patch to my local trunk of ant, I made a couple of 
minor changes (mainly getting rid of unused imports etc) - so far so 
good, I can get the files from the remote machine using a contains 
selector, next test is the difficult one, with two date selectors to 
implement between. (ie from-date < file < to-date)


Damnit!

"selectors are not supported on remote filesets"

Basically that's what I need, the ability to select the files based on 
the last modified - I don't want to pull back files if they are not 
within the search criteria :(


Atsuhiko Yamanaka:
Is this impossible to implement, or did you not need it and therefore 
cut it out from the patch?


Thanks
Kev

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



Re: Scp is this possible?

2006-05-09 Thread Atsuhiko Yamanaka

Hi,

2006/5/10, Kev Jackson <[EMAIL PROTECTED]>:

Damnit!

"selectors are not supported on remote filesets"

Basically that's what I need, the ability to select the files based on
the last modified - I don't want to pull back files if they are not
within the search criteria :(


By following task, I can get only newer files matched with "*.log" on
the remote 'home/weblogic/logs' and save to ${basedir}.


  

 


# Please note that 'depends="yes"'.

Does it not work on your environment or is it enougth?

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



Re: Scp is this possible?

2006-05-09 Thread Kev Jackson

Atsuhiko Yamanaka wrote:


Hi,

2006/5/10, Kev Jackson <[EMAIL PROTECTED]>:


Damnit!

"selectors are not supported on remote filesets"

Basically that's what I need, the ability to select the files based on
the last modified - I don't want to pull back files if they are not
within the search criteria :(



By following task, I can get only newer files matched with "*.log" on
the remote 'home/weblogic/logs' and save to ${basedir}.


  

 


# Please note that 'depends="yes"'.

Does it not work on your environment or is it enougth?


By itself this works fine, the problem is that i need


 


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



Re: Scp is this possible?

2006-05-09 Thread Kev Jackson



By itself this works fine, the problem is that i need


 


In the SFTP code, there's mention of selectors not supported on remote 
filesystems.  Why is taht?  The SFTPDirectoryScanner inherits from the 
normal DirectoyScanner (which does support selectors), is there a 
problem with the SFTP protocol that will not allow selectors to work?


Thanks
Kev

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