DO NOT REPLY [Bug 13652] - RFE: Permit that "apply" parameter "output" can be set to "targetfile"

2003-08-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=13652

RFE: Permit that "apply" parameter "output" can be set to "targetfile"





--- Additional Comments From [EMAIL PROTECTED]  2003-08-26 12:46 ---
With nightly build 2003-08-27 it now is at least possible to use the outputfile
as a target file, i.e.


  
  


We lose the ability to work on multiple files here, but then again this is what
the output attribute promises to do, it captures the output of a single 
execution.

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



DO NOT REPLY [Bug 22726] New: - SCP task fails with zero targets

2003-08-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=22726

SCP task fails with zero targets

   Summary: SCP task fails with zero targets
   Product: Ant
   Version: 1.6Alpha (nightly)
  Platform: Other
OS/Version: Other
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Optional Tasks
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


When the SCP task receives an empty file set, it hangs permanently.

Looking in org.apache.tools.ant.taskdefs.optional.ssh.ScpToMessage.java, in the 
method doMultipleTransfer, you'll see:

channel.connect();

waitForAck(in);
for (Iterator i = directoryList.iterator(); i.hasNext();) {
  Directory current = (Directory) i.next();
  sendDirectory(current, in, out);
}
waitForAck(in);

Now, to my mind, this will connect, and wait for an ack, then send all 
directories, and wait for another ack. But what if directoryList is empty? We 
effectively end up with waitForAck(in) called twice in succession, without any 
actions in between. It would therefore appear that the SCP task is waiting for 
an ack it wouldn't get.

Replacing the second ack with:
if (directoryList.size()!=0) {
  waitForAck(in);
}

Should fix it.

[Note - I do not have an Ant development environment set up, so I am unable to 
test this fix].

Upayavira
[EMAIL PROTECTED]

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



DO NOT REPLY [Bug 22522] - -Task ignores dest-Attribute

2003-08-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=22522

-Task ignores dest-Attribute





--- Additional Comments From [EMAIL PROTECTED]  2003-08-26 14:01 ---
Bug 0 has nothing in common with this bug (cvs does not hang or block
execution in any way).

If have created a simple ant-script which execute the -Task without and
with dest-Attribute:
...



...

There is a difference between the dest-Attribute of the -Task and the -d
switch of the cvsnt program:
The -Task changes to the directory, which is specified by the
dest-Attribute and starts execution from this directory. This is similar to the
-Task and the dir-Attribute.
The cvsnt programm exports the spezified file directly to the directory, which
is specified by the -d switch. The path of the file
(OSP-Kredit\dev\Implementierung\Common\build) is ignored.

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



DO NOT REPLY [Bug 22718] - [PATCH] Print info on nested build scripts in

2003-08-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=22718

[PATCH] Print info on nested build scripts in 





--- Additional Comments From [EMAIL PROTECTED]  2003-08-26 13:57 ---
I've done with using a build listener. I'll attach it. --DD

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



DO NOT REPLY [Bug 22522] - -Task ignores dest-Attribute

2003-08-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=22522

-Task ignores dest-Attribute





--- Additional Comments From [EMAIL PROTECTED]  2003-08-26 13:43 ---
Created an attachment (id=7951)
Output of a -Task without and with dest-Attribute

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



DO NOT REPLY [Bug 22733] - Mistake When I use build

2003-08-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=22733

Mistake When I use build





--- Additional Comments From [EMAIL PROTECTED]  2003-08-26 22:06 ---
1. 'build' is a batch file used to bootstrap ant; you should be calling 'ant'

2. sounds like an error in you classpath is confusing Java.exe

What is the value of your CLASSPATH environment variable? and PATH?

Also, this looks like you are using the java web service dev pack version of
ant. We dont officially support that version, only the official Apache team
releases. If we cannot diagnose the problem from classpath, you may have to take
up the issue with Sun.

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



Re: ant task submission....compilewithwalls

2003-08-26 Thread Steve Loughran
[EMAIL PROTECTED] wrote:
Confused by what you are asking. please see my questions below.


I wrote this task in a few hours.  (Testing took a little longer).  I
didn't think of using the depends and going that route.  That might have
been a good idea.  I would have had to do alot of comparisons.  That is
something I didn't have to do with the route I did take which was just
using javac on the different packages.  javac naturally failed the build
when it couldn't compile due to bad dependencies.
Is there a process for acceptance of a new task into ant?  How does this
work?  Still need to fix my bug and write a test case, but after that???
thanks for any input here.
dean
Yes, the rules are documented in your CVS tree; look for 
ant-task-guidelines.

The hard thing to do is convince everyone not that what you have written 
is a good idea, but that it should go into the repository. Nowadays the 
aim is to keep the explosion of optional tasks under control, primarily 
because it caused too much support grief. Instead we prefer for people 
to host their code wherever, and we point to it; This is why the core of 
ant being enhanced to make it easier to load plug in libraries.


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


Re: ant task submission....compilewithwalls-1

2003-08-26 Thread Dean Hiller
sorry, my open source project's license slipped in because I use a template
for that project and forgot to change one file and take it out.
  I will resubmit this with the apache license.
thanks,
Dean
Steve Loughran wrote:
Dean,
GPL licenses arent allowed in Apache source; we cannot even import 
LGPL code.

/*
Copyright (c) 2002, Dean Hiller
All rights reserved.
*
IF YOU MAKE CHANGES TO THIS CODE AND DO NOT POST THEM, YOU WILL BE IN 
VIOLATION OF THE LICENSE I HAVE GIVEN YOU.  Contact
me at [EMAIL PROTECTED] if you need a different
license.
*

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  
02111-1307, USA.

Also, just to clarify a point in the GNU license, this software can 
only be bundled with your software if your software is free.

*/


-
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]


DO NOT REPLY [Bug 22726] - SCP task fails with zero targets

2003-08-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=22726

SCP task fails with zero targets

[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]
 AssignedTo|[EMAIL PROTECTED]  |[EMAIL PROTECTED]
   Target Milestone|--- |1.6

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



Problem with custom build listener

2003-08-26 Thread Mariano Benitez
I have the following problem:
I have a custom task defined via a  task with  a custom classpath.
Inside the execute() method of that task I create a custom build events 
listener.

The problem is that in the method taskFinished of the listener, the ant 
class loader attempts to load a class, and since it is already in a 
logging mode, it fails with this error:

ile:/w/r4-5/local/tests/conf/utils.xml:120: Listener attempted to access 
System.out - infinite loop terminated
AAA:Class org.apache.tools.ant.Main loaded from parent loader

the AAA: message is that I changed the project.java to show in the 
exception the message it was trying to log.

If you think this is a bug, then I will report it and follow the normal 
procedures.

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


Re: ant task submission....compilewithwalls

2003-08-26 Thread dean
Confused by what you are asking. please see my questions below.

> Nicola Ken Barozzi wrote:
>>
>> Dean Hiller wrote, On 26/08/2003 13.59:
>> ...
>>
>>> Currently at work we prevent this same thing by having separate source
>>> trees and people are complaining up a storm.
>>
>> ...
>>
>>> This helps with that problem of allowing one to keep one source tree
>>> and put up walls that prevent other packages to be used from certain
>>> packages that are supposed to be independent.
>>
>>
>> I like it. :-)
>>
>> I have never liked keeping separate directories for things, even if I do
>> it for the benefit it has in build separation.
>>
>
> I like a good layout of project.model. and project.view. trees; any
> instance of .view packages in the model class is a complete failure of
> separation and easily caught. But having more rigorous meta-rules is
> interesting.

Yeah, so I thought, until a developer once put a dependency in that caused
me a huge headache to get it back out.

> Would it need to be a compile time process, or something you can do just
> by processing the source or even the class files, a la ?

I wrote this task in a few hours.  (Testing took a little longer).  I
didn't think of using the depends and going that route.  That might have
been a good idea.  I would have had to do alot of comparisons.  That is
something I didn't have to do with the route I did take which was just
using javac on the different packages.  javac naturally failed the build
when it couldn't compile due to bad dependencies.

Is there a process for acceptance of a new task into ant?  How does this
work?  Still need to fix my bug and write a test case, but after that???
thanks for any input here.
dean


>
>
> -
> 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]



DO NOT REPLY [Bug 22733] New: - Mistake When I use build

2003-08-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=22733

Mistake When I use build

   Summary: Mistake When I use build
   Product: Ant
   Version: unspecified
  Platform: PC
OS/Version: Other
Status: NEW
  Severity: Critical
  Priority: Other
 Component: Build Process
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


When I use: build -Ddist.dir= dist
appers:
'build' is not recognized as an internal or external command,
operable program or batch file.

When I use ant me the following mistake appears: 
Exception in thread "main" java.lang.NoClassDefFoundError: Files\j2sdk_nb\j2sdk1
/4/2\lib\tools/jar;C:\jwsdp-1/2\apache-ant\//\server\lib\catalina-ant/jar;C:\jws
dp-1/2\apache-ant\//\jaxp\lib\jaxp-api/jar;C:\jwsdp-1/2\apache-ant\//\jaxp\lib\e
ndorsed\xsltc/jar;C:\jwsdp-1/2\apache-ant\//\jaxp\lib\endorsed\xercesImpl/jar;C:
\jwsdp-1/2\apache-ant\//\jaxp\lib\endorsed\xalan/jar;C:\jwsdp-1/2\apache-ant\//\
jaxp\lib\endorsed\sax/jar;C:\jwsdp-1/2\apache-ant\//\jaxp\lib\endorsed\dom/jar;C
:\jwsdp-1/2\apache-ant\lib\xalan/jar;C:\jwsdp-1/2\apache-ant\lib\optional/jar;C:
\jwsdp-1/2\apache-ant\lib\junit/jar;C:\jwsdp-1/2\apache-ant\lib\ant/jar;

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



DO NOT REPLY [Bug 22589] - Empty Output to File from Java Task if Java Fails

2003-08-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=22589

Empty Output to File from Java Task if Java Fails





--- Additional Comments From [EMAIL PROTECTED]  2003-08-26 11:30 ---
There has been an output delay in the 1.5 series of releases that may be the 
reason
that the stream doesn't get flushed properly.  Could you please try a recent
nightly build of Ant to see whether the problem still exists there?

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



RE: cvs commit: ant/src/main/org/apache/tools/ant/util DelayedFil eOutputStream.java

2003-08-26 Thread Dominique Devienne
> -Original Message-
> From: Stefan Bodewig [mailto:[EMAIL PROTECTED]
> 
> On 26 Aug 2003, <[EMAIL PROTECTED]> wrote:
> >   DelayedFileOutputStream.java
> 
> is probably a bad name.  It is a class that wraps around a
> FileOutputStream but doesn't open the file before you actually write
> to it.

How about LazyFileOutputStream? Not sure it's better, but lazy conveys the
meaning of something done only when necessary, but is kind of vague, whereas
delayed can be thought to apply to the output rather than the open, so
DelayedOpenFOS??? --DD 

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



Re: I signed jakarta-ant-src.zip on archives.apache.org

2003-08-26 Thread Steve Loughran
Stefan Bodewig wrote:
2. mozilla junk mail filtering:

Oh, I use ifile[1] as it has some decent integration with my MUA of
choice (Gnus in XEmacs) and it flags the stuff as spam very well.
The problem has been that I've been mostly offline for a week and
accumulated half a gig of spam mails which simply took an hour to
delete as my system was constantly swapping while it tried to reindex
my mail folder.
ahh, so the problem was that you didnt leave the filtering system up and 
running continuously. A few years ago, that would have been OK, but not 
apparently, today.

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


Re: ant task submission....compilewithwalls

2003-08-26 Thread Steve Loughran
Dean,
GPL licenses arent allowed in Apache source; we cannot even import LGPL 
code.

/*
Copyright (c) 2002, Dean Hiller
All rights reserved.
*
IF YOU MAKE CHANGES TO THIS CODE AND DO NOT POST THEM, YOU 
WILL BE IN VIOLATION OF THE LICENSE I HAVE GIVEN YOU.  Contact
me at [EMAIL PROTECTED] if you need a different
license.
*

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
Also, just to clarify a point in the GNU license, this software 
can only be bundled with your software if your software is free.

*/

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


Re: ant task submission....compilewithwalls

2003-08-26 Thread Steve Loughran
Nicola Ken Barozzi wrote:
Dean Hiller wrote, On 26/08/2003 13.59:
...
Currently at work we prevent this same thing by having separate source 
trees and people are complaining up a storm.
...
This helps with that problem of allowing one to keep one source tree 
and put up walls that prevent other packages to be used from certain 
packages that are supposed to be independent.

I like it. :-)
I have never liked keeping separate directories for things, even if I do 
it for the benefit it has in build separation.

I like a good layout of project.model. and project.view. trees; any 
instance of .view packages in the model class is a complete failure of 
separation and easily caught. But having more rigorous meta-rules is 
interesting.

Would it need to be a compile time process, or something you can do just 
by processing the source or even the class files, a la ?

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


Re: ant task submission....compilewithwalls

2003-08-26 Thread Stefan Bodewig
On Tue, 26 Aug 2003, Dean Hiller <[EMAIL PROTECTED]> wrote:

> I see the html file in my sent mail, but once I received it back
> from the list, it is not there.

The list doesn't allow any HTML parts, not even attachments.

Stefan

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



Re: cvs commit: ant/src/main/org/apache/tools/ant/util DelayedFileOutputStream.java

2003-08-26 Thread Stefan Bodewig
On 26 Aug 2003, <[EMAIL PROTECTED]> wrote:

>   DelayedFileOutputStream.java

is probably a bad name.  It is a class that wraps around a
FileOutputStream but doesn't open the file before you actually write
to it.

This one will now be used in Redirector instead of a plain
FileOutputStream, the effects I see

(1) If your  pointed to the outfile,  would have always
skipped the execution as the output file had just been opened
microseconds ago when the timestamp comparison kicked in.  So it
enables a feature in 

(2) You won't end up with any output file at all when Ant fails to
execute the command in ,  or  with fork=true.

(3) If the executable doesn't produce any output, no output-file will
be created.

(2) and (3) are not backwards compatible but would be easy to fix
(DelayedFileOutputStream has an explicit open() that could be used
after the command has been executed).  I'm just not sure whether we
really want to fix (2) at all - and maybe we want to control the
behavior of (3) with a flag.

Stefan

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



DO NOT REPLY [Bug 22718] - [PATCH] Print info on nested build scripts in

2003-08-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=22718

[PATCH] Print info on nested build scripts in 





--- Additional Comments From [EMAIL PROTECTED]  2003-08-26 13:59 ---
Created an attachment (id=7952)
ant/antcall/subant friendly variant of NoBannerLogger. --DD

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



Re: ant task submission....compilewithwalls

2003-08-26 Thread Nicola Ken Barozzi
Dean Hiller wrote, On 26/08/2003 13.59:
...
Currently at work we prevent this same thing by having separate source 
trees and people are complaining up a storm.
...
This helps with that problem of allowing one to keep one 
source tree and put up walls that prevent other packages to be used from 
certain packages that are supposed to be independent.
I like it. :-)
I have never liked keeping separate directories for things, even if I do 
it for the benefit it has in build separation.

--
Nicola Ken Barozzi   [EMAIL PROTECTED]
- verba volant, scripta manent -
   (discussions get forgotten, just code remains)
-

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


cvs commit: ant/src/main/org/apache/tools/ant/util DelayedFileOutputStream.java

2003-08-26 Thread bodewig
bodewig 2003/08/26 05:32:57

  Modified:src/main/org/apache/tools/ant/taskdefs Redirector.java
  Added:   src/main/org/apache/tools/ant/util
DelayedFileOutputStream.java
  Log:
  Don't open the file used for  and friends before
  it gets actually written.
  
  Needed to fix PR: 13652
  
  Revision  ChangesPath
  1.8   +4 -16 
ant/src/main/org/apache/tools/ant/taskdefs/Redirector.java
  
  Index: Redirector.java
  ===
  RCS file: 
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Redirector.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Redirector.java   17 Jul 2003 10:20:15 -  1.7
  +++ Redirector.java   26 Aug 2003 12:32:57 -  1.8
  @@ -57,9 +57,8 @@
   import java.io.ByteArrayOutputStream;
   import java.io.ByteArrayInputStream;
   import java.io.File;
  -import java.io.FileNotFoundException;
  -import java.io.FileOutputStream;
   import java.io.FileInputStream;
  +import java.io.FileNotFoundException;
   import java.io.IOException;
   import java.io.StringReader;
   import java.io.OutputStream;
  @@ -68,6 +67,7 @@
   import org.apache.tools.ant.BuildException;
   import org.apache.tools.ant.Project;
   import org.apache.tools.ant.Task;
  +import org.apache.tools.ant.util.DelayedFileOutputStream;
   import org.apache.tools.ant.util.StringUtils;
   import org.apache.tools.ant.util.TeeOutputStream;
   
  @@ -269,16 +269,10 @@
   errorStream = new LogOutputStream(managingTask, 
Project.MSG_WARN);
   } else {
   if (out != null)  {
  -try {
   outputStream
  -= new FileOutputStream(out.getAbsolutePath(), 
append);
  += new DelayedFileOutputStream(out, append);
   managingTask.log("Output redirected to " + out,
Project.MSG_VERBOSE);
  -} catch (FileNotFoundException fne) {
  -throw new BuildException("Cannot write to " + out, fne);
  -} catch (IOException ioe) {
  -throw new BuildException("Cannot write to " + out, ioe);
  -}
   }
   
   if (outputProperty != null) {
  @@ -302,16 +296,10 @@
   }
   
   if (error != null)  {
  -try {
   errorStream
  -= new FileOutputStream(error.getAbsolutePath(), append);
  += new DelayedFileOutputStream(error, append);
   managingTask.log("Error redirected to " + error,
   Project.MSG_VERBOSE);
  -} catch (FileNotFoundException fne) {
  -throw new BuildException("Cannot write to " + error, fne);
  -} catch (IOException ioe) {
  -throw new BuildException("Cannot write to " + error, ioe);
  -}
   }
   
   if (errorProperty != null) {
  
  
  
  1.1  
ant/src/main/org/apache/tools/ant/util/DelayedFileOutputStream.java
  
  Index: DelayedFileOutputStream.java
  ===
  /*
   * 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 F

Re: ant task submission....compilewithwalls

2003-08-26 Thread Dean Hiller
actually, you probably can't use the task right now without a 
workaround.  Found a bug that didn't exist in my eclipse environment 
with the task.  The work around if you want to try it is to create the 
build directory and put a file in the build directory.  For some reason, 
the task is deleting javac's destdir if destdir is empty.
Dean

Dean Hiller wrote:
yeah, that's weird.  I see the html file in my sent mail, but once I 
received it back from the list, it is not there.

So anyways, here is the summary.  In a project, there can be lots of 
modules and it is important to make sure the designs are not 
violated.  certain packages depend on other certain packages.  
Sometimes we accidentally put dependencies were we did not mean to put 
them.  At an architectural level we prevent this by putting stuff like 
server, client, and api in three totally separate source trees so that 
the client doesn't depend directly on the server but depends on the 
api only.  CompileWithWalls is designed to put up the walls at the 
design level.  Basically, lets say your server has a player, recorder 
and a mediasession that uses both.  player should not depend on 
recorder and recorder should not depend on player.

Here are the packages.
biz.xsoftware.media.player
biz.xsoftware.media.recorder
biz.xsoftware.media
Currently if they are all in the same source tree, people may 
accidentally introduce dependencies between recorder and player making 
them unreusable and violating the design laid out.  compilewithwalls 
is defined like so to prevent this


 



 
 NORMAL Javac task with same params


Notice closely that all the dependencies of the packages are clearly 
stated in the walls element.  If many people start to like this, there 
may be a walls attribute later specifying the file with the walls 
element of dependencies.  The above guaranteed that modA will not be 
able to put code in that depends on modB and vice versa.  It also 
allows code to be put in mod that depends on modA and modB.

Another common use would be in a common module.  I just put these same 
walls up and was disgusted by some package dependencies I accidentally 
introduced.  This helps me prevent myself from doing it.

Currently at work we prevent this same thing by having separate source 
trees and people are complaining up a storm.  The thing is when we 
went to that structure we realized all these dependencies that we 
didn't want existed.  This helps with that problem of allowing one to 
keep one source tree and put up walls that prevent other packages to 
be used from certain packages that are supposed to be independent.

what do you think?  I already know my company wants to use it, a 
friend at another company wants to use it, and I want to use it on my 
open source project also.  I am curious what others think.  I hope you 
will try it on your common module and see what dependencies pop up.

I have attached the a zip this time with everything in it including 
the html file so it doesn't get stripped.
thanks,
dean


Conor MacNeill wrote:
On Tue, 26 Aug 2003 01:22 pm, Dean Hiller wrote:
 

Hello,
   What is the acceptance process of a new task?  I would like to put
this task in the ant repository for anybody else who needs it.  I have
attached the task, tests and doc for it.  I have put in the apache
licenses and stuff also.
thanks,
   

I don't see any docs (may have been removed by list manager) Could you give us 
a quick summary of what this task is for?

Conor

-
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]


Re: ant task submission....compilewithwalls

2003-08-26 Thread Dean Hiller




yeah, that's weird.  I see the html file in my sent mail, but once I
received it back from the list, it is not there.

So anyways, here is the summary.  In a project, there can be lots of
modules and it is important to make sure the designs are not violated. 
certain packages depend on other certain packages.  Sometimes we
accidentally put dependencies were we did not mean to put them.  At an
architectural level we prevent this by putting stuff like server,
client, and api in three totally separate source trees so that the
client doesn't depend directly on the server but depends on the api
only.  CompileWithWalls is designed to put up the walls at the design
level.  Basically, lets say your server has a player, recorder and a
mediasession that uses both.  player should not depend on recorder and
recorder should not depend on player.

Here are the packages.
biz.xsoftware.media.player
biz.xsoftware.media.recorder
biz.xsoftware.media

Currently if they are all in the same source tree, people may
accidentally introduce dependencies between recorder and player making
them unreusable and violating the design laid out.  compilewithwalls is
defined like so to prevent this

 
  
     
     
     
  
 NORMAL Javac task with same params


Notice closely that all the dependencies of the packages are clearly
stated in the walls element.  If many people start to like this, there
may be a walls attribute later specifying the file with the walls
element of dependencies.  The above guaranteed that modA will not be
able to put code in that depends on modB and vice versa.  It also
allows code to be put in mod that depends on modA and modB.

Another common use would be in a common module.  I just put these same
walls up and was disgusted by some package dependencies I accidentally
introduced.  This helps me prevent myself from doing it.

Currently at work we prevent this same thing by having separate source
trees and people are complaining up a storm.  The thing is when we went
to that structure we realized all these dependencies that we didn't
want existed.  This helps with that problem of allowing one to keep one
source tree and put up walls that prevent other packages to be used
from certain packages that are supposed to be independent.

what do you think?  I already know my company wants to use it, a friend
at another company wants to use it, and I want to use it on my open
source project also.  I am curious what others think.  I hope you will
try it on your common module and see what dependencies pop up.

I have attached the a zip this time with everything in it including the
html file so it doesn't get stripped.
thanks,
dean




Conor MacNeill wrote:

  On Tue, 26 Aug 2003 01:22 pm, Dean Hiller wrote:
  
  
Hello,
What is the acceptance process of a new task?  I would like to put
this task in the ant repository for anybody else who needs it.  I have
attached the task, tests and doc for it.  I have put in the apache
licenses and stuff also.
thanks,

  
  
I don't see any docs (may have been removed by list manager) Could you give us 
a quick summary of what this task is for?

Conor



-
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]

DO NOT REPLY [Bug 22710] - Allow exec to detach a process

2003-08-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=22710

Allow exec to detach a process

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE
   Target Milestone|--- |1.6



--- Additional Comments From [EMAIL PROTECTED]  2003-08-26 07:36 ---
CVS HEAD's  has a spawn attribute.

*** This bug has been marked as a duplicate of 5907 ***

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



DO NOT REPLY [Bug 22528] - regular expressions

2003-08-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=22528

 regular expressions

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2003-08-26 07:51 ---
file globbing like input/output redirection is performed by the shell on Unix
(aparantly this is not true for globbing on Windows) so you'd have to invoke
sh as executable and pass the rest via -c (see FAQ for the example on output
redirection).

Changing antRun to use eval would destroy several other invocations - and antRun
isn't used on JDK 1.3+ if vmlauncher hasn't been set to false anyway.

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



DO NOT REPLY [Bug 22705] - ant 1.6alpha (and possibly earlier) requires JDK 1.4

2003-08-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=22705

ant 1.6alpha (and possibly earlier) requires JDK 1.4

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-08-26 08:37 ---
fixed with nightly build 2003-08-27 - all released versions should work as
they've not been compiled with JDK 1.4.

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



DO NOT REPLY [Bug 22522] - -Task ignores dest-Attribute

2003-08-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=22522

-Task ignores dest-Attribute





--- Additional Comments From [EMAIL PROTECTED]  2003-08-26 07:47 ---
Could you run ant -debug to see the command line the two different tasks 
produce?

Maybe the problem is CVSNT specific (see also Bug 0) as it works for me
on Linux.

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



DO NOT REPLY [Bug 19237] - SSHExec task should fail if remote command fails

2003-08-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=19237

SSHExec task should fail if remote command fails

[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]
 AssignedTo|[EMAIL PROTECTED]  |[EMAIL PROTECTED]
   Target Milestone|--- |1.6



--- Additional Comments From [EMAIL PROTECTED]  2003-08-26 07:42 ---
I'll look into the patch once jsch 0.17 has been released.

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



DO NOT REPLY [Bug 22696] - [PATCH] OpenVMS-aware IntrospectionHelperTest

2003-08-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=22696

[PATCH] OpenVMS-aware IntrospectionHelperTest

[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]
 AssignedTo|[EMAIL PROTECTED]  |[EMAIL PROTECTED]
   Target Milestone|--- |1.6

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



DO NOT REPLY [Bug 5907] - ExecTask waits regardless of what you are executing

2003-08-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=5907

ExecTask waits regardless of what you are executing

[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]



--- Additional Comments From [EMAIL PROTECTED]  2003-08-26 07:36 ---
*** Bug 22710 has been marked as a duplicate of this bug. ***

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



DO NOT REPLY [Bug 22696] - [PATCH] OpenVMS-aware IntrospectionHelperTest

2003-08-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=22696

[PATCH] OpenVMS-aware IntrospectionHelperTest

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-08-26 08:23 ---
patch applied, thanks.

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



Import in Antlibs (Re: [new tasks] presetdef and macrodef)

2003-08-26 Thread Nicola Ken Barozzi
Gus Heck wrote, On 25/08/2003 18.02:
Nicola Ken Barozzi wrote:
Jose Alberto Fernandez wrote, On 22/08/2003 14.58:
From: Gus Heck [mailto:[EMAIL PROTECTED] 
...
If macro definitions are available to sub builds, then your 3rd case 
might occur, but I don't think it would be good to allow macros to 
be called across build file boundaries. builds would be almost 
unintelligible without tracking down the macros from other files.
This is all regular kosher ANT stuff, up to this day, s get
inherited, they do not need to be redeclared for the task to be
available during the . 
...
We already have a solution for the case of  I would just like
the behavior on both cases to be the same, so to reduce the leaarning
curve.
What about making them part of antlibs too?
How does a macro defined in the build become an antlib?
The easiest way is to make it possible for antlibs to contain buildfiles 
that are imported.

Antlibs would thus be jars that contain tasks, typedefs, and buildfiles.
When loaded, the taskdefs are called, the typedefs too, and the 
buildfile is imported.

This is what we do in Centipede, and it works ATM quite well, as we are 
able to thus to create antlibs easily even without any java code, only 
by including a buildfile.

The alternative would be to allow only special buildfile snippets that 
contain macrodefs, that is to check that there are only macrodefs and 
import that file.

What do others think?
--
Nicola Ken Barozzi   [EMAIL PROTECTED]
- verba volant, scripta manent -
   (discussions get forgotten, just code remains)
-

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


cvs commit: ant/src/main/org/apache/tools/ant/types Description.java

2003-08-26 Thread bodewig
bodewig 2003/08/26 01:34:49

  Modified:src/main/org/apache/tools/ant/types Description.java
  Log:
  explicitly cast StringBuffer to Object so that the "right" append
  method gets chosen.  This ensures that a JDK 1.4 compiled Ant can be
  run on JDK 1.2.  Well, makes it more likely.
  
  PR: 22705
  
  Revision  ChangesPath
  1.15  +2 -2  ant/src/main/org/apache/tools/ant/types/Description.java
  
  Index: Description.java
  ===
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/Description.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Description.java  23 Jul 2003 10:50:32 -  1.14
  +++ Description.java  26 Aug 2003 08:34:49 -  1.15
  @@ -137,7 +137,7 @@
   UnknownElement ue = ((UnknownElement) task);
   StringBuffer descComp = ue.getWrapper().getText();
   if (descComp != null) {
  -description.append(descComp);
  +description.append((Object) descComp);
   }
   }
   }
  
  
  

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



cvs commit: ant/src/testcases/org/apache/tools/ant IntrospectionHelperTest.java

2003-08-26 Thread bodewig
bodewig 2003/08/26 01:21:02

  Modified:src/testcases/org/apache/tools/ant
IntrospectionHelperTest.java
  Log:
  Make tests pass on OpenVMS.
  
  PR: 22696
  Submitted by: Knut Wannheden 
  
  Revision  ChangesPath
  1.16  +2 -2  
ant/src/testcases/org/apache/tools/ant/IntrospectionHelperTest.java
  
  Index: IntrospectionHelperTest.java
  ===
  RCS file: 
/home/cvs/ant/src/testcases/org/apache/tools/ant/IntrospectionHelperTest.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- IntrospectionHelperTest.java  7 Mar 2003 11:23:10 -   1.15
  +++ IntrospectionHelperTest.java  26 Aug 2003 08:21:02 -  1.16
  @@ -1,7 +1,7 @@
   /*
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 2000-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2000-2001,2003 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  @@ -446,7 +446,7 @@
   }
   
   public void setTen(File f) {
  -if (Os.isFamily("unix")) { 
  +if (Os.isFamily("unix") || Os.isFamily("openvms")) {
   assertEquals(projectBasedir+"2", f.getAbsolutePath());
   } else if (Os.isFamily("netware")) {
   assertEquals(projectBasedir+"2", 
f.getAbsolutePath().toLowerCase(Locale.US));
  
  
  

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



Re: I signed jakarta-ant-src.zip on archives.apache.org

2003-08-26 Thread Stefan Bodewig
On Mon, 25 Aug 2003, Steve Loughran <[EMAIL PROTECTED]> wrote:

> 1. pull your email address out of all the ant source you can find;

I've already done this.  Won't help, I'm still in the manual, on the
website and in the KEYS file.  I can't change the last and wouldn't
like to change the former.

And then again, posting to mailing lists is probably enough.

I haven't found a way to avoid that my address gets added to an
Outlook address book either ;-)

> 2. mozilla junk mail filtering:

Oh, I use ifile[1] as it has some decent integration with my MUA of
choice (Gnus in XEmacs) and it flags the stuff as spam very well.

The problem has been that I've been mostly offline for a week and
accumulated half a gig of spam mails which simply took an hour to
delete as my system was constantly swapping while it tried to reindex
my mail folder.

Stefan

Footnotes: 
[1]  http://savannah.nongnu.org/projects/ifile


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



DO NOT REPLY [Bug 19237] - SSHExec task should fail if remote command fails

2003-08-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=19237

SSHExec task should fail if remote command fails





--- Additional Comments From [EMAIL PROTECTED]  2003-08-25 04:13 ---
I've included two patches; one for SSHExec.java on the ant side, and one for
jsch (against .16) that allow retrieval of the status codes. It's likely an
awful hack, but it does seem to work. Of course, this would have to incorporated
into jsch itself if the ant patch were to be included (assuming that the method
I used on the jsch side is correct and okay).

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



DO NOT REPLY [Bug 22705] - ant 1.6alpha (and possibly earlier) requires JDK 1.4

2003-08-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=22705

ant 1.6alpha (and possibly earlier) requires JDK 1.4





--- Additional Comments From [EMAIL PROTECTED]  2003-08-25 19:48 ---
What is the output of ant -version? and java -version on your system?

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



Re: ant task submission....compilewithwalls

2003-08-26 Thread Conor MacNeill
On Tue, 26 Aug 2003 01:22 pm, Dean Hiller wrote:
> Hello,
> What is the acceptance process of a new task?  I would like to put
> this task in the ant repository for anybody else who needs it.  I have
> attached the task, tests and doc for it.  I have put in the apache
> licenses and stuff also.
> thanks,

I don't see any docs (may have been removed by list manager) Could you give us 
a quick summary of what this task is for?

Conor



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



DO NOT REPLY [Bug 19237] - SSHExec task should fail if remote command fails

2003-08-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=19237

SSHExec task should fail if remote command fails





--- Additional Comments From [EMAIL PROTECTED]  2003-08-26 03:51 ---
The changes to jsch were no good; the developers there straightened things out
and incorporate them into .17 which should be out very shortly. The latest
attachment (patch.17) is the version of SSHExec.java that will work property
against the new jsch libs, as tested against jsch-0.17-rc3. Tested that the
desired results happened with a successful command, unsucessful command, and
both ways again with "failonerror" disabled.

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



DO NOT REPLY [Bug 19237] - SSHExec task should fail if remote command fails

2003-08-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=19237

SSHExec task should fail if remote command fails





--- Additional Comments From [EMAIL PROTECTED]  2003-08-26 03:48 ---
Created an attachment (id=7947)
New patch compatible with jsch .17 changes.

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



DO NOT REPLY [Bug 22705] - ant 1.6alpha (and possibly earlier) requires JDK 1.4

2003-08-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=22705

ant 1.6alpha (and possibly earlier) requires JDK 1.4





--- Additional Comments From [EMAIL PROTECTED]  2003-08-25 20:36 ---
BTW, I should add that I have tried the above scenario with JDK 1.4.1 and 
1.4.2, and it works fine.

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



ant task submission....compilewithwalls

2003-08-26 Thread Dean Hiller
Hello,
   What is the acceptance process of a new task?  I would like to put 
this task in the ant repository for anybody else who needs it.  I have 
attached the task, tests and doc for it.  I have put in the apache 
licenses and stuff also.
thanks,
dean

/*
 * The Apache Software License, Version 1.1
 *
 * Copyright (c) 2000-2002 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
 * .
 */
package org.apache.tools.ant.taskdefs.optional.walls;

import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;


/*
 * Created on Aug 24, 2003
 *
 * To change the template for this generated file go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
/**
 * FILL IN JAVADOC HERE
 *
 * @author $Author: deanhiller $
 * @version $ProductVersion:$ $FileVersion:$ $Revision: $ $Date: $
 * @since $ProductVersionCreated:$ Aug 24, 2003
 */
public class Walls {

private List packages = new LinkedList();
private Map nameToPackage = new HashMap();

public void addConfiguredPackage(Package p) {

String pack = p.getPackage();
if(!pack.endsWith(".*") && !pack.endsWith(".**"))
p.setFaultReason("The package='"+pack+"' must end with "
+".* or .** such as 
biz.xsoftware.* or "
+"biz.xsoftware.**");

String[] depends = p.getDepends();
if(depends == null) {
nameToPackage.put(p.getName(), p);
packages.add(p);
return;
} 

//make sure all depends are in Map first
//circular references then are not a problem because they must
//put the stuff in order
for(int i = 0; i < depends.length; i++) {
Package dependsPackage = 
(Package)nameToPackage.get(depends[i]);

if(dependsPackage == null) {
p.setFaultReason("package name="+p.getName()+" 
did not have "
+depends[i]+" listed before it 
and cannot compile without it");
} else

p.addExcludesElement(dependsPackage.getPackage());
}

nameToPackage.put(p.getName(), p);
packa

DO NOT REPLY [Bug 22710] New: - Allow exec to detach a process

2003-08-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=22710

Allow exec to detach a process

   Summary: Allow exec to detach a process
   Product: Ant
   Version: 1.5.4
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: Enhancement
  Priority: Other
 Component: Core tasks
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


I was having problems using ant to start a j2ee server (Jonas). The problem was 
that ant 
kept waiting for the process to finish (which is strange, as it was started by 
a script in the 
background). Anyway, this does seem to occur to other people too (I found some 
references 
in the mailing list with people having the same kind of problem when starting 
tomcat).  
The suggested solution that seems to be wildly circulated on the mailing lists 
is a hacked 
version of the Exec task (apropriately called 'spawn'). Therefore I propose to 
allow an 
optional boolean parameter called 'detach' to the exec task (defaulting to 
false) which 
controls this kind of behaviour. I have implemented this and provide the patch 
(base version 
is ant 1.5.4) below. I'm not sure that it will behave properly under all 
circumstances (I'm not 
an expert in forked processes behaviour and handling), but it does solve my 
problem (which 
is a good start ;-) ). 
 
regards, 
Ives Landrieu 
 
--- patch follows --- 
--- apache-ant-1.5.4/src/main/org/apache/tools/ant/taskdefs/ExecTask.java   
2003-08-12 
14:11:06.0 +0200 
+++ 
apache-ant-1.5.4.patched/src/main/org/apache/tools/ant/taskdefs/ExecTask.java   

2003-08-25 21:38:48.0 +0200 
@@ -98,6 +98,7 @@ 
 private String resultProperty; 
 private boolean failIfExecFails = true; 
 private boolean append = false; 
+   private boolean detach = false; 
  
 /**  
  * Controls whether the VM (1.3 and above) is used to execute the 
@@ -126,6 +127,24 @@ 
 } 
  
 /** 
+ * Controls detachement of the executing process. 
+ * 
+ * @since Ant 1.6 
+ */ 
+public void setDetach(boolean value) { 
+detach = value; 
+} 
+ 
+/** 
+ * Controls detachement of the executing process. 
+ * 
+ * @since Ant 1.6 
+ */ 
+public boolean getDetach() { 
+return detach; 
+} 
+ 
+/** 
  * The command to execute. 
  */ 
 public void setExecutable(String value) { 
@@ -307,6 +326,7 @@ 
 exe.setAntRun(getProject()); 
 exe.setWorkingDirectory(dir); 
 exe.setVMLauncher(vmLauncher); 
+   exe.setDetach(detach); 
 String[] environment = env.getVariables(); 
 if (environment != null) { 
 for (int i = 0; i < environment.length; i++) { 
diff --exclude='*flc' --exclude='*~' -Naur 
apache-ant-1.5.4/src/main/org/apache/tools/ant/taskdefs/Execute.java 
apache-ant-1.5.4.patched/src/main/org/apache/tools/ant/taskdefs/Execute.java 
--- apache-ant-1.5.4/src/main/org/apache/tools/ant/taskdefs/Execute.java
2003-08-12 
14:11:08.0 +0200 
+++ 
apache-ant-1.5.4.patched/src/main/org/apache/tools/ant/taskdefs/Execute.java

2003-08-25 21:35:40.0 +0200 
@@ -96,6 +96,7 @@ 
  
 /** Controls whether the VM is used to launch commands, where possible */ 
 private boolean useVMLauncher = true; 
+   private boolean detach = false; 
  
 private static String antWorkingDirectory = 
System.getProperty("user.dir"); 
 private static CommandLauncher vmLauncher = null; 
@@ -394,6 +395,17 @@ 
 } 
  
 /** 
+ * Controls whether ant will wait for the launched process to finish. 
+ * @param useVMLauncher true if exec should launch through thge VM, 
+ *   false if the shell should be used to launch the 
+ *   command. 
+ */ 
+ 
+public void setDetach(boolean detach) { 
+this.detach = detach; 
+} 
+ 
+/** 
  * Creates a process that runs a command. 
  * 
  * @param project the Project, only used for logging purposes, may be 
null. 
@@ -445,16 +457,20 @@ 
 if (watchdog != null) { 
 watchdog.start(process); 
 } 
-waitFor(process); 
- 
-// remove the process to the list of those to destroy if the VM exits 
-// 
-processDestroyer.remove(process); 
+   if(!detach) { 
+   waitFor(process); 
+
+   // remove the process to the list of those to destroy 
if the VM exits 
+   // 
+   processDestroyer.remove(process); 
+   } 
  
 if (w

DO NOT REPLY [Bug 22705] - ant 1.6alpha (and possibly earlier) requires JDK 1.4

2003-08-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=22705

ant 1.6alpha (and possibly earlier) requires JDK 1.4





--- Additional Comments From [EMAIL PROTECTED]  2003-08-25 20:25 ---
% ant -version
Apache Ant version 1.6alpha compiled on April 25 2003
%
% java version "1.3.1_07"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_07-b02)
Java HotSpot(TM) Client VM (build 1.3.1_07-b02, mixed mode)

In response to Dominique's comment, yes StringBuffer#append(Object) does exist, 
but if ant was compiled under JDK 1.4, the compiler would have resolved the 
call on line 123 to StringBuffer#append(StringBuffer). If the result is then 
run against JDK 1.3.x, and the latter method cannot be located, I don't believe 
that the runtime will fall back to using the more generic method (someone with 
more detailed Java knowledge than mine may want to correct me here). I've run a 
simple test case that seems to confirm this.

I'm not sure why the name of the missing method is not being printed.

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



DO NOT REPLY [Bug 22718] - [PATCH] Print info on nested build scripts in

2003-08-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=22718

[PATCH] Print info on nested build scripts in 





--- Additional Comments From [EMAIL PROTECTED]  2003-08-25 23:08 ---
Created an attachment (id=7944)
Suggested patch

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



DO NOT REPLY [Bug 22718] New: - [PATCH] Print info on nested build scripts in

2003-08-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=22718

[PATCH] Print info on nested build scripts in 

   Summary: [PATCH] Print info on nested build scripts in 
   Product: Ant
   Version: 1.6Alpha (nightly)
  Platform: All
OS/Version: All
Status: NEW
  Severity: Enhancement
  Priority: Other
 Component: Core tasks
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


This patch just lets you see when you are entering or exiting a nested build
script with the  task. For a build system composed of many nested scripts,
esp. "template" scripts called with s, this can be very helpful for
seeing what is going on.

Make has done this for years.

Perhaps better would be to change/extend the BuildListener interface to
explicitly mark entry & exit points for subprojects, so that the logger impl
could choose to format this information in different ways - e.g. displaying
messages from nested projects using indentation.

(I also tried to patch the default console build logger to autodetect messages
coming from nested projects, using some sort of stack of Project objects gotten
from existing events, but this did not seem like it would be reliable, so I
switched to logging the info directly from .)

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



DO NOT REPLY [Bug 22705] - ant 1.6alpha (and possibly earlier) requires JDK 1.4

2003-08-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=22705

ant 1.6alpha (and possibly earlier) requires JDK 1.4





--- Additional Comments From [EMAIL PROTECTED]  2003-08-25 23:04 ---
OK, now I understand why the problem didn't appear when I tried it out on ant 
1.5.3, even though it contains the code change to Description.java. I will 
follow your suggestion and recompile 1.6alpha under jdk 1.3.x.

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



DO NOT REPLY [Bug 22705] - ant 1.6alpha (and possibly earlier) requires JDK 1.4

2003-08-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=22705

ant 1.6alpha (and possibly earlier) requires JDK 1.4





--- Additional Comments From [EMAIL PROTECTED]  2003-08-25 22:57 ---
I have seen this problem before. The StringBuffer.append(StringBuffer) method 
was
added in jdk 1.4. If someone will build a distribution that tries to append a
StringBuffer to a StringBuffer with jdk prior to 1.4. The build will succeed and
it will run correctly. If you build it with jdk 1.4, it will use the new
StringBuffer.append(StringBuffer) method and not the StringBuffer.append(Object)
method. 

That said, you are probably using an ant 1.6-alpha version that has been built
using jdk 1.4. You should then build the ant 1.6-alpha distribution with jdk 1.2
or 1.3 and this problem will go away.

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



DO NOT REPLY [Bug 22705] - ant 1.6alpha (and possibly earlier) requires JDK 1.4

2003-08-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=22705

ant 1.6alpha (and possibly earlier) requires JDK 1.4





--- Additional Comments From [EMAIL PROTECTED]  2003-08-25 22:51 ---
I've encountered this before; it is as Eric observed in his second comment -the
append(StringBuffer) method is new, and if your code compiles against the 1.4
version, it wont run against older versions.

the other fix is to cast the buffer to Object :-

description.append( (Object)descComp );

Eric, note that release builds have historically been made in a very complex
way, which involves downlevel java versions at the right time to compile java1.1
code, java1.4 only to build the 1.4 specific bits. Release versions of ant would
not have exhibited this problem, only nightly Gump builds. And we recommend you
build your own in those situations, as the nightly builds often miss out on
useful optional stuff. Thank you for finding the bug, however, as it is one of
those sublties that could have caught us out.

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



Re: how to programatically temporarily turn off logging

2003-08-26 Thread Dean Hiller
thanks Dominique.  I think I have to go your suggested route instead.  
The previous suggestion by Jan was really good, but turned out I would 
have to worry too much about cloning the project properties and alot of 
other stuff.  I did especially like the debug you added too  fits in 
right with what I want.
thanks,
dean

Dominique Devienne wrote:
A little hackish, but this works...
Redirects the INFO output to VERBOSE. --DD
 /** Silent version of . */
 private static class SilentExpand extends Expand {
   public void log(String msg) {   
 super.log(msg, Project.MSG_VERBOSE);   
   }
   public void log(String msg, int level) {   
 super.log(msg, (level==Project.MSG_INFO? Project.MSG_VERBOSE: level));
   }
 } // END class DspModuleInstall.SilentExpand

 

-Original Message-
From: Dean Hiller [mailto:[EMAIL PROTECTED]
Sent: Monday, August 25, 2003 8:27 AM
To: [EMAIL PROTECTED]
Subject: how to programatically temporarily turn off logging
I have a task that uses the move tasks.  How do I turn off logging from
the Move task?
I typically will only let the move task log when the user selects
verbose or debug or something.  Otherwise, there is just too much
logging coming out of my new ant task.
thanks,
dean
   

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