DO NOT REPLY [Bug 29742] - Modified selector doesn't allow algorithm or comparator selection
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29742. 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=29742 Modified selector doesn't allow algorithm or comparator selection --- Additional Comments From [EMAIL PROTECTED] 2004-06-22 22:51 --- The configuration of the checksum algorithm follows the pattern of the current design of the ModifiedSelector. The similar example would be the digest algorithm, which has two options for the algorithm.algorithm parameter, MD5 and SHA. Both use a similar base, java.security.MessageDigest. The examples would be: modified algorithm=digest param name=algorithm.algorithm value=MD5 / /modified modified algorithm=digest param name=algorithm.algorithm value=SHA / /modified The new checksum addition is simply following this existing pattern, where checksum is a new type of algorithm. It has two options, that are both of type java.util.zip.Checksum: modified algorithm=checksum param name=algorithm.algorithm value=CRC / /modified modified algorithm=checksum param name=algorithm.algorithm value=ADLER / /modified - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29729] - XSL StyleSheet for build scripts
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29729. 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=29729 XSL StyleSheet for build scripts --- Additional Comments From [EMAIL PROTECTED] 2004-06-22 22:52 --- It's not; it's an enhancement... that's what the severity says. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: macrodef and local
From: Steve Loughran steve_l () iseran ! com Date: 2004-06-17 9:27:18 I am now convinced we need local properties; without it macrodef doesnt work fully. Why do you need them? I typically append an attribute value to a property name to get the unique property that I want. I have had reasonable success with a break task[*] that compensates for lack of if/unless/depends on macros. Cheers, Magesh [*] Syntax: break [if|unless]=property.name/ macrodef name=check-and-do-ejb attribute name=module sequential check-ejb module=@{module}/ break if=@{module}-uptodate/ ejb module=@{module}/ /sequential /macrodef (or) macrodef name=ejb attribute name=module sequential break if=@{module}-uptodate/ ... /sequential /macrodef macrodef name=check-and-do-ejb attribute name=module sequential check-ejb module=@{module}/ ejb module=@{module}/ /sequential /macrodef - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/docs/manual develop.html
bodewig 2004/06/22 23:35:56 Modified:docs/manual develop.html Log: typo Revision ChangesPath 1.17 +1 -1 ant/docs/manual/develop.html Index: develop.html === RCS file: /home/cvs/ant/docs/manual/develop.html,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- develop.html 9 Feb 2004 21:50:05 - 1.16 +++ develop.html 23 Jun 2004 06:35:56 - 1.17 @@ -210,7 +210,7 @@ h3a name=nestedtypeNested Types/a/h3 If your task needs to nest an arbitary type that has been defined - using lt;taskdefgt; you have two options. + using lt;typedefgt; you have two options. ol licodepublic void add(Type type)/code/li licodepublic void addConfigured(Type type)/code/li - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/docs/manual develop.html
bodewig 2004/06/22 23:38:12 Modified:docs/manual Tag: ANT_16_BRANCH develop.html Log: merge Revision ChangesPath No revision No revision 1.13.2.5 +1 -1 ant/docs/manual/develop.html Index: develop.html === RCS file: /home/cvs/ant/docs/manual/develop.html,v retrieving revision 1.13.2.4 retrieving revision 1.13.2.5 diff -u -r1.13.2.4 -r1.13.2.5 --- develop.html 9 Feb 2004 22:12:06 - 1.13.2.4 +++ develop.html 23 Jun 2004 06:38:12 - 1.13.2.5 @@ -211,7 +211,7 @@ h3a name=nestedtypeNested Types/a/h3 If your task needs to nest an arbitary type that has been defined - using lt;taskdefgt; you have two options. + using lt;typedefgt; you have two options. ol licodepublic void add(Type type)/code/li licodepublic void addConfigured(Type type)/code/li - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/xdocs external.xml
bodewig 2004/06/22 23:48:20 Modified:docs external.html xdocsexternal.xml Log: correct compatibility statement of EMMA. Submitted by: [EMAIL PROTECTED] Revision ChangesPath 1.172 +1 -1 ant/docs/external.html Index: external.html === RCS file: /home/cvs/ant/docs/external.html,v retrieving revision 1.171 retrieving revision 1.172 diff -u -r1.171 -r1.172 --- external.html 16 Jun 2004 14:25:33 - 1.171 +++ external.html 23 Jun 2004 06:48:20 - 1.172 @@ -1226,7 +1226,7 @@ /th td colspan=1 rowspan=1 valign=top align=left - Ant 1.6 + Ant 1.4 and later /td /tr tr 1.133 +1 -1 ant/xdocs/external.xml Index: external.xml === RCS file: /home/cvs/ant/xdocs/external.xml,v retrieving revision 1.132 retrieving revision 1.133 diff -u -r1.132 -r1.133 --- external.xml 16 Jun 2004 14:25:36 - 1.132 +++ external.xml 23 Jun 2004 06:48:20 - 1.133 @@ -606,7 +606,7 @@ table class=externals tr thCompatibility:/th -tdAnt 1.6/td +tdAnt 1.4 and later/td /tr tr thURL:/th - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: patch request for external.xml
On Tue, 22 Jun 2004, [EMAIL PROTECTED] wrote: Please correct: done in CVS, automatic update of the site will happen sometime later today. Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/xdocs external.xml
bodewig 2004/06/22 23:49:24 Modified:docs Tag: ANT_16_BRANCH external.html xdocsTag: ANT_16_BRANCH external.xml Log: merge Revision ChangesPath No revision No revision 1.136.2.18 +1 -1 ant/docs/external.html Index: external.html === RCS file: /home/cvs/ant/docs/external.html,v retrieving revision 1.136.2.17 retrieving revision 1.136.2.18 diff -u -r1.136.2.17 -r1.136.2.18 --- external.html 16 Jun 2004 14:27:27 - 1.136.2.17 +++ external.html 23 Jun 2004 06:49:24 - 1.136.2.18 @@ -1223,7 +1223,7 @@ /th td colspan=1 rowspan=1 valign=top align=left - Ant 1.6 + Ant 1.4 and later /td /tr tr No revision No revision 1.100.2.18 +1 -1 ant/xdocs/external.xml Index: external.xml === RCS file: /home/cvs/ant/xdocs/external.xml,v retrieving revision 1.100.2.17 retrieving revision 1.100.2.18 diff -u -r1.100.2.17 -r1.100.2.18 --- external.xml 16 Jun 2004 14:27:28 - 1.100.2.17 +++ external.xml 23 Jun 2004 06:49:24 - 1.100.2.18 @@ -606,7 +606,7 @@ table class=externals tr thCompatibility:/th -tdAnt 1.6/td +tdAnt 1.4 and later/td /tr tr thURL:/th - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: macrodef and local
Magesh Umasankar wrote: From: Steve Loughran steve_l () iseran ! com Date: 2004-06-17 9:27:18 I am now convinced we need local properties; without it macrodef doesnt work fully. Why do you need them? I typically append an attribute value to a property name to get the unique property that I want. I have had reasonable success with a break task[*] that compensates for lack of if/unless/depends on macros. I see three places where it/unless attributes could be added to macrodef. 1) at the macrodef definition. macrodef name=showdir if=on.windows attribute name=dir/ sequential ac:shellscript script=cmd.exe tmpsuffix=.bat ac:value=/c/ ac:value=call/ dir @{dir} /ac:shellscript /sequential /macrodef macrodef name=showdir if=on.linux sequential ac:shellscript script=bash ls -rlta @{dir} /ac:shellscript /sequential /macrodef 2) on the sequential element: macrodef name=ejb attribute name=module sequential unless=@{module}-uptodate ... /sequential /macrodef 3) at the macrodef use: ejb module=x unless=x-uptodate/ Peter Cheers, Magesh [*] Syntax: break [if|unless]=property.name/ How does this work? Peter macrodef name=check-and-do-ejb attribute name=module sequential check-ejb module=@{module}/ break if=@{module}-uptodate/ ejb module=@{module}/ /sequential /macrodef (or) macrodef name=ejb attribute name=module sequential break if=@{module}-uptodate/ ... /sequential /macrodef macrodef name=check-and-do-ejb attribute name=module sequential check-ejb module=@{module}/ ejb module=@{module}/ /sequential /macrodef - 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 29676] - add classpath and classpathref to script task
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29676. 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=29676 add classpath and classpathref to script task --- Additional Comments From [EMAIL PROTECTED] 2004-06-23 10:12 --- i am currently using the following workaround: target name=test depends=init scriptdef name=beanshell-test language=beanshell element name=classpath type=path / classpath-beanshell; print(Hello World!); print(This is my Classpath:); print(getClassPath()); /scriptdef beanshell-test classpath refid=base.path / /beanshell-test /target entity classpath-beanshell defined as: classpath = Arrays.asList(elements.get(classpath).get(0).list()); Iterator i = classpath.iterator(); while (i.hasNext()) { addClassPath(i.next()); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: macrodef and local
-1, I think it is a bad idea From: Peter Reilly [mailto:[EMAIL PROTECTED] ... I see three places where it/unless attributes could be added to macrodef. 1) at the macrodef definition. macrodef name=showdir if=on.windows attribute name=dir/ sequential ac:shellscript script=cmd.exe tmpsuffix=.bat ac:value=/c/ ac:value=call/ dir @{dir} /ac:shellscript /sequential /macrodef macrodef name=showdir if=on.linux sequential ac:shellscript script=bash ls -rlta @{dir} /ac:shellscript /sequential /macrodef If we have such a thing, how do I know whether the macro exists at all or not at my point of use. Whether they do the same or have the same args. If there were some form if-else, one would at least know there is some definintion for it. 2) on the sequential element: macrodef name=ejb attribute name=module sequential unless=@{module}-uptodate ... /sequential /macrodef So what happens if the property does exists, the definition is empty? 3) at the macrodef use: ejb module=x unless=x-uptodate/ This probably is the most traditional usage of if/unless I do not completely like it but at least is in the spirit of other tasks. But do I need support from macrodef, or can I write this myself as part of my macrodef. I.e., shall macrodef/ hyjack if/unless as reserved attribute names (I would prefer not). Another usage of if/unless that may be interesting (not that I am advocating it or anything) is at the point of use of elements: macrodef name=ejb element name=files/ sequential doejb fileset ... files/ /fileset /doejb /sequential /macrodef And at the point of use one can write: ejb files if=on.windows /files files if=on.unix /files /ejb Which will pass the different files/ elements depending of the properties settings. Now, the reason I do not like it is because I think we need to put our effort in some core way to describe inclusion/exclusion of elements at any level of a build (or at least of task) and it should be project-helper the one in charge of doing it. This would also include the ideas about having a real expression language to specify those inclusions and exclusions. I think that would be a much more powerful thing to spend our time on 1.7. Jose Alberto - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Issues with modified / selector.
I´ll have a deeper look into that (but now I have to ensure that my new computer is able to run - the old was damaged :( Jan -Ursprüngliche Nachricht- Von: Robert Rice [mailto:[EMAIL PROTECTED] Gesendet am: Dienstag, 22. Juni 2004 20:23 An: [EMAIL PROTECTED] Betreff: Issues with modified / selector. Recently, I submitted two bugs related to the modified selector. Bug 29742 addresses the issue that the Modified selector doesn't allow algorithm or comparator selection. Only the default choices of digest and equal respectively are allowed. I have created a bug fix for the modified selector that addresses this issue. In the bug fix, the algorithm and comparator initialization logic has been changed to allow choosing away from default. At the same time, I have created another algorithm type, checksum, that makes use of the java.util.zip.Checksum interface. It is chosen by setting the alogrithm attribute to checksum ( modified algorithm=checksum / ). This checksum allows the choice of CRC32 or Alder32, which utilize java.util.zip.CRC32 and java.util.zip.Adler32 respectively. This choice is made by setting the algorithm.algorithm parameter to CRC or ADLER, with the default being CRC ( modified algorithm=checksumparam name=algorithm.algorithm value=ADLER //modified ) How do I submit such changes for evaluation and possible inclusion? Bug 29743 addresses a bigger issue in that the modified selector has poor cachefile save performance. The architecture of the selector framework dictates that the selector is notified of files, one at a time, through the isSelected method. It is at this method call, that the cache properties file is saved. This properties file is saved every time a file modification is found, possibly as many times as there are files in the fileset. This leads to poor performance when process large filesets with multiple changes, in my case around 15000. I would like to delay the saving of the file until we are finished with the fileset or finished with the selector. It looks to me, like this requires the addition of one of more methods to the selector framework, likely to BaseSelector. In the case of the modified selector, we may be able to get away with knowing we are finished with the selector through some method call like tearDown. At this point, the modified selector could save its properites file. Another option is to add filesetListener type of behavior to the BaseSelector. This would notify a selector when a fileset selection has started and ended. With this option, the modified selector could save its properties file at the end of fileset selection. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
buildStarted/Finished and subbuilds
Hi all, while investigating bug 8689 I realized that the Ant project instances we create in Ant never fire the build started or finished events. I'm not entirely sure that this is a good thing (but it probably is), but we probably can't change it for backwards compatibility reasons anyway. This has a couple of consequences, one of them causes the excess memory needed in AntClassLoader. If a task in the subbuild creates an AntClassLoader instance it never gets cleaned up since the subproject never calls build finished. Another one is that any record task used in the subbuild could leave open files hanging around until Ant exits. For what I propose below, I'll also have to add a close method to RecorderEntry. Since I don't think we can fix the build* events for subbuilds, I plan to do some things in ant after the subbuild has finished: * remove all build listeners of the main project from the subbuild. * iterate over the remaining build listeners of the subbuild and a) invoke cleanup() if it is an AntClassLoader b) invoke close() if it is a RecorderEntry this is ugly, but any clean solution I could come up with is not backwards compatible (add a dispose method to BuildListener, make subbuilds fire buildFinished ...). Any better ideas? Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/net TelnetTask.java
bodewig 2004/06/23 05:19:23 Modified:src/main/org/apache/tools/ant/taskdefs/optional/net TelnetTask.java Log: Small refactoring to prepare for bug 25935 Revision ChangesPath 1.26 +4 -9 ant/src/main/org/apache/tools/ant/taskdefs/optional/net/TelnetTask.java Index: TelnetTask.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/net/TelnetTask.java,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- TelnetTask.java 9 Mar 2004 16:48:32 - 1.25 +++ TelnetTask.java 23 Jun 2004 12:19:23 - 1.26 @@ -56,11 +56,6 @@ private int port = 23; /** - * The Object which handles the telnet session. - */ -private AntTelnetClient telnet = null; - -/** * The list of read/write commands for this session */ private Vector telnetTasks = new Vector(); @@ -97,7 +92,7 @@ } /** Create the telnet client object */ - telnet = new AntTelnetClient(); + AntTelnetClient telnet = new AntTelnetClient(); try { telnet.connect(server, port); } catch (IOException e) { @@ -105,7 +100,7 @@ } /** Login if userid and password were specified */ if (userid != null password != null) { - login(); + login(telnet); } /** Process each sub command */ Enumeration tasksToRun = telnetTasks.elements(); @@ -122,7 +117,7 @@ * Process a 'typical' login. If it differs, use the read * and write tasks explicitely */ -private void login() { +private void login(AntTelnetClient telnet) { if (addCarriageReturn) { telnet.sendString(\n, true); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/net TelnetTask.java
bodewig 2004/06/23 05:23:22 Modified:src/main/org/apache/tools/ant/taskdefs/optional/net TelnetTask.java Log: properly disconnect from telnet server. PR: 25935 Submitted by: carcher at yahoo dot com Revision ChangesPath 1.27 +13 -1 ant/src/main/org/apache/tools/ant/taskdefs/optional/net/TelnetTask.java Index: TelnetTask.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/net/TelnetTask.java,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- TelnetTask.java 23 Jun 2004 12:19:23 - 1.26 +++ TelnetTask.java 23 Jun 2004 12:23:22 - 1.27 @@ -92,7 +92,9 @@ } /** Create the telnet client object */ - AntTelnetClient telnet = new AntTelnetClient(); + AntTelnetClient telnet = null; + try { + telnet = new AntTelnetClient(); try { telnet.connect(server, port); } catch (IOException e) { @@ -110,6 +112,16 @@ ((TelnetRead) task).setDefaultTimeout(defaultTimeout); } task.execute(telnet); + } + } finally { + if (telnet != null) { + try { + telnet.disconnect(); + } catch (IOException e) { + throw new BuildException(Error disconnecting from ++ server); + } + } } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/net TelnetTask.java
bodewig 2004/06/23 05:25:05 Modified:.WHATSNEW src/main/org/apache/tools/ant/taskdefs/optional/net TelnetTask.java Log: Indentation of telnet tasks, record bug fix Revision ChangesPath 1.628 +2 -0 ant/WHATSNEW Index: WHATSNEW === RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.627 retrieving revision 1.628 diff -u -r1.627 -r1.628 --- WHATSNEW 22 Jun 2004 19:38:02 - 1.627 +++ WHATSNEW 23 Jun 2004 12:25:04 - 1.628 @@ -151,6 +151,8 @@ * scp now has (local|remote)tofile attributes to rename files on the fly. Bugzilla Report 26758. +* telnet didn't close the session. Bugzilla Report 25935. + Other changes: -- * doc fix concerning the dependencies of the ftp task 1.28 +18 -18 ant/src/main/org/apache/tools/ant/taskdefs/optional/net/TelnetTask.java Index: TelnetTask.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/net/TelnetTask.java,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- TelnetTask.java 23 Jun 2004 12:23:22 - 1.27 +++ TelnetTask.java 23 Jun 2004 12:25:05 - 1.28 @@ -95,24 +95,24 @@ AntTelnetClient telnet = null; try { telnet = new AntTelnetClient(); - try { - telnet.connect(server, port); - } catch (IOException e) { - throw new BuildException(Can't connect to + server); - } - /** Login if userid and password were specified */ - if (userid != null password != null) { - login(telnet); - } - /** Process each sub command */ - Enumeration tasksToRun = telnetTasks.elements(); - while (tasksToRun != null tasksToRun.hasMoreElements()) { - TelnetSubTask task = (TelnetSubTask) tasksToRun.nextElement(); - if (task instanceof TelnetRead defaultTimeout != null) { - ((TelnetRead) task).setDefaultTimeout(defaultTimeout); + try { + telnet.connect(server, port); + } catch (IOException e) { + throw new BuildException(Can't connect to + server); + } + /** Login if userid and password were specified */ + if (userid != null password != null) { + login(telnet); + } + /** Process each sub command */ + Enumeration tasksToRun = telnetTasks.elements(); + while (tasksToRun != null tasksToRun.hasMoreElements()) { + TelnetSubTask task = (TelnetSubTask) tasksToRun.nextElement(); + if (task instanceof TelnetRead defaultTimeout != null) { + ((TelnetRead) task).setDefaultTimeout(defaultTimeout); + } + task.execute(telnet); } - task.execute(telnet); - } } finally { if (telnet != null) { try { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/net TelnetTask.java
bodewig 2004/06/23 05:26:35 Modified:.Tag: ANT_16_BRANCH TODO WHATSNEW src/main/org/apache/tools/ant/taskdefs/optional/net Tag: ANT_16_BRANCH TelnetTask.java Log: merge Revision ChangesPath No revision No revision 1.3.2.20 +0 -3 ant/Attic/TODO Index: TODO === RCS file: /home/cvs/ant/Attic/TODO,v retrieving revision 1.3.2.19 retrieving revision 1.3.2.20 diff -u -r1.3.2.19 -r1.3.2.20 --- TODO 22 Jun 2004 21:30:55 - 1.3.2.19 +++ TODO 23 Jun 2004 12:26:34 - 1.3.2.20 @@ -18,9 +18,6 @@ * junitreport and JDK 1.5 [Stefan hopes that Stephane solves it for him, otherwise he'll do it himself] -* telnet doesn't disconnect properly (PR 25935) [Stefan unless Peter - is faster]. - * AntClassLoader parent loader [Start thread, Peter] * delete - do not follow symlinks [Peter, may be dropped for 1.6.2] 1.503.2.111 +2 -0 ant/WHATSNEW Index: WHATSNEW === RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.503.2.110 retrieving revision 1.503.2.111 diff -u -r1.503.2.110 -r1.503.2.111 --- WHATSNEW 22 Jun 2004 21:30:55 - 1.503.2.110 +++ WHATSNEW 23 Jun 2004 12:26:34 - 1.503.2.111 @@ -116,6 +116,8 @@ * scp now has (local|remote)tofile attributes to rename files on the fly. Bugzilla Report 26758. +* telnet didn't close the session. Bugzilla Report 25935. + Other changes: -- * doc fix concerning the dependencies of the ftp task No revision No revision 1.20.2.6 +30 -23 ant/src/main/org/apache/tools/ant/taskdefs/optional/net/TelnetTask.java Index: TelnetTask.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/net/TelnetTask.java,v retrieving revision 1.20.2.5 retrieving revision 1.20.2.6 diff -u -r1.20.2.5 -r1.20.2.6 --- TelnetTask.java 9 Mar 2004 17:01:51 - 1.20.2.5 +++ TelnetTask.java 23 Jun 2004 12:26:35 - 1.20.2.6 @@ -56,11 +56,6 @@ private int port = 23; /** - * The Object which handles the telnet session. - */ -private AntTelnetClient telnet = null; - -/** * The list of read/write commands for this session */ private Vector telnetTasks = new Vector(); @@ -97,24 +92,36 @@ } /** Create the telnet client object */ - telnet = new AntTelnetClient(); + AntTelnetClient telnet = null; try { - telnet.connect(server, port); - } catch (IOException e) { - throw new BuildException(Can't connect to + server); - } - /** Login if userid and password were specified */ - if (userid != null password != null) { - login(); - } - /** Process each sub command */ - Enumeration tasksToRun = telnetTasks.elements(); - while (tasksToRun != null tasksToRun.hasMoreElements()) { - TelnetSubTask task = (TelnetSubTask) tasksToRun.nextElement(); - if (task instanceof TelnetRead defaultTimeout != null) { - ((TelnetRead) task).setDefaultTimeout(defaultTimeout); + telnet = new AntTelnetClient(); + try { + telnet.connect(server, port); + } catch (IOException e) { + throw new BuildException(Can't connect to + server); + } + /** Login if userid and password were specified */ + if (userid != null password != null) { + login(telnet); + } + /** Process each sub command */ + Enumeration tasksToRun = telnetTasks.elements(); + while (tasksToRun != null tasksToRun.hasMoreElements()) { + TelnetSubTask task = (TelnetSubTask) tasksToRun.nextElement(); + if (task instanceof TelnetRead defaultTimeout != null) { + ((TelnetRead) task).setDefaultTimeout(defaultTimeout); + } + task.execute(telnet); + } + } finally { + if (telnet != null) { + try { + telnet.disconnect(); + } catch (IOException e) { + throw new BuildException(Error disconnecting from ++ server); + } } - task.execute(telnet); } } @@ -122,7 +129,7 @@ * Process a 'typical' login. If it differs, use the read * and write tasks explicitely */ -private
DO NOT REPLY [Bug 25935] - telnet task does not explicitly disconnect telnet sessions
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=25935. 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=25935 telnet task does not explicitly disconnect telnet sessions [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED Target Milestone|--- |1.6.2 Version|1.7Alpha (nightly) |1.6.1 --- Additional Comments From [EMAIL PROTECTED] 2004-06-23 12:27 --- Patch applied, will go into Ant 1.6.2. I need your real name if you want to get listed as a CONTRIBUTOR. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/net RExecTask.java
bodewig 2004/06/23 05:30:40 Modified:.WHATSNEW src/main/org/apache/tools/ant/taskdefs/optional/net RExecTask.java Log: PR 25935 applies to rexec as well Revision ChangesPath 1.629 +1 -1 ant/WHATSNEW Index: WHATSNEW === RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.628 retrieving revision 1.629 diff -u -r1.628 -r1.629 --- WHATSNEW 23 Jun 2004 12:25:04 - 1.628 +++ WHATSNEW 23 Jun 2004 12:30:40 - 1.629 @@ -151,7 +151,7 @@ * scp now has (local|remote)tofile attributes to rename files on the fly. Bugzilla Report 26758. -* telnet didn't close the session. Bugzilla Report 25935. +* telnet and rexec didn't close the session. Bugzilla Report 25935. Other changes: -- 1.8 +32 -25 ant/src/main/org/apache/tools/ant/taskdefs/optional/net/RExecTask.java Index: RExecTask.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/net/RExecTask.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- RExecTask.java9 Feb 2004 21:05:33 - 1.7 +++ RExecTask.java23 Jun 2004 12:30:40 - 1.8 @@ -62,11 +62,6 @@ private int port = RExecClient.DEFAULT_PORT; /** - * The Object which handles the rexec session. - */ -private AntRExecClient rexec = null; - -/** * The list of read/write commands for this session */ private Vector rexecTasks = new Vector(); @@ -322,34 +317,46 @@ } /** Create the telnet client object */ -rexec = new AntRExecClient(); +AntRExecClient rexec = null; try { -rexec.connect(server, port); -} catch (IOException e) { -throw new BuildException(Can't connect to + server); -} -/** Login if userid and password were specified */ -if (userid != null password != null) { -login(); -} -/** Process each sub command */ -Enumeration tasksToRun = rexecTasks.elements(); -while (tasksToRun != null tasksToRun.hasMoreElements()) { -RExecSubTask task = (RExecSubTask) tasksToRun.nextElement(); -if (task instanceof RExecRead defaultTimeout != null) { -((RExecRead) task).setDefaultTimeout(defaultTimeout); +rexec = new AntRExecClient(); +try { +rexec.connect(server, port); +} catch (IOException e) { +throw new BuildException(Can't connect to + server); +} +/** Login if userid and password were specified */ +if (userid != null password != null) { +login(rexec); +} +/** Process each sub command */ +Enumeration tasksToRun = rexecTasks.elements(); +while (tasksToRun != null tasksToRun.hasMoreElements()) { +RExecSubTask task = (RExecSubTask) tasksToRun.nextElement(); +if (task instanceof RExecRead defaultTimeout != null) { +((RExecRead) task).setDefaultTimeout(defaultTimeout); +} +task.execute(rexec); } -task.execute(rexec); -} -/** Keep reading input stream until end of it or time-out */ -rexec.waitForEOF(defaultTimeout); +/** Keep reading input stream until end of it or time-out */ +rexec.waitForEOF(defaultTimeout); + } finally { + if (rexec != null) { + try { + rexec.disconnect(); + } catch (IOException e) { + throw new BuildException(Error disconnecting from ++ server); + } + } + } } /** * Process a 'typical' login. If it differs, use the read * and write tasks explicitely */ -private void login() { +private void login(AntRExecClient rexec) { if (addCarriageReturn) { rexec.sendString(\n, true); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/net RExecTask.java
bodewig 2004/06/23 05:32:04 Modified:.Tag: ANT_16_BRANCH WHATSNEW src/main/org/apache/tools/ant/taskdefs/optional/net Tag: ANT_16_BRANCH RExecTask.java Log: merge Revision ChangesPath No revision No revision 1.503.2.112 +1 -1 ant/WHATSNEW Index: WHATSNEW === RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.503.2.111 retrieving revision 1.503.2.112 diff -u -r1.503.2.111 -r1.503.2.112 --- WHATSNEW 23 Jun 2004 12:26:34 - 1.503.2.111 +++ WHATSNEW 23 Jun 2004 12:32:03 - 1.503.2.112 @@ -116,7 +116,7 @@ * scp now has (local|remote)tofile attributes to rename files on the fly. Bugzilla Report 26758. -* telnet didn't close the session. Bugzilla Report 25935. +* telnet and rexec didn't close the session. Bugzilla Report 25935. Other changes: -- No revision No revision 1.4.2.4 +32 -25 ant/src/main/org/apache/tools/ant/taskdefs/optional/net/RExecTask.java Index: RExecTask.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/net/RExecTask.java,v retrieving revision 1.4.2.3 retrieving revision 1.4.2.4 diff -u -r1.4.2.3 -r1.4.2.4 --- RExecTask.java9 Feb 2004 22:12:35 - 1.4.2.3 +++ RExecTask.java23 Jun 2004 12:32:03 - 1.4.2.4 @@ -62,11 +62,6 @@ private int port = RExecClient.DEFAULT_PORT; /** - * The Object which handles the rexec session. - */ -private AntRExecClient rexec = null; - -/** * The list of read/write commands for this session */ private Vector rexecTasks = new Vector(); @@ -322,34 +317,46 @@ } /** Create the telnet client object */ -rexec = new AntRExecClient(); +AntRExecClient rexec = null; try { -rexec.connect(server, port); -} catch (IOException e) { -throw new BuildException(Can't connect to + server); -} -/** Login if userid and password were specified */ -if (userid != null password != null) { -login(); -} -/** Process each sub command */ -Enumeration tasksToRun = rexecTasks.elements(); -while (tasksToRun != null tasksToRun.hasMoreElements()) { -RExecSubTask task = (RExecSubTask) tasksToRun.nextElement(); -if (task instanceof RExecRead defaultTimeout != null) { -((RExecRead) task).setDefaultTimeout(defaultTimeout); +rexec = new AntRExecClient(); +try { +rexec.connect(server, port); +} catch (IOException e) { +throw new BuildException(Can't connect to + server); +} +/** Login if userid and password were specified */ +if (userid != null password != null) { +login(rexec); +} +/** Process each sub command */ +Enumeration tasksToRun = rexecTasks.elements(); +while (tasksToRun != null tasksToRun.hasMoreElements()) { +RExecSubTask task = (RExecSubTask) tasksToRun.nextElement(); +if (task instanceof RExecRead defaultTimeout != null) { +((RExecRead) task).setDefaultTimeout(defaultTimeout); +} +task.execute(rexec); } -task.execute(rexec); -} -/** Keep reading input stream until end of it or time-out */ -rexec.waitForEOF(defaultTimeout); +/** Keep reading input stream until end of it or time-out */ +rexec.waitForEOF(defaultTimeout); + } finally { + if (rexec != null) { + try { + rexec.disconnect(); + } catch (IOException e) { + throw new BuildException(Error disconnecting from ++ server); + } + } + } } /** * Process a 'typical' login. If it differs, use the read * and write tasks explicitely */ -private void login() { +private void login(AntRExecClient rexec) { if (addCarriageReturn) { rexec.sendString(\n, true); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: buildStarted/Finished and subbuilds
The clean up you propose sounds very good. As regards whether the ant family tasks should fire build started and finished events. One may see these for subant, and ant but not for antcall (or at least the way it is used by some scripts as a sub-routine call). In any case, as you say, it cannot be changed for backwards compatibility reasons. Peter Stefan Bodewig wrote: Hi all, while investigating bug 8689 I realized that the Ant project instances we create in Ant never fire the build started or finished events. I'm not entirely sure that this is a good thing (but it probably is), but we probably can't change it for backwards compatibility reasons anyway. This has a couple of consequences, one of them causes the excess memory needed in AntClassLoader. If a task in the subbuild creates an AntClassLoader instance it never gets cleaned up since the subproject never calls build finished. Another one is that any record task used in the subbuild could leave open files hanging around until Ant exits. For what I propose below, I'll also have to add a close method to RecorderEntry. Since I don't think we can fix the build* events for subbuilds, I plan to do some things in ant after the subbuild has finished: * remove all build listeners of the main project from the subbuild. * iterate over the remaining build listeners of the subbuild and a) invoke cleanup() if it is an AntClassLoader b) invoke close() if it is a RecorderEntry this is ugly, but any clean solution I could come up with is not backwards compatible (add a dispose method to BuildListener, make subbuilds fire buildFinished ...). Any better ideas? Stefan - 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: buildStarted/Finished and subbuilds
Stefan Bodewig wrote: this is ugly, but any clean solution I could come up with is not backwards compatible (add a dispose method to BuildListener, make subbuilds fire buildFinished ...). Any better ideas? Sounds OK. The only alternative I could think of (without checking whether it is feasible) would be to create BuildListener2 and add something like ProjectStarted/ProjectFinished to it. These would be called in Project.executeTargets for any BuildListeners which also implement BuildListener2. Would that be better than checking for AntClassLoaders explicitly? Conor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/types Path.java
bodewig 2004/06/23 06:32:57 Modified:.CONTRIBUTORS src/main/org/apache/tools/ant/types Path.java Log: Add libgcj support to Path.addJavaRuntime PR: 29020 Submitted by: Anthony Green green at redhat dot com Revision ChangesPath 1.25 +1 -0 ant/CONTRIBUTORS Index: CONTRIBUTORS === RCS file: /home/cvs/ant/CONTRIBUTORS,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- CONTRIBUTORS 22 Jun 2004 14:39:36 - 1.24 +++ CONTRIBUTORS 23 Jun 2004 13:32:57 - 1.25 @@ -5,6 +5,7 @@ Andrew Everitt Anil K. Vijendran Anli Shundi +Anthony Green Antoine Levy-Lambert Anton Mazkovoi Arnaud Vandyck 1.63 +3 -1 ant/src/main/org/apache/tools/ant/types/Path.java Index: Path.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/Path.java,v retrieving revision 1.62 retrieving revision 1.63 diff -u -r1.62 -r1.63 --- Path.java 9 Mar 2004 16:48:41 - 1.62 +++ Path.java 23 Jun 2004 13:32:57 - 1.63 @@ -68,7 +68,7 @@ /** * The system bootclassspath as a Path object. * - * @since Ant 1.7 + * @since Ant 1.6.2 */ public static Path systemBootClasspath = new Path(null, System.getProperty(sun.boot.class.path)); @@ -585,6 +585,8 @@ kaffeJarFiles.setIncludes(*.jar); addFileset(kaffeJarFiles); } +} else if (GNU libgcj.equals(System.getProperty(java.vm.name))) { +addExisting(systemBootClasspath); } if (System.getProperty(java.vendor).toLowerCase(Locale.US).indexOf(microsoft) = 0) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/types Path.java
bodewig 2004/06/23 06:33:19 Modified:.Tag: ANT_16_BRANCH CONTRIBUTORS TODO src/main/org/apache/tools/ant/types Tag: ANT_16_BRANCH Path.java Log: merge Revision ChangesPath No revision No revision 1.1.2.19 +1 -0 ant/CONTRIBUTORS Index: CONTRIBUTORS === RCS file: /home/cvs/ant/CONTRIBUTORS,v retrieving revision 1.1.2.18 retrieving revision 1.1.2.19 diff -u -r1.1.2.18 -r1.1.2.19 --- CONTRIBUTORS 22 Jun 2004 21:51:12 - 1.1.2.18 +++ CONTRIBUTORS 23 Jun 2004 13:33:18 - 1.1.2.19 @@ -5,6 +5,7 @@ Andrew Everitt Anil K. Vijendran Anli Shundi +Anthony Green Antoine Levy-Lambert Anton Mazkovoi Arnaud Vandyck 1.3.2.21 +0 -2 ant/Attic/TODO Index: TODO === RCS file: /home/cvs/ant/Attic/TODO,v retrieving revision 1.3.2.20 retrieving revision 1.3.2.21 diff -u -r1.3.2.20 -r1.3.2.21 --- TODO 23 Jun 2004 12:26:34 - 1.3.2.20 +++ TODO 23 Jun 2004 13:33:18 - 1.3.2.21 @@ -11,8 +11,6 @@ * Fix or at least document support for tomcat 5.0 jsp -* gcj support in Path.addJavaRuntime [Stefan] - * review claimed AntClassLoader memory leak [Stefan] * junitreport and JDK 1.5 [Stefan hopes that Stephane solves it for No revision No revision 1.57.2.5 +12 -1 ant/src/main/org/apache/tools/ant/types/Path.java Index: Path.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/Path.java,v retrieving revision 1.57.2.4 retrieving revision 1.57.2.5 diff -u -r1.57.2.4 -r1.57.2.5 --- Path.java 9 Mar 2004 17:01:55 - 1.57.2.4 +++ Path.java 23 Jun 2004 13:33:18 - 1.57.2.5 @@ -66,6 +66,15 @@ /** + * The system bootclassspath as a Path object. + * + * @since Ant 1.6.2 + */ +public static Path systemBootClasspath = +new Path(null, System.getProperty(sun.boot.class.path)); + + +/** * Helper class, holds the nested codelt;pathelementgt;/code values. */ public class PathElement { @@ -365,7 +374,7 @@ public static String[] translatePath(Project project, String source) { final Vector result = new Vector(); if (source == null) { - return new String[0]; +return new String[0]; } PathTokenizer tok = new PathTokenizer(source); @@ -576,6 +585,8 @@ kaffeJarFiles.setIncludes(*.jar); addFileset(kaffeJarFiles); } +} else if (GNU libgcj.equals(System.getProperty(java.vm.name))) { +addExisting(systemBootClasspath); } if (System.getProperty(java.vendor).toLowerCase(Locale.US).indexOf(microsoft) = 0) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 8689] - AntClassLoader still leaks memory.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=8689. 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=8689 AntClassLoader still leaks memory. [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |ASSIGNED Target Milestone|--- |1.6.2 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 27541] - JunitReport task fails under JDK 1.5
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=27541. 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=27541 JunitReport task fails under JDK 1.5 [EMAIL PROTECTED] changed: What|Removed |Added CC||[EMAIL PROTECTED] AssignedTo|[EMAIL PROTECTED] |[EMAIL PROTECTED] Target Milestone|--- |1.6.2 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: buildStarted/Finished and subbuilds
On Wed, 23 Jun 2004, Conor MacNeill [EMAIL PROTECTED] wrote: The only alternative I could think of (without checking whether it is feasible) would be to create BuildListener2 and add something like ProjectStarted/ProjectFinished to it. These would be called in Project.executeTargets for any BuildListeners which also implement BuildListener2. Unfortunately this wouldn't help. * RecorderEntry wants to write something to the file in buildFinished, if we close the file in projectFinished, this would try to write to a closed file in the main build. * Similar, AntClassLoaders used in the master build would be cleaned as soon as the subbuild finishes since it is registered as a build listener for the subbuild as well. This would be way too early. Would that be better than checking for AntClassLoaders explicitly? Anything that works would be better 8-) Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs Ant.java RecorderEntry.java
bodewig 2004/06/23 07:08:26 Modified:src/main/org/apache/tools/ant/taskdefs Ant.java RecorderEntry.java Log: Preliminary fix for 8689 Revision ChangesPath 1.101 +26 -4 ant/src/main/org/apache/tools/ant/taskdefs/Ant.java Index: Ant.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Ant.java,v retrieving revision 1.100 retrieving revision 1.101 diff -u -r1.100 -r1.101 --- Ant.java 8 Apr 2004 14:58:19 - 1.100 +++ Ant.java 23 Jun 2004 14:08:26 - 1.101 @@ -24,9 +24,11 @@ import java.lang.reflect.Method; import java.util.Enumeration; import java.util.Hashtable; +import java.util.Iterator; import java.util.Vector; import java.util.Set; import java.util.HashSet; +import org.apache.tools.ant.AntClassLoader; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.BuildListener; import org.apache.tools.ant.DefaultLogger; @@ -147,10 +149,9 @@ private void initializeProject() { newProject.setInputHandler(getProject().getInputHandler()); -Vector listeners = getProject().getBuildListeners(); -final int count = listeners.size(); -for (int i = 0; i count; i++) { -newProject.addBuildListener((BuildListener) listeners.elementAt(i)); +Iterator iter = getBuildListeners(); +while (iter.hasNext()) { +newProject.addBuildListener((BuildListener) iter.next()); } if (output != null) { @@ -390,6 +391,20 @@ } } finally { // help the gc +Iterator iter = getBuildListeners(); +while (iter.hasNext()) { +newProject.removeBuildListener((BuildListener) iter.next()); +} +iter = newProject.getBuildListeners().iterator(); +while (iter.hasNext()) { +Object o = iter.next(); +if (o instanceof RecorderEntry) { +((RecorderEntry) o).close(); +} else if (o instanceof AntClassLoader) { +((AntClassLoader) o).cleanup(); +} +} + newProject = null; Enumeration e = properties.elements(); while (e.hasMoreElements()) { @@ -644,6 +659,13 @@ */ public void addPropertyset(PropertySet ps) { propertySets.addElement(ps); +} + +/** + * @since Ant 1.6.2 + */ +private Iterator getBuildListeners() { +return getProject().getBuildListeners().iterator(); } /** 1.17 +9 -2 ant/src/main/org/apache/tools/ant/taskdefs/RecorderEntry.java Index: RecorderEntry.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/RecorderEntry.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- RecorderEntry.java9 Mar 2004 16:48:06 - 1.16 +++ RecorderEntry.java23 Jun 2004 14:08:26 - 1.17 @@ -99,8 +99,7 @@ + StringUtils.LINE_SEP); error.printStackTrace(out); } -out.flush(); -out.close(); +close(); } @@ -207,6 +206,14 @@ + (seconds % 60 == 1 ? : s); } +} + +/** + * @since 1.6.2 + */ +public void close() { +out.flush(); +out.close(); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 8689] - AntClassLoader still leaks memory.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=8689. 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=8689 AntClassLoader still leaks memory. --- Additional Comments From [EMAIL PROTECTED] 2004-06-23 14:11 --- Mike, I've committed a version to CVS that should clean up the AntClassLoaders created during the subbuilds. Could you please try to check out CVS HEAD and give it a try? Next item on my list is searching for AntClassLoader instances that are not associated to a project at all (if there are any). They'd require explicit cleanup as well. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29729] - XSL StyleSheet for build scripts
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29729. 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=29729 XSL StyleSheet for build scripts --- Additional Comments From [EMAIL PROTECTED] 2004-06-23 14:24 --- I saw that... but is it really an _enhancement_ or more of a _companion_ for Ant? I don't know that there currently exists a place in an Ant distribution to put it... theoretically you could post it somewhere and it would be an external tool... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
record and subbuilds
While lookin into the AntClassLoader thing I realized that record keeps a static map keyed on the name attribute of the task. This means that two different subbuilds that use the same name attribute in a record task will end up writing to the same file (and probably cause a lot of other problems as well). The name in the key is the relative file name, not the absolute path of the logfile. Should we change it to use the current project as an additional key element in the map? Or is this a feature? Maybe it would be enough to use the absolute path of the logfile as key so that if you write top the same file, you really meant to use the same file? Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AntClassLoader cleanup
AFAICS all AntClassLoader instances created by Ant are associated with a project instance and will eventually get cleaned up when the current project finishes. In some cases we really need to keep the class loaders around - the loaders that have loaded tasks for example. In other cases the loaders are transient and we could invoke cleanup immediately like in ANTLR.java: protected boolean is272() { try { AntClassLoader l = new AntClassLoader(getProject(), commandline.getClasspath()); l.loadClass(antlr.Version); return true; } catch (ClassNotFoundException e) { return false; } // end of try-catch } I'd like to review the cases with transient classloaders. Should I do this for 1.6.2 or should I work on CVS HEAD only? I may produce false positives and break something if I cleanup classloader too early - Gump won't catch this since everything in Gump uses the one classloader to rule them all. Therefore I tend to say CVS HEAD, and maybe merge some obvious cases like the one above into the 1.6 branch. Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: buildStarted/Finished and subbuilds
Stefan Bodewig wrote: On Wed, 23 Jun 2004, Conor MacNeill [EMAIL PROTECTED] wrote: Unfortunately this wouldn't help. * RecorderEntry wants to write something to the file in buildFinished, if we close the file in projectFinished, this would try to write to a closed file in the main build. * Similar, AntClassLoaders used in the master build would be cleaned as soon as the subbuild finishes since it is registered as a build listener for the subbuild as well. This would be way too early. Well, you could still take the approach of removing the main build listeners and then fire a SubBuildFinished on all the remaining listeners that are BuildListener2. Pretty similar to your original without hardcoding a specific class in there, which may let other build listeners do useful stuff at the end of a subbuild. I wonder if we should have separate lists for objects just to listen to their project and not events from subbuilds. Really we have overloaded the event interface to provide a cleanup mechanism. Probably too much work to separate them. Just to note that cleanup should be safe to call on the AntClassLoaders at any time if not necessarily optimal for performance. If that is not true, I'm not sure you can be safe cleaning them up at sub-build finished time :-) Conor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: buildStarted/Finished and subbuilds
From: Stefan Bodewig [mailto:[EMAIL PROTECTED] Hi all, while investigating bug 8689 I realized that the Ant project instances we create in Ant never fire the build started or finished events. I'm not entirely sure that this is a good thing (but it probably is), but we probably can't change it for backwards compatibility reasons anyway. This has a couple of consequences, one of them causes the excess memory needed in AntClassLoader. If a task in the subbuild creates an AntClassLoader instance it never gets cleaned up since the subproject never calls build finished. Another one is that any record task used in the subbuild could leave open files hanging around until Ant exits. For what I propose below, I'll also have to add a close method to RecorderEntry. Since I don't think we can fix the build* events for subbuilds, I plan to do some things in ant after the subbuild has finished: * remove all build listeners of the main project from the subbuild. * iterate over the remaining build listeners of the subbuild and a) invoke cleanup() if it is an AntClassLoader b) invoke close() if it is a RecorderEntry this is ugly, but any clean solution I could come up with is not backwards compatible (add a dispose method to BuildListener, make subbuilds fire buildFinished ...). Any better ideas? How about defining a new interface SubBuildListener when ant iterates over the listeners if it finds one implementing this interface it will call its finish() event or (some new method). Here AntClassLoader and RecorderEntry will implement this new interface. This looks like a more generic solution that other things can use if so they desire. Jose Alberto - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: macrodef and local
--- Magesh Umasankar [EMAIL PROTECTED] wrote: From: Steve Loughran steve_l () iseran ! com Date: 2004-06-17 9:27:18 I am now convinced we need local properties; without it macrodef doesnt work fully. Why do you need them? I typically append an attribute value to a property name to get the unique property that I want. I cringe at the thought of the number of unique properties that could be floating about resulting from this... -Matt __ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: macrodef and local
From: Matt Benson [mailto:[EMAIL PROTECTED] --- Magesh Umasankar [EMAIL PROTECTED] wrote: From: Steve Loughran steve_l () iseran ! com Date: 2004-06-17 9:27:18 I am now convinced we need local properties; without it macrodef doesnt work fully. Why do you need them? I typically append an attribute value to a property name to get the unique property that I want. I cringe at the thought of the number of unique properties that could be floating about resulting from this... But do you really care? It is a computer for heaven sake :-) As long as it does not interfere with yours why would it be an issue? On the other hand, if people are writing complicated recursive macrodefs, well it is not like an everyday thing or is it. Jose Alberto - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: buildStarted/Finished and subbuilds
On Thu, 24 Jun 2004, Conor MacNeill [EMAIL PROTECTED] wrote: Well, you could still take the approach of removing the main build listeners and then fire a SubBuildFinished on all the remaining listeners that are BuildListener2. Yes, much like what Jose Alberto describes later. This would mean triggering the events from within ant and not from Project#executeTarget. subProjectStarted may be interesting for some kinds of build listeners as well. subBuild or subProject? subBuild is closer to buildStarted/Finished. Another thing that just occured to me is that AntClassLoader should check the BuildEvent to see whether the firing project is the same it has been registered with and only cleanup itself if it is. This way we don't have to worry about removing the master build build listeners before subProjectFinished is fired. I wonder if we should have separate lists for objects just to listen to their project and not events from subbuilds. Listeners can look into the BuildEvent if this matters, we've jsut never told anybody that it could matter. Not sure when we started to send BuildListeners down to the subbuilds, but it hasn't been always that way - so things like record simply don't take it into account. Really we have overloaded the event interface to provide a cleanup mechanism. True. Just to note that cleanup should be safe to call on the AntClassLoaders at any time if not necessarily optimal for performance. cleanup nulls out the project reference which disturbs logging, Gump specific handling of the context classloader and addPathElement which is used by classloader. If that is not true, I'm not sure you can be safe cleaning them up at sub-build finished time :-) That would only be classloaders created in the subbuild. No object created in the subbuild should be able to reach the main build, so we are pretty save - except for spawned threads. Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: macrodef and local
--- Jose Alberto Fernandez [EMAIL PROTECTED] wrote: From: Matt Benson [mailto:[EMAIL PROTECTED] --- Magesh Umasankar [EMAIL PROTECTED] wrote: [SNIP] Why do you need them? I typically append an attribute value to a property name to get the unique property that I want. I cringe at the thought of the number of unique properties that could be floating about resulting from this... But do you really care? It is a computer for heaven sake :-) Hmm... I have a suspicion that the goals of computer science and heaven rarely overlap, but that's another discussion. As long as it does not interfere with yours why would it be an issue? With my what? Computer? Other people can do what they like (mostly because I can't stop them), but I prefer a cleaner solution for myself. But I will admit to having what is probably an irrational aversion to existing references to things I no longer care about. I use fewer intermediate variables than probably anyone... :) -Matt __ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: macrodef and local
I cringe at the thought of the number of unique properties that could be floating about resulting from this... I think macrodef would make the buildscript to a kind of macro language. People (like me :) prefer to hack a macrodef prior to invest more time to implement a real task. And then you´ll need real variables. Jan
Re: AW: macrodef and local
--- [EMAIL PROTECTED] wrote: I cringe at the thought of the number of unique properties that could be floating about resulting from this... I think macrodef would make the buildscript to a kind of macro language. People (like me :) prefer to hack a macrodef prior to invest more time to implement a real task. And then you´ll need real variables. So are you saying you think macrodefs should only be used as real tasks on a temporary basis? -Matt __ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: AW: macrodef and local
I think macrodef would make the buildscript to a kind of macro language. People (like me :) prefer to hack a macrodef prior to invest more time to implement a real task. And then you´ll need real variables. So are you saying you think macrodefs should only be used as real tasks on a temporary basis? Maybe not only. I often use them for demonstrating how something can be done inside Ant. Another possibility is task-prototyping. Therefore I thought about a compiler which transferes the macrodef to java source ... Jan
Re: macrodef and local
From: Matt Benson gudnabrsam () yahoo ! com Date: 2004-06-23 15:02:54 I cringe at the thought of the number of unique properties that could be floating about resulting from this... Is the user community complaining? The only issue that seems to come up every now and then is lack of straight-forward support like if/unless/depends on macrodef and I'd like to see us address that. I haven't seen a real-world use-case where the only way to solve an issue is by using locals inside macrodef. Hijacking the topic a bit... Instead of adding if unless attributes to macrodef, I suggest adding a new task break that can be placed at arbitrary locations inside a task container to stop further tasks in that container from executing. Cleaner compared to if/then/else constructs and is not tied to macrodef alone. break is smiliar to fail except that it re-routes control to the next task container instead of totally stopping the build process. -Matt Cheers, Magesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: macrodef and local
It is not only with macrodef's that folk want if/unless, but macrodef is a bit more obvious because of it's use as a replacement for antcall used as a sub-routine. Using constructed property names is a good work-around for the lack of local properties. But it is a work-around, and there are some cases where true local properties would be more easily be used. The break task is interesting. I am concerned however about how third party task containers would work with it. Peter Magesh Umasankar wrote: From: Matt Benson gudnabrsam () yahoo ! com Date: 2004-06-23 15:02:54 I cringe at the thought of the number of unique properties that could be floating about resulting from this... Is the user community complaining? The only issue that seems to come up every now and then is lack of straight-forward support like if/unless/depends on macrodef and I'd like to see us address that. I haven't seen a real-world use-case where the only way to solve an issue is by using locals inside macrodef. Hijacking the topic a bit... Instead of adding if unless attributes to macrodef, I suggest adding a new task break that can be placed at arbitrary locations inside a task container to stop further tasks in that container from executing. Cleaner compared to if/then/else constructs and is not tied to macrodef alone. break is smiliar to fail except that it re-routes control to the next task container instead of totally stopping the build process. -Matt Cheers, Magesh - 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: macrodef and local
From: Peter Reilly peter.reilly () corvil ! com Date: 2004-06-23 16:23:48 are some cases where true local properties would be more easily like...? The break task is interesting. I am concerned however about how third party task containers would work with it. If the third-party container would like to support the break task, they would need to catch BreakException and handle it in the place where they iterate over their nested tasks and execute them. BreakException extends from BuildException. It gets thrown by the break task if it decides that the condition to break is met. Inside Ant, we'd need to modify Target, Sequential, and Parallel at obvious places to support break Peter Cheers, Magesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: macrodef and local
Why would BreakException subclass from BuildException? It's a (heavy) flow control mechanism and has nothing to do with error indication. Just like using try/catch for flow control is not a good idea, break should not piggy back on the build exception mechanism... Also as a developer responsible for lots of task container code, I'm not thrilled with the idea of having to add this hook into every single task... My 2cents. At 01:09 PM 6/23/2004, you wrote: From: Peter Reilly peter.reilly () corvil ! com Date: 2004-06-23 16:23:48 are some cases where true local properties would be more easily like...? The break task is interesting. I am concerned however about how third party task containers would work with it. If the third-party container would like to support the break task, they would need to catch BreakException and handle it in the place where they iterate over their nested tasks and execute them. BreakException extends from BuildException. It gets thrown by the break task if it decides that the condition to break is met. Inside Ant, we'd need to modify Target, Sequential, and Parallel at obvious places to support break Peter Cheers, Magesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] The Wabbit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: macrodef and local
Subject:Re: macrodef and local From: Wascally Wabbit wascallywabbit () earthling ! net Why would BreakException subclass from BuildException? It's a Point taken. So long as it is some sort of RuntimeException, it is good enough. Also as a developer responsible for lots of task container code, I'm not thrilled with the idea of having to add this hook into every single task... Maybe we can code up some utility method like so: TaskContainerUtils.executeTaskList(TaskList, boolean isSequential) If your code uses this method instead of iterating through tasks and executing by itself, then we can achieve the break functionality without your container task having to bother about catching BreakExceptions. Anyway, all these are implementation details and I'd be happy to discuss them all if break is accepted as a need on a theoretical basis. Cheers, Magesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: macrodef and local
--- Magesh Umasankar [EMAIL PROTECTED] wrote: From: Peter Reilly peter.reilly () corvil ! com Date: 2004-06-23 16:23:48 are some cases where true local properties would be more easily like...? like anytime you have to make two passes at some data to get a property set exactly the way you want it. Or you want to pass some data, formatted just so, to a task... MANY TIMES, like for each file in a fileset. Yes, you could write a Java task, or even a scriptdef, but one of the nicest things about macrodef is that anyone familiar with Ant can use it to build more complex behavior out of existing tasks. This could encourage task developers to keep the operations of their tasks as atomic as possible and increase the chance of reusability of pieces. I'm sure I don't need to illustrate the ease-of-use of macrodef vs. using Ant task classes from custom task code? So no, having local variables does not give us anything we can't do, but it does save us having to pollute the Project properties with e.g. 500 useless properties. The break task is interesting. I am concerned however about how third party task containers would work with it. If the third-party container would like to support the break task, they would need to catch BreakException and handle it in the place where they iterate over their nested tasks and execute them. BreakException extends from BuildException. It gets thrown by the break task if it decides that the condition to break is met. What if the third-party container would NOT like to support the break task? This starts to change the intent of what a Task does, no? Inside Ant, we'd need to modify Target, Sequential, and Parallel at obvious places to support break Sounds like break is fail with ac:try. If we were going to include flow control, ac:if would require less support programming. Peter Cheers, Magesh -Matt __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 21721] - Provide local properties within a target
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=21721. 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=21721 Provide local properties within a target [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Additional Comments From [EMAIL PROTECTED] 2004-06-23 17:49 --- Moving to 23942 because there was more activity there. *** This bug has been marked as a duplicate of 23942 *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 23942] - Addition of a local property
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=23942. 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=23942 Addition of a local property [EMAIL PROTECTED] changed: What|Removed |Added CC||[EMAIL PROTECTED] --- Additional Comments From [EMAIL PROTECTED] 2004-06-23 17:49 --- *** Bug 21721 has been marked as a duplicate of this bug. *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: macrodef and local
--- Magesh Umasankar [EMAIL PROTECTED] wrote: From: Matt Benson gudnabrsam () yahoo ! com Date: 2004-06-23 15:02:54 I cringe at the thought of the number of unique properties that could be floating about resulting from this... Is the user community complaining? [SNIP] BTW, apparently the user community is indeed complaining... there are nine votes for http://issues.apache.org/bugzilla/show_bug.cgi?id=23942 -Matt __ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29729] - XSL StyleSheet for build scripts
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29729. 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=29729 XSL StyleSheet for build scripts --- Additional Comments From [EMAIL PROTECTED] 2004-06-23 17:58 --- FTR, I also have an XSL for Ant build files, and there's one posted on the IBM web site too, quite involved. Mine just gives a list of targets at the top, with the XML Ant code styled (with syntax highlighting a la VIM) as HTML, with active links for dependent targets and property references (works only if the property if defined in the same build file, but convenient nonetheless). It extends a generix XSL to style XML files as HTML, just adding the links between targets/properties and the list of public/private targets at the top. I'll share it if there's interest. --DD - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29729] - XSL StyleSheet for build scripts
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29729. 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=29729 XSL StyleSheet for build scripts --- Additional Comments From [EMAIL PROTECTED] 2004-06-23 18:02 --- And to answer Matt, such an XSL could go in ant/etc, with the other XSLs. There are too many ways to convert an Ant build file to XML to have an XSL everyone would like, but a simple cross-platform one that works across platform would be a nice addition to Ant IMHO. Mine, since needs to keep all whitespace to preserve the formatting of the XML, doesn't work with the default XSL processor of IE which things whitespaces are trash... --DD - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29729] - XSL StyleSheet for build scripts
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29729. 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=29729 XSL StyleSheet for build scripts --- Additional Comments From [EMAIL PROTECTED] 2004-06-23 18:24 --- Good answer... I don't mess around with XSL so the presence of those hadn't even registered with me, especially since I no longer use an actual Ant distribution... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 5949] - Stop using timestamp for out-of-dateness check
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=5949. 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=5949 Stop using timestamp for out-of-dateness check [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||WORKSFORME --- Additional Comments From [EMAIL PROTECTED] 2004-06-23 18:26 --- No news is good news. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: macrodef and local
From: Matt Benson gudnabrsam () yahoo ! com Date: 2004-06-23 17:43:46 code? So no, having local variables does not give us anything we can't do, but it does save us having to That is what I was trying to ensure. pollute the Project properties with e.g. 500 useless properties. -0. I don't think the above is a big concern of mine. What if the third-party container would NOT like to support the break task? They wouldn't delegate task execution to TaskContainerUtils.executeTaskList This starts to change the intent of what a Task does, no? No. The task does what it does when it is invoked. The container decides if the task is to be invoked at all. And it is eventually the user who decides that a break is needed and not Ant or any of the task containers. Cheers, Magesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 6226] - Organization of ant/lib directory, contents of ant/lib directory
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=6226. 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=6226 Organization of ant/lib directory, contents of ant/lib directory --- Additional Comments From [EMAIL PROTECTED] 2004-06-23 18:36 --- with the advent of antlib and -lib, plus the WONTFIX nature of the .zip support request, I would say this issue is resolved. Dissenters? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29764] New: - genkey fails when the jre bin directory is not in the path
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29764. 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=29764 genkey fails when the jre bin directory is not in the path Summary: genkey fails when the jre bin directory is not in the path Product: Ant Version: 1.1 Platform: PC OS/Version: Linux Status: NEW Severity: Normal Priority: Other Component: Core tasks AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] the following exception will be displayed: Execute failed: java.io.IOException: java.io.IOException: keytool: not found the solution is to use JavaEnvUtils like so (in GenerateKey.java): cmd.setExecutable(JavaEnvUtils.getJdkExecutable(keytool)); instead of --- cmd.setExecutable(keytool); Note (seperate bug i haven't really played with much): it seems like genkey has issues when passed param values with spaces (i'm not sure if this is valid) genkey ... dname param name=CN value=nospaces/ param name=OU value=this will fail because of spaces/ ... /dname /genkey - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29764] - genkey fails when the jre bin directory is not in the path
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29764. 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=29764 genkey fails when the jre bin directory is not in the path [EMAIL PROTECTED] changed: What|Removed |Added Version|1.1 |1.6.1 --- Additional Comments From [EMAIL PROTECTED] 2004-06-23 18:47 --- forgot to note the version. this is on 1.6.1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29743] - modified selector has poor cachefile save performance
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29743. 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=29743 modified selector has poor cachefile save performance --- Additional Comments From [EMAIL PROTECTED] 2004-06-23 19:01 --- Created an attachment (id=11931) Modified select bugs 29742,29743 bugs fix, plus added support for ChecksumAlgorithm - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29743] - modified selector has poor cachefile save performance
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29743. 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=29743 modified selector has poor cachefile save performance --- Additional Comments From [EMAIL PROTECTED] 2004-06-23 19:02 --- Created an attachment (id=11932) ChecksumAlgorithm class for ModifiedSelector - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29743] - modified selector has poor cachefile save performance
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29743. 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=29743 modified selector has poor cachefile save performance --- Additional Comments From [EMAIL PROTECTED] 2004-06-23 19:14 --- [PATCH] I have created a patch that addresses the poor cachefile save performance. This patch addresses this bug, as well as bug 29742. The revised ModifiedSelector now implements the BuildListener interface. Upon configuration, it registers itself with the Project as a BuildListener. The ModifiedSelector is notified of finished BuildEvents, like taskFinished, targetFinished and buildFinished. Saving of the cachefile is now delayed until the next finished BuildEvent occurs, most likely, a taskFinished call. There is also a new attribute called delayupdate. It defaults to true to gain the new performance increase of delaying the save of the cachefile. Setting the delayupdate attribute to false allows continual cachefile updates ( like the current ModifiedSelector ). I also ran a sample population of files to note the reduction in time to cache the file changes: sample: 6596 image files averaging 31K, total size of 204 MB the cache is empty, so all files are seen as revised, this is the most extreme case to show the largest performance gain MD5 digest mode with continual update: 9 minutes, 8 seconds MD5 digest mode with delayed update:36 seconds CRC checksum mode with continual update: 7 minutes, 36 seconds CRC checksum mode with delayed update: 43 seconds - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29742] - Modified selector doesn't allow algorithm or comparator selection
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29742. 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=29742 Modified selector doesn't allow algorithm or comparator selection --- Additional Comments From [EMAIL PROTECTED] 2004-06-23 19:17 --- [PATCH] Please see bug 29743 for a patch that includes this bug fix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: Issues with modified / selector.
have created a patch that addresses the poor cachefile save performance. This patch addresses this bug, as well as bug 29742. The revised ModifiedSelector now implements the BuildListener interface. Upon configuration, it registers itself with the Project as a BuildListener. The ModifiedSelector is notified of finished BuildEvents, like taskFinished, targetFinished and buildFinished. Saving of the cachefile is now delayed until the next finished BuildEvent occurs, most likely, a taskFinished call. There is also a new attribute called delayupdate. It defaults to true to gain the new performance increase of delaying the save of the cachefile. Setting the delayupdate attribute to false allows continual cachefile updates ( like the current ModifiedSelector ). I also ran a sample population of files to note the reduction in time to cache the file changes: sample: 6596 image files averaging 31K, total size of 204 MB the cache is empty, so all files are seen as revised, this is the most extreme case to show the largest performance gain MD5 digest mode with continual update: 9 minutes, 8 seconds MD5 digest mode with delayed update:36 seconds CRC checksum mode with continual update: 7 minutes, 36 seconds CRC checksum mode with delayed update: 43 seconds On Wed, 23 Jun 2004 [EMAIL PROTECTED] wrote: I´ll have a deeper look into that (but now I have to ensure that my new computer is able to run - the old was damaged :( Jan -Ursprüngliche Nachricht- Von: Robert Rice [mailto:[EMAIL PROTECTED] Gesendet am: Dienstag, 22. Juni 2004 20:23 An: [EMAIL PROTECTED] Betreff: Issues with modified / selector. Recently, I submitted two bugs related to the modified selector. Bug 29742 addresses the issue that the Modified selector doesn't allow algorithm or comparator selection. Only the default choices of digest and equal respectively are allowed. I have created a bug fix for the modified selector that addresses this issue. In the bug fix, the algorithm and comparator initialization logic has been changed to allow choosing away from default. At the same time, I have created another algorithm type, checksum, that makes use of the java.util.zip.Checksum interface. It is chosen by setting the alogrithm attribute to checksum ( modified algorithm=checksum / ). This checksum allows the choice of CRC32 or Alder32, which utilize java.util.zip.CRC32 and java.util.zip.Adler32 respectively. This choice is made by setting the algorithm.algorithm parameter to CRC or ADLER, with the default being CRC ( modified algorithm=checksumparam name=algorithm.algorithm value=ADLER //modified ) How do I submit such changes for evaluation and possible inclusion? Bug 29743 addresses a bigger issue in that the modified selector has poor cachefile save performance. The architecture of the selector framework dictates that the selector is notified of files, one at a time, through the isSelected method. It is at this method call, that the cache properties file is saved. This properties file is saved every time a file modification is found, possibly as many times as there are files in the fileset. This leads to poor performance when process large filesets with multiple changes, in my case around 15000. I would like to delay the saving of the file until we are finished with the fileset or finished with the selector. It looks to me, like this requires the addition of one of more methods to the selector framework, likely to BaseSelector. In the case of the modified selector, we may be able to get away with knowing we are finished with the selector through some method call like tearDown. At this point, the modified selector could save its properites file. Another option is to add filesetListener type of behavior to the BaseSelector. This would notify a selector when a fileset selection has started and ended. With this option, the modified selector could save its properties file at the end of fileset selection. - 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]
cvs commit: ant/src/testcases/org/apache/tools/ant/types RedirectorElementTest.java
mbenson 2004/06/23 12:30:14 Added: src/etc/testcases/taskdefs/exec Tag: ANT_16_BRANCH apply.xml parrot.sh src/etc/testcases/taskdefs/exec/expected Tag: ANT_16_BRANCH utf-8 src/etc/testcases/taskdefs/exec/input Tag: ANT_16_BRANCH iso8859-1 src/etc/testcases/types Tag: ANT_16_BRANCH redirector.xml src/main/org/apache/tools/ant/types Tag: ANT_16_BRANCH RedirectorElement.java src/main/org/apache/tools/ant/util Tag: ANT_16_BRANCH ConcatFileInputStream.java LeadPipeInputStream.java OutputStreamFunneler.java ReaderInputStream.java src/testcases/org/apache/tools/ant/taskdefs Tag: ANT_16_BRANCH ExecuteOnTest.java src/testcases/org/apache/tools/ant/types Tag: ANT_16_BRANCH RedirectorElementTest.java Log: New files for redirector merge. Revision ChangesPath No revision No revision 1.3.2.1 +0 -0 ant/src/etc/testcases/taskdefs/exec/apply.xml Index: apply.xml === RCS file: /home/cvs/ant/src/etc/testcases/taskdefs/exec/apply.xml,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -u -r1.3 -r1.3.2.1 1.1.2.1 +0 -0 ant/src/etc/testcases/taskdefs/exec/parrot.sh Index: parrot.sh === RCS file: /home/cvs/ant/src/etc/testcases/taskdefs/exec/parrot.sh,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -u -r1.1 -r1.1.2.1 No revision No revision 1.1.2.1 +0 -0 ant/src/etc/testcases/taskdefs/exec/expected/utf-8 Binary file No revision No revision 1.1.2.1 +0 -0 ant/src/etc/testcases/taskdefs/exec/input/iso8859-1 Binary file No revision No revision 1.1.2.1 +0 -0 ant/src/etc/testcases/types/redirector.xml Index: redirector.xml === RCS file: /home/cvs/ant/src/etc/testcases/types/redirector.xml,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -u -r1.1 -r1.1.2.1 No revision No revision 1.2.2.1 +0 -0 ant/src/main/org/apache/tools/ant/types/RedirectorElement.java Index: RedirectorElement.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/RedirectorElement.java,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -u -r1.2 -r1.2.2.1 No revision No revision 1.1.2.1 +0 -0 ant/src/main/org/apache/tools/ant/util/ConcatFileInputStream.java Index: ConcatFileInputStream.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/util/ConcatFileInputStream.java,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -u -r1.1 -r1.1.2.1 1.1.2.1 +48 -4 ant/src/main/org/apache/tools/ant/util/LeadPipeInputStream.java Index: LeadPipeInputStream.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/util/LeadPipeInputStream.java,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -u -r1.1 -r1.1.2.1 --- LeadPipeInputStream.java 27 Mar 2004 21:22:58 - 1.1 +++ LeadPipeInputStream.java 23 Jun 2004 19:30:14 - 1.1.2.1 @@ -27,6 +27,7 @@ /** * Special CODEPipedInputStream/CODE that will not die * when the writing CODEThread/CODE is no longer alive. + * @since Ant 1.6.2 */ public class LeadPipeInputStream extends PipedInputStream { private Task managingTask; @@ -39,14 +40,36 @@ } /** + * Construct a new CODELeadPipeInputStream/CODE + * with the specified buffer size. + * @param size the size of the circular buffer. + */ +public LeadPipeInputStream(int size) { +super(); +setBufferSize(size); +} + +/** * Construct a new CODELeadPipeInputStream/CODE to pull * from the specified CODEPipedOutputStream/CODE. - * @param src the CODEPipedOutputStream/CODE source. + * @param srcthe CODEPipedOutputStream/CODE source. */ public LeadPipeInputStream(PipedOutputStream src) throws IOException { super(src); } +/** + * Construct a new CODELeadPipeInputStream/CODE to pull + * from the specified
cvs commit: ant/docs/manual/CoreTypes redirector.html
mbenson 2004/06/23 12:38:56 Added: docs/manual/CoreTypes Tag: ANT_16_BRANCH redirector.html Log: Merge the manual page for redirector. Revision ChangesPath No revision No revision 1.2.2.1 +0 -0 ant/docs/manual/CoreTypes/redirector.html Index: redirector.html === RCS file: /home/cvs/ant/docs/manual/CoreTypes/redirector.html,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -u -r1.2 -r1.2.2.1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant WHATSNEW
mbenson 2004/06/23 12:41:28 Modified:.WHATSNEW Log: Show latest merges Revision ChangesPath 1.630 +12 -12ant/WHATSNEW Index: WHATSNEW === RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.629 retrieving revision 1.630 diff -u -r1.629 -r1.630 --- WHATSNEW 23 Jun 2004 12:30:40 - 1.629 +++ WHATSNEW 23 Jun 2004 19:41:27 - 1.630 @@ -16,23 +16,11 @@ * Enable to choose the regexp implementation without system property. Bugzilla Report 15390. -* Nested file mappers and a container mapper implementation have been - introduced. Additionally, the mapper element now accepts defined - nested FileNameMapper implementations directly, allowing a usage - comparable to those of condition, filter, and selector. - -* New redirector type introduced to provide extreme I/O flexibility. - Initial support for exec, apply, and java tasks. - * Changed default tempdir for javac from user.dir to java.io.tmpdir. * A new base class DispatchTask has been added to facilitate elegant creation of tasks with multiple actions. -* apply has a new ignoremissing attribute (default true for BC) - which will allow nonexistent files specified via filelists to - be passed to the executable. Bugzilla Report 29585. - Changes from Ant 1.6.1 to current Ant 1.6 CVS version = @@ -240,6 +228,18 @@ * loadproperties supports loading from a resource. Bugzilla Report 28340. + +* Nested file mappers and a container mapper implementation have been + introduced. Additionally, the mapper element now accepts defined + nested FileNameMapper implementations directly, allowing a usage + comparable to those of condition, filter, and selector. + +* New redirector type introduced to provide extreme I/O flexibility. + Initial support for exec, apply, and java tasks. + +* apply has a new ignoremissing attribute (default true for BC) + which will allow nonexistent files specified via filelists to + be passed to the executable. Bugzilla Report 29585. Changes from Ant 1.6.0 to Ant 1.6.1 = - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]