DO NOT REPLY [Bug 18476] - copy with filtering modifies lineendings
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18476. 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=18476 copy with filtering modifies lineendings --- Additional Comments From [EMAIL PROTECTED] 2003-04-15 00:03 --- Please provide testcases - the tests should fail before the patch is applied and must pass afterwards. Magesh, Ok, - but some of the current tests rely on the current behaviour. (I think as well as testcases/org.apache.tools.ant.taskdefs#testFilterChain) Peter
Re: cvs commit: ant/src/main/org/apache/tools/ant/types/selectors ExtendSelector.java
I have some questions about this patch On Tue, 15 Apr 2003 03:21 am, [EMAIL PROTECTED] wrote: +Project.setProjectOnObject(project, o); Why is this a static method rather than a plain method like this: project.setProjectOnObject(o); Why don't we define an interface for all things that can have a Project instance (Projectable :-)) rather than using reflection? It could be applied to ProjectComponent. Conor
Re: [PATCH] add regular expression selector (re-worked)
At 06:31 PM 4/11/2003, Jay wrote: I was thinking I should also do a test case. I have gotten lost trying to find what's needed. I know you aren't alone. I need to document this much better. I'm sure these questions have been answered before but so far I have not had much luck finding a howto for doing a test case. I have looked at the others similar in /testcases/org/apache/tools/ant/types/selectors for example the ContainsSelector. Where is the input file for that test, how do I drive a specific test case? Of course, you can write a test case any way you like. What I found was that I wanted to have some standard way of working with a set of files, and testing whether one or another of them was selected. To that end, I used a base class called BaseSelectorTest that does most of the heavy lifting. What BaseSelectorTest does is copy a tree of files out of src/etc/testcases/types into selectortest and selectortest2 subdirectories (using the src/etc/testcases/types/selectors.xml build file). Then it takes a list of 12 of the files and directories in this tree, and applies whatever selector you pass in to each one. It passes back to your test a string indicating which of the 12 files and directories was selected, using 'T' for selected and 'F' for not selected. In the Test class for your selector, you override the getInstance() method to create your own type of selector, and set the elements of your selector a variety of ways to ensure that the string of T's and F's returned when the selector is applied to those 12 files is correct. So, for example, DepthSelectorTest.java extends BaseSelectorTest and has the following code: public BaseSelector getInstance() { return new DepthSelector(); } public void testSelectionBehaviour() { DepthSelector s; String results; try { makeBed(); s = (DepthSelector)getInstance(); s.setMin(20); s.setMax(25); results = selectionString(s); assertEquals(, results); s = (DepthSelector)getInstance(); s.setMin(0); results = selectionString(s); assertEquals(, results); s = (DepthSelector)getInstance(); s.setMin(1); results = selectionString(s); assertEquals(FTTT, results); so the first test says that none of the 12 files or directories will match if the depth range is between 20 and 25 (that would be one deep directory tree!), the second says that they all match if the minimum depth is set to 0 and the maximum isn't specified, and the third that if the minumum depth is 1, the first 5 entries in the list will not be selected and the rest will. You can find the 12 files and directories that are tested for selection in the BaseSelectorTest class. I used a fixed list so that if someone added new files to the src/etc/testcases/types directory it wouldn't break my tests: protected String[] filenames = {.,asf-logo.gif.md5,asf-logo.gif.bz2, asf-logo.gif.gz,copy.filterset.filtered,zip/asf-logo.gif.zip, tar/asf-logo.gif.tar,tar/asf-logo-huge.tar.gz, tar/gz/asf-logo.gif.tar.gz,tar/bz2/asf-logo.gif.tar.bz2, tar/bz2/asf-logo-huge.tar.bz2,tar/bz2}; Clearer? Again, you don't have to do things this way. You can write your own tests any way that you want. If this framework saves you some work, go ahead and use it. If it is too confusing, write your own. Whatever works for you.
Re: cvs commit: ant/src/main/org/apache/tools/ant/types/selectors ExtendSelector.java
- Original Message - From: Conor MacNeill [EMAIL PROTECTED] To: Ant Developers List [EMAIL PROTECTED] Sent: Monday, April 14, 2003 8:05 PM Subject: Re: cvs commit: ant/src/main/org/apache/tools/ant/types/selectors ExtendSelector.java I have some questions about this patch On Tue, 15 Apr 2003 03:21 am, [EMAIL PROTECTED] wrote: +Project.setProjectOnObject(project, o); Why is this a static method rather than a plain method like this: project.setProjectOnObject(o); I really have no good answers to this one. Do you prefer one over the other in this case? Why don't we define an interface for all things that can have a Project instance (Projectable :-)) rather than using reflection? It could be applied to ProjectComponent. +1 Conor Cheers, Magesh
Re: cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/clearcase CCLock.java CCMkbl.java CCMklabel.java CCMklbtype.java CCRmtype.java CCUnlock.java ClearCase.java
Point taken. In the future, if it will help, I will attach the actual diff that was used to patch to the bug report, before marking it as fixed. Cheers, Magesh - Original Message - From: Steve Loughran [EMAIL PROTECTED] To: Ant Developers List [EMAIL PROTECTED] Sent: Monday, April 14, 2003 4:45 PM Subject: Re: cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/clearcase CCLock.java CCMkbl.java CCMklabel.java CCMklbtype.java CCRmtype.java CCUnlock.java ClearCase.java Magesh Umasankar wrote: I am sending a summary of the commit I made because ezmlm-reject said: fatal: Sorry, I don't accept messages larger than 10 bytes (#5.2.3) while I trust you etc, etc, this is the trick that would let me sneak a back door into something complex and vulnerable, like say xerces or axis. Hide the back door in 100K of changes and it'll take code review to find it. -steve - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DynamicTag
Hi, I am on holidays, but have followed this thread. I have been playing with DynamicTag and it is quite neat, but there are some issues with it.. I have made some modifications (well rewrite...) 1) DynamicTag uses UnknownElement. This part of ant code is undergoing a number of changes at the moment, and currently DynamicTag does not work with cvs ant. I extracted the stuff that unknownelement does and placed them in a method, this is compatible with apr12 ant cvs and with ant 1.5.x (tested with 1.5.2). 2) I would like to have dynamic tag behavior on the the current task as well as nested elements. 3) I would like to use reflection in the same way as ant uses reflection for setters and creators. 4) I would like to support multiple dynamic types in the same class. I initially considered using only datatypes, but on consideration it does make sense to have tasks as well. The problems with this are: a) tasks that do not extend ant.task get wrapped by ant.taskadapter which may not be what is expected b) tasks have a more complex life cycle that datatypes (init, perform, execute methods) Attached are two files : DynamicElementHelper and DynamicElementTask. Tasks and Datatypes/Sub-elements extend DynamicElementTask. The signature dynamicElement(Type) is used to indicate the type that this method will handle. DynamicElementTask implements DynamicConfigurator, and calls DynamicElementHelper, which looks up the tag name in the projects tasks and datatypes, if found that, the method uses reflection to see if the calling object has a matching dynamicElement method for the type. DynamicElementHelper is written so that if this idea is considered useful, it can be used by IntrospectionHelper, It that case, there would be no need for DynamicElementTask. To do the original example: buildpath id=tahoebuildpath tahoeresolver destdir=${destdir} dependencies=${dependencies} /buildpath BuildPath.java extends DynamicElementTask and adds a dynamic element handler: // Creates a nested resolver public void dynamicElement(BuildPathResolver resolver) { if (this.resolver != null) throw new BuildException(resolver already defined); this.resolver = resolver; } And the xml filters: target name=test depends=-init xmlchain toDir=./build/chain extension=.xxx fileset refid=workOnStuf / filter1 attr1=v1 attr2=v2 mysubelement .../ /filter1 xincludefilter .../ xmlfilter refid=other-filter/ /xmlchain /target and in xml chain: public void dynamicElement(XmlFilter filter) { filters.addElement(filter) } One may also nest the custom filters in the same way as dynamictag by writing a new class public class CustomFilters extends DynamicElementTask { private Vector filters = new Vector(); public void dynamicElement(XmlFilter filter) { filters.addElement(filter); } public Vector getFilters() { return filters;} } and in XmlChain: public void addCustomFilters(CustomFilters customFilters) { this.customFilters = customFilters; } Cheers, Peter Dominique Devienne wrote: Two comments: 1) DynamicTag is fully Ant 1.5.x compatible. No need for 1.6. Just use it along side your own classes, and you're good to go. 2) DynamicTag *relies* on taskdef or typedef (you can declare your custom extension either way), which takes care of all the classloading, already has all the special stuff like loaderref. Any enhancement to these tasks automatically benefit DynamicTag. package net.sf.antcontrib.util; import java.lang.reflect.Method; import java.lang.reflect.InvocationTargetException; import java.util.Vector; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.DynamicConfigurator; import org.apache.tools.ant.Project; import org.apache.tools.ant.RuntimeConfigurable; import org.apache.tools.ant.Task; import org.apache.tools.ant.TaskAdapter; import org.apache.tools.ant.UnknownElement; /** * p * This class is used to help in handling dynamic elements. * The idea is to allow easy custom extensions * and to extend the traditional ant bean reflection to call setters * methods, or add/create methods, with all the magic type conversion * it does. * /p * p * The dynamic element classes will be defined by lt;typedef/gt; * or b(to be decided)/b by lt;taskdef/gt; * /p * p * User classes (tasks or datatypes) have methods * codedynamicElement(class or interface)/code * /p * p * This class is currently used by DynamicElementTask, but * may in the future be used by ant core IntrospectionHelper. * /p * p * An example: Suppose one had a task buildpath that resolved * paths using custom resolvers that implement a BuildPathResolver * interface. * /p * pre * lt;typedef name=tahoeresolver *classname=acme.resolvers.TahoeResolver *classpath=acme.classpath/gt; * lt;buildpath id=tahoebuildpathgt; * lt;tahoeresolver
Re: [PATCH] add regular expression selector (re-worked)
They look good. Sorry about those fuzz messages, it must have been due to the source I used for the patch, from the 1.5.3. The company I work for is very sensitive about using open source, especially if it's on the bleeding edge. To get to use the function before it's officially released I had to do it on the best available release. Next time I'll do the one to contribute from the current snapshot. I think you gave me enough info to do the test case, I'll work on it today. Thanks! On Monday 14 April 2003 02:50, Stefan Bodewig wrote: On Fri, 11 Apr 2003, Jay [EMAIL PROTECTED] wrote: Here is the new patch to add a regular expression selector as a core task, instead of the one I submitted Wednesday that just updated ContainsSelector. Thanks, will be committed in a few minutes. Could you please check that everything is OK? I received a few with fuzz ... messages from patch and MatchingTask wouldn't compile (you forgot the import for ContainsRegexpSelector). Things look fine, but I want to be sure.
Re: [VOTE] Antoine Levy-Lambert as committer
+1
Re: cvs commit: ant/src/testcases/org/apache/tools/ant/filters HeadTailTest.java
On Monday, April 14, 2003, at 11:37 AM, [EMAIL PROTECTED] wrote: umagesh 2003/04/14 08:37:48 Modified:.WHATSNEW docs/manual/CoreTypes filterchain.html src/main/org/apache/tools/ant/filters HeadFilter.java TailFilter.java Added: src/etc/testcases/filters head-tail.xml src/etc/testcases/filters/expected head-tail.head.test head-tail.headAllSkip.test head-tail.headLines.test head-tail.headLinesSkip.test head-tail.headSkip.test head-tail.headtail.test head-tail.tail.test head-tail.tailAllSkip.test head-tail.tailLines.test head-tail.tailLinesSkip.test head-tail.tailSkip.test src/etc/testcases/filters/input head-tail.small.test head-tail.test src/testcases/org/apache/tools/ant/filters HeadTailTest.java Log: New skip attribute for HeadFilter and TailFilter The 'tail' skip tests fail for me on Mac OS X and Linux (both with 1.4.1). Both 'testTailSkip' and 'testTailLinesSkip' cut off 1 too many letters. The last line of the result file is 'Line 5' instead of 'Line 58' Jesse Stockall - [EMAIL PROTECTED] CRYPTOCard Corp.
cvs commit: ant/src/testcases/org/apache/tools/ant/types/optional/depend ClassFileSetTest.java
jesse 2003/04/14 20:34:11 Modified:src/etc/testcases/taskdefs/optional/depend depend.xml src/main/org/apache/tools/ant/util/depend/bcel DependencyVisitor.java src/testcases/org/apache/tools/ant/taskdefs/optional/depend DependTest.java src/testcases/org/apache/tools/ant/types/optional/depend ClassFileSetTest.java Added: src/etc/testcases/taskdefs/optional/depend/src4/test ContainsOnlyInner.java MethodParam.java Log: Better detection of classes passed as method params like 'System.out.println(Outer.Inner.class);' PR: 13273 Revision ChangesPath 1.1 ant/src/etc/testcases/taskdefs/optional/depend/src4/test/ContainsOnlyInner.java Index: ContainsOnlyInner.java === package test; public class ContainsOnlyInner { void method1() { System.out.println(Outer.Inner.class); } } 1.1 ant/src/etc/testcases/taskdefs/optional/depend/src4/test/MethodParam.java Index: MethodParam.java === package test; public class MethodParam { void method1() { System.out.print(ContainsOnlyInner.class); } } 1.10 +4 -0 ant/src/etc/testcases/taskdefs/optional/depend/depend.xml Index: depend.xml === RCS file: /home/cvs/ant/src/etc/testcases/taskdefs/optional/depend/depend.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- depend.xml20 Dec 2002 13:57:12 - 1.9 +++ depend.xml15 Apr 2003 03:34:11 - 1.10 @@ -117,6 +117,10 @@ fileset id=result dir=${classes.dir}/ /target + target name=testmethodparaminner depends=src4setup, compile +classfileset id=result dir=${classes.dir} rootclass=test.MethodParam/ + /target + target name=testnosource depends=src1setup, compile depend destdir=${classes.dir} closure=yes/ /target 1.6 +29 -5 ant/src/main/org/apache/tools/ant/util/depend/bcel/DependencyVisitor.java Index: DependencyVisitor.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/util/depend/bcel/DependencyVisitor.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- DependencyVisitor.java10 Feb 2003 14:14:40 - 1.5 +++ DependencyVisitor.java15 Apr 2003 03:34:11 - 1.6 @@ -124,11 +124,35 @@ if (obj.getSignature(constantPool).equals(Ljava/lang/Class;) name.startsWith(class$)) { String classname = name.substring(6).replace('$', '.'); -addClass(classname); -int index = classname.lastIndexOf(.); -if (index != -1) { -classname = classname.substring(0, index) + $ + -classname.substring(index + 1); +// does the class have a package structure +int index = classname.lastIndexOf(.); +if (index 0) { +char start; +// check if the package structure is more than 1 level deep +int index2 = classname.lastIndexOf(., index -1); +if (index2 != -1) { +// class name has more than 1 package level 'com.company.Class' +start = classname.charAt(index2 + 1); +} +else { +// class name has only 1 package level 'package.Class' +start = classname.charAt(0); +} +// Check to see if it's an inner class 'com.company.Class$Inner' +if ((start 0x40) (start 0x5B)) { +// first letter of the previous segment of the class name 'Class' +// is upper case ascii. so according to the spec it's an inner class +classname = classname.substring(0, index) + $ + +classname.substring(index + 1); +addClass(classname); +} +else { +// Add the class in dotted notation 'com.company.Class' +addClass(classname); +} +} +else { +// Add a class with no package 'Class' addClass(classname); } } 1.9 +1 -1
FileUtils.createTempFile() - should we delete on exit?
Bug 17512 http://issues.apache.org/bugzilla/show_bug.cgi?id=17512 proposes a fix for an annoyance that 'plagues' a number of Ant tasks. Tasks like junit and javac can create temporary files that get left behind if the build is terminated via 'ctrl-c' Should the fix be applied to each task that creates temp files, or should it be put in FileUtils.createTempFile(). Since 1.6 will require JDK 1.2+ we can avoid the ugly reflection in the patch (attached to the bug report). Thoughts? Jesse Stockall - [EMAIL PROTECTED] CRYPTOCard Corp.
DO NOT REPLY [Bug 17512] - Quitting javac task with CTRL-C can leave temporary files
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17512. 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=17512 Quitting javac task with CTRL-C can leave temporary files [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |ASSIGNED
DO NOT REPLY [Bug 12793] - VSSHISTORY fails against a label 30 chars
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12793. 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=12793 VSSHISTORY fails against a label 30 chars [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |ASSIGNED
DO NOT REPLY [Bug 8451] - [PATCH] VSS fixes, additional functionality
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8451. 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=8451 [PATCH] VSS fixes, additional functionality [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |ASSIGNED
DO NOT REPLY [Bug 11562] - Extra options to set Timestamp on VSSGET
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11562. 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=11562 Extra options to set Timestamp on VSSGET [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |ASSIGNED
DO NOT REPLY [Bug 8451] - [PATCH] VSS fixes, additional functionality
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8451. 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=8451 [PATCH] VSS fixes, additional functionality [EMAIL PROTECTED] changed: What|Removed |Added AssignedTo|[EMAIL PROTECTED] |[EMAIL PROTECTED] Status|ASSIGNED|NEW
DO NOT REPLY [Bug 4387] - Problem using vssget to get latest version from MS SourceSafe when some files are checked out
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4387. 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=4387 Problem using vssget to get latest version from MS SourceSafe when some files are checked out [EMAIL PROTECTED] changed: What|Removed |Added AssignedTo|[EMAIL PROTECTED] |[EMAIL PROTECTED]
cvs commit: ant/src/etc/testcases/taskdefs/optional/vss vss.xml
jesse 2003/04/14 21:26:52 Modified:src/main/org/apache/tools/ant/taskdefs/optional/vss MSVSS.java MSVSSADD.java MSVSSCHECKOUT.java MSVSSCREATE.java MSVSSConstants.java MSVSSGET.java MSVSSLABEL.java src/etc/testcases/taskdefs/optional/vss vss.xml Log: Add ability to overwrite or skip writable files during 'get latest' or 'checkout' Add ability to specify timestamps for files retrieved during 'get latest' or 'checkout' Fix label length issues Other minor fixes unearthed after major refactoring of VSS tasks PR: #11562 #8451 #4387 #12793 #14174 #13532 #14463 Submitted by: Nigel Magnay, Keying Xi, and others Revision ChangesPath 1.29 +195 -14 ant/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java Index: MSVSS.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- MSVSS.java10 Feb 2003 14:14:28 - 1.28 +++ MSVSS.java15 Apr 2003 04:26:51 - 1.29 @@ -54,6 +54,7 @@ package org.apache.tools.ant.taskdefs.optional.vss; +import org.apache.tools.ant.types.EnumeratedAttribute; import java.io.File; import java.io.IOException; import java.text.DateFormat; @@ -126,10 +127,16 @@ private boolean m_Writable = false; /** Fail on error defaults to true */ private boolean m_FailOnError = true; +/** Get local copy for checkout defaults to true */ +private boolean m_getLocalCopy = true; /** Number of days offset for History */ private int m_NumDays = Integer.MIN_VALUE; /** Date format for History */ private DateFormat m_DateFormat = DateFormat.getDateInstance(DateFormat.SHORT); +/** Timestamp for retreived files */ +private CurrentModUpdated m_timestamp = null; +/** Behaviour for writable files */ +private WritableFiles m_writablefiles = null; /** * Each sub-class must implemnt this method and return the constructed @@ -197,6 +204,15 @@ } /** + * Sets behaviour, whether task should fail if there is an error creating + * the project.; optional, default true + * @param failOnError True if task should fail on any error. + */ +public final void setFailOnError (boolean failOnError) { +m_FailOnError = failOnError; +} + +/** * Executes the task. br * Builds a command line to execute ss.exe and then calls Exec's run method * to execute the command line. @@ -208,7 +224,7 @@ Commandline commandLine = buildCmdLine(); result = run(commandLine); if (result != 0 getFailOnError()) { -String msg = Failed executing: + commandLine.toString() +String msg = Failed executing: + formatCommandLine(commandLine) + With a return code of + result; throw new BuildException(msg, getLocation()); } @@ -292,6 +308,18 @@ m_Writable = writable; } +protected void setInternalFileTimeStamp(CurrentModUpdated timestamp) { +m_timestamp = timestamp; +} + +protected void setInternalWritableFiles(WritableFiles files) { +m_writablefiles = files; +} + +protected void setInternalGetLocalCopy(boolean get) { +m_getLocalCopy = get; +} + /** * Gets the sscommand string. ss or c:\path\to\ss * @@ -344,10 +372,24 @@ /** * Gets the label string. -Lbuild1 * + * Max label length is 32 chars + * * @returnAn empty string if label is not set. */ protected String getLabel() { -return m_Label != null ? FLAG_LABEL + m_Label : ; +if (m_Label != null) { +if (m_Label.length() 31) { +String label = m_Label.substring(0, 30); +log(Label is longer than 31 characters, truncated to: + label, Project.MSG_WARN); +return FLAG_LABEL + label; +} +else { +return FLAG_LABEL + m_Label; +} +} +else { +return ; +} } /** @@ -363,18 +405,33 @@ * Gets the version string. Returns the first specified of version -V1.0, * date -Vd01.01.01, label -Vlbuild1. * - * @returnAn empty string if a version is not set. + * @returnAn empty string if a version, date and label are not set. */ -protected String getVersion() { +protected String getVersionDateLabel() { if (m_Version != null) { return FLAG_VERSION +
cvs commit: ant/docs/manual/OptionalTasks vss.html
jesse 2003/04/14 21:28:59 Modified:docs/manual/OptionalTasks vss.html Log: Update the manual to reflect new attributes Revision ChangesPath 1.13 +69 -2 ant/docs/manual/OptionalTasks/vss.html Index: vss.html === RCS file: /home/cvs/ant/docs/manual/OptionalTasks/vss.html,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- vss.html 24 Oct 2002 14:55:24 - 1.12 +++ vss.html 15 Apr 2003 04:28:59 - 1.13 @@ -15,6 +15,7 @@ liJon Skeet (a href=mailto:[EMAIL PROTECTED][EMAIL PROTECTED]/a)/li liNigel Magnay (a href=mailto:[EMAIL PROTECTED][EMAIL PROTECTED]/a)/li liGary S. Weaver/li +liJesse Stockall/li /ul p$Date$/p hr @@ -122,7 +123,7 @@ /tr tr tdwritable/td - tdtrue or false; default false/td + tdtrue or false; default false/td tdNo/td /tr tr @@ -159,6 +160,24 @@ used; values of Y or N will be appended to this./td tdNo/td /tr + tr +tdwritablefiles/td +tdBehavior when local files are writable. Valid options are: codereplace/code, +codeskip/code and codefail/code; Defaults to codefail/code +brcodeskip/code implies codefailonerror=false/code/td +tdNo/td + /tr + tr +tdfailonerror/td +tdStop the buildprocess if ss.exe exits with a returncode of 100. Defaults to true/td +tdNo/td + /tr + tr +tdfiletimestamp/td +tdSet the behavior for timestamps of local files. Valid options are codecurrent/code, +codemodified/code, or codeupdated/code. Defaults to codecurrent/code./td +tdNo/td + /tr /table pNote that only one of version, date or label should be specified/p h3Examples/h3 @@ -239,6 +258,11 @@ used; values of Y or N will be appended to this./td tdNo/td /tr + tr +tdfailonerror/td +tdStop the buildprocess if ss.exe exits with a returncode of 100. Defaults to true/td +tdNo/td + /tr /table h3Examples/h3 blockquote @@ -354,6 +378,11 @@ tdName the user whose changes we would like to see/td tdNo/td /tr + tr +tdfailonerror/td +tdStop the buildprocess if ss.exe exits with a returncode of 100. Defaults to true/td +tdNo/td + /tr /table h4Specifying the time-frame/h4 @@ -463,6 +492,11 @@ td'Y', 'N' or empty. Specify how to reply to questions from VSS./td tdNo/td /tr + tr +tdfailonerror/td +tdStop the buildprocess if ss.exe exits with a returncode of 100. Defaults to true/td +tdNo/td + /tr /table h3Examples/h3 @@ -544,6 +578,29 @@ tdlabel/td tda label to get for/td /tr + tr +tdwritablefiles/td +tdBehavior when local files are writable. Valid options are: codereplace/code, +codeskip/code and codefail/code; Defaults to codefail/code +brcodeskip/code implies codefailonerror=false/code/td +tdNo/td + /tr + tr +tdfailonerror/td +tdStop the buildprocess if ss.exe exits with a returncode of 100. Defaults to true/td +tdNo/td + /tr + tr +tdfiletimestamp/td +tdSet the behavior for timestamps of local files. Valid options are codecurrent/code, +codemodified/code, or codeupdated/code. Defaults to codecurrent/code./td +tdNo/td + /tr + tr +tdgetlocalcopy/td +tdSet the behavior to retrieve local copies of the files. Defaults to true./td +tdNo/td + /tr /table h3Examples/h3 @@ -615,6 +672,11 @@ td'Y', 'N' or empty. Specify how to reply to questions from VSS./td tdNo/td /tr + tr +tdfailonerror/td +tdStop the buildprocess if ss.exe exits with a returncode of 100. Defaults to true/td +tdNo/td + /tr /table h3Examples/h3 @@ -665,6 +727,11 @@ tdserverPath/td tddirectory where codesrssafe.ini/code resides./td tdNo/td + /tr + tr +tdfailonerror/td +tdStop the buildprocess if ss.exe exits with a returncode of 100. Defaults to true/td +tdNo/td /tr /table
DO NOT REPLY [Bug 12793] - VSSHISTORY fails against a label 30 chars
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12793. 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=12793 VSSHISTORY fails against a label 30 chars [EMAIL PROTECTED] changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2003-04-15 04:31 --- fixed in CVS
Re: FileUtils.createTempFile() - should we delete on exit?
On Tue, 15 Apr 2003 01:58 pm, Jesse Stockall wrote: Bug 17512 http://issues.apache.org/bugzilla/show_bug.cgi?id=17512 proposes a fix for an annoyance that 'plagues' a number of Ant tasks. Tasks like junit and javac can create temporary files that get left behind if the build is terminated via 'ctrl-c' Should the fix be applied to each task that creates temp files, or should it be put in FileUtils.createTempFile(). Since 1.6 will require JDK 1.2+ we can avoid the ugly reflection in the patch (attached to the bug report). Thoughts? +1 to a centralized cleanup of temp files. It may need to be an parameter, though. Conor
DO NOT REPLY [Bug 11562] - Extra options to set Timestamp on VSSGET
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11562. 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=11562 Extra options to set Timestamp on VSSGET [EMAIL PROTECTED] changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2003-04-15 04:32 --- fixed in CVS
DO NOT REPLY [Bug 14463] - VSSGET output
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14463. 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=14463 VSSGET output [EMAIL PROTECTED] changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2003-04-15 04:34 --- fixed in CVS
DO NOT REPLY [Bug 19018] New: - Using packagenames=* for javadoc fails in Java 1.4.1 for unnamed package
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19018. 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=19018 Using packagenames=* for javadoc fails in Java 1.4.1 for unnamed package Summary: Using packagenames=* for javadoc fails in Java 1.4.1 for unnamed package Product: Ant Version: 1.5.3 Platform: Macintosh OS/Version: Other Status: NEW Severity: Blocker Priority: Other Component: Core tasks AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Say I have the following simple javadoc task: target name=javadoc description=Create javadoc. property name=javadoc.window.title value=myweb API Documentation/ property name=javadoc.doc.title value=myweb API/ property name=javadoc.bottom.title value=Copyright #169; 2003 __MyCompanyName__. All Rights Reserved./ property name=javadoc.dist.dir value=ant.dist/javadoc/ property name=javadoc.excludepackagenames value=/ delete dir=${javadoc.dist.dir}/ mkdir dir=${javadoc.dist.dir}/ javadoc destdir=${javadoc.dist.dir} packagenames=* excludepackagenames=${javadoc.excludepackagenames} sourcepathref=javadoc.src.dir author=true version=true windowtitle=${javadoc.window.title} doctitle=${javadoc.doc.title} bottom=${javadoc.bottom.title} classpath refid=module.classpath/ /javadoc /target This usually works in both Java 1.3.1 and 1.4.1. There is a pretty common case when it fails only in 1.4.1: when you have classes that are in unnamed package. The error is: javadoc: [delete] Deleting directory /tmp/myweb/ant.dist/javadoc [mkdir] Created dir: /tmp/myweb/ant.dist/javadoc [javadoc] Generating Javadoc [javadoc] Javadoc execution [javadoc] javadoc: Illegal package name: [javadoc] Loading source files for package hello... [javadoc] 1 error For some reason, when there is unnamed package, is passed to javadoc. It used to work in 1.3.1. Passing * should work for 1.3.1 and 1.4.1.
Re: FileUtils.createTempFile() - should we delete on exit?
On Mon, 14 Apr 2003, Jesse Stockall [EMAIL PROTECTED] wrote: Should the fix be applied to each task that creates temp files, or should it be put in FileUtils.createTempFile(). The later (and I agree with Conor on the optional additional argument). Stefan
Test failures (Gump is coming to tell us anyway ...)
Like for Jesse, testTailSkip and testTailLinesSkip fail on Linux for me, I bet it is a line ending problem. As the nightly Gump build is performed on Linux as well, we are going to get nagged. In addition, testScriptFilter fails. It seems as if the new filter was using the old IBM BSF package names, while the rest of Ant has switched to Apache BSF. The later is on my CLASSPATH, so bsf.present gets set and the test is run, but fails due to a java.lang.NoClassDefFoundError: com/ibm/bsf/util/BSFEngineImpl. I'll try to look into them later today but wouldn't mind if anybody else was faster 8-) Stefan
DO NOT REPLY [Bug 18995] - Feature Request: zip task and/or fileset data type to support nested mapper elements
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18995. 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=18995 Feature Request: zip task and/or fileset data type to support nested mapper elements [EMAIL PROTECTED] changed: What|Removed |Added Severity|Normal |Enhancement
AW: Test failures (Gump is coming to tell us anyway ...)
First two comes from me. But I think this is a common problem. Especially in the filter section the (rare) testcases follow these steps: 1. provide an input file -- platform dependend line endings (where was it written) 2. modify it via Ant -- on which platform runs this test 3. result must be equal to an expected result file -- like 1. Three solutions come into my mind: I. Prepare the provided files (1+3) with fixcrlf, so that they have the line endings on the test-platform. II. Define a standard platform (e.g. Linux). Prepare the testresult (2) after the test run with fixcrlf, so that they have the line endings according to the standard platform. III. The implementation for step 3 is usually done with executeTarget(testXXX); File expected = getProject().resolveFile(expected/EXPECTED); File result = getProject().resolveFile(result/RESULT); FileUtils fu = FileUtils.newFileUtils(); assertTrue(fu.contentEquals(expected, result)); So we can modify the contentEquals so that it ignores the line separators. (Or create a new method doing so, contentEqualsIgnoreLineEndings()). comment? Jan Matèrne -Ursprüngliche Nachricht- Von: Stefan Bodewig [mailto:[EMAIL PROTECTED] Gesendet am: Dienstag, 15. April 2003 08:39 An: [EMAIL PROTECTED] Betreff: Test failures (Gump is coming to tell us anyway ...) Like for Jesse, testTailSkip and testTailLinesSkip fail on Linux for me, I bet it is a line ending problem. As the nightly Gump build is performed on Linux as well, we are going to get nagged. In addition, testScriptFilter fails. It seems as if the new filter was using the old IBM BSF package names, while the rest of Ant has switched to Apache BSF. The later is on my CLASSPATH, so bsf.present gets set and the test is run, but fails due to a java.lang.NoClassDefFoundError: com/ibm/bsf/util/BSFEngineImpl. I'll try to look into them later today but wouldn't mind if anybody else was faster 8-) Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 19025] New: - war task issues unnecessary warning
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19025. 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=19025 war task issues unnecessary warning Summary: war task issues unnecessary warning Product: Ant Version: 1.5.1 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Core tasks AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] war destfile=dist/expasy-services.war basedir=web webxml=web/WEB-INF/web.xml excludesfile=web/WEB-INF/web.xml update=no ... /war - [war] Warning: selected war files include a WEB-INF/web.xml which will be ignored (please use webxml attribute to war task)
[GUMP] Test Failure - Ant
This email is autogenerated from the output from: http://cvs.apache.org/builds/gump/2003-04-15/test-ant.html Build results exceed maximum length. Please see URL above for details. Last 50 lines of build output follows. [junit] Testsuite: org.apache.tools.ant.CaseTest [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.081 sec [junit] Testsuite: org.apache.tools.ant.ImmutableTest [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 0.094 sec [junit] Testsuite: org.apache.tools.ant.IncludeTest [junit] Tests run: 12, Failures: 0, Errors: 0, Time elapsed: 0.325 sec [junit] Testsuite: org.apache.tools.ant.IntrospectionHelperTest [junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 0.154 sec [junit] Testsuite: org.apache.tools.ant.LoaderRefTest [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.569 sec [junit] Testsuite: org.apache.tools.ant.ProjectTest [junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 0.111 sec [junit] Testsuite: org.apache.tools.ant.PropertyExpansionTest [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.019 sec [junit] Testsuite: org.apache.tools.ant.TopLevelTaskTest [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.15 sec [junit] Testsuite: org.apache.tools.ant.TaskContainerTest [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.451 sec [junit] Testsuite: org.apache.tools.zip.AsiExtraFieldTest [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.016 sec [junit] Testsuite: org.apache.tools.zip.ExtraFieldUtilsTest [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.026 sec [junit] Testsuite: org.apache.tools.zip.ZipEntryTest [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.032 sec [junit] Testsuite: org.apache.tools.zip.ZipLongTest [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.004 sec [junit] Testsuite: org.apache.tools.zip.ZipShortTest [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.005 sec [junit] Testsuite: org.apache.tools.tar.TarEntryTest [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.031 sec BUILD FAILED /home/rubys/jakarta/ant/build.xml:1589: At least one test has failed. Total time: 5 minutes 19 seconds
cvs commit: ant/docs breadcrumbs.js
bodewig 2003/04/15 04:08:37 Modified:docs breadcrumbs.js Log: Make breadcrumbs work on IE 5 for MacOS. Submitted by: fritz fritz at lateral dot net Revision ChangesPath 1.2 +10 -0 ant/docs/breadcrumbs.js Index: breadcrumbs.js === RCS file: /home/cvs/ant/docs/breadcrumbs.js,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- breadcrumbs.js24 Jan 2003 08:55:01 - 1.1 +++ breadcrumbs.js15 Apr 2003 11:08:36 - 1.2 @@ -62,6 +62,16 @@ [EMAIL PROTECTED]1.0 */ +/** + * IE 5 on Mac doesn't know Array.push. + * + * Implement it - courtesy to fritz. + */ +var abc = new Array(); +if (!abc.push) { + Array.prototype.push = function(what){this[this.length]=what} +} + /* CONSTANTS */
cvs commit: ant/src/testcases/org/apache/tools/ant/filters TokenFilterTest.java
bodewig 2003/04/15 06:19:41 Modified:src/etc/testcases/filters tokenfilter.xml src/testcases/org/apache/tools/ant/filters TokenFilterTest.java Log: Beanshell and Apache BSF don't like each other. As the test is going to use Javascript anyway, the check whether scripting is available should do so, too. In particular, the test will now checke whether Rhino is there, which the old test didn't. Remove excess logging that lead me to think the test was failing instead of skipped. Revision ChangesPath 1.2 +1 -1 ant/src/etc/testcases/filters/tokenfilter.xml Index: tokenfilter.xml === RCS file: /home/cvs/ant/src/etc/testcases/filters/tokenfilter.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- tokenfilter.xml 14 Apr 2003 18:02:24 - 1.1 +++ tokenfilter.xml 15 Apr 2003 13:19:41 - 1.2 @@ -297,7 +297,7 @@ /target target name=hasscript -script language=beanshell +script language=javascript i = 1; /script /target 1.2 +0 -1 ant/src/testcases/org/apache/tools/ant/filters/TokenFilterTest.java Index: TokenFilterTest.java === RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/filters/TokenFilterTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- TokenFilterTest.java 14 Apr 2003 18:02:24 - 1.1 +++ TokenFilterTest.java 15 Apr 2003 13:19:41 - 1.2 @@ -238,7 +238,6 @@ catch (Throwable ex) { System.out.println( test + : skipped - script not present ); -ex.printStackTrace(System.out); return false; } return true;
Re: cvs commit: ant/xdocs contributors.xml
On 15 Apr 2003, [EMAIL PROTECTED] wrote: Add myself to contributors list Welcome! again, future commit mails should go by without further delay. Stefan
Re: cvs commit: ant/xdocs contributors.xml
Thanks for the welcome. Antoine - Original Message - From: Stefan Bodewig [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, April 15, 2003 3:46 PM Subject: Re: cvs commit: ant/xdocs contributors.xml On 15 Apr 2003, [EMAIL PROTECTED] wrote: Add myself to contributors list Welcome! again, future commit mails should go by without further delay. Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DynamicTag
Interesting... So how come DynamicTag is not compatible with Ant 1.6, when it compiles and works fine with 1.5.1??? Sounds like an incompatible API change to me, which hopefully will be fixed. I have a few remarks: 1) I favor composition over inheritance. DynamicTag is designed to be composed, either directly, or has a helper (my latest email). But your implementation could easily be refactored a bit to also favor composition instead of inheritance. 2) DynamicTag is lazy, thanks to UnknownElement. Your rewrite is creating the element at parse-time, my implementation does it only at runtime. Again, I favor delaying the instantiation and configuration. Ant should never have mingled parsing of the XML and instantiation of the model in the first place. 3) I'm not sure what your point #2 would not be addresses by DynamicTag. Thanks to UnknownElement, all nested elements of a DynamicTag are resolved according to the same exact semantic as everything in Ant. I much prefer to rely on Ant's (much convoluted black-box) existing mechanism than invent my own, partly because I didn't want to go into reflection (I'm a bit adverse to it), and partly because it makes it more difficult to be adopted by Ant. 4) DynamicTag enforces the cardinality of the nested dynamic elements for free. That's a nice goodie, but granted, more sugar than real useful. 5) Your point #4 is the new feature over DynamicTag as I understand it. I'm not too sure it's better syntactically than explicitly having (composing) several nested elements, each being a dynamic tag of a different type. Your rewrite does add new reflection 'rules', making stuff happen auto-magically thru reflection. I'm not saying it's bad, I'm pointing out it adds some, when DynamicTag doesn't. All that said, you achieve a similar effect, which is what I really care about. If Ant wants to implement this feature still a third way, I'll all for it, provided the feature is available. At least now there are two proposals for it ;-) Something that I wish Ant added was the notion of 'role', to partition the task/type namespace. Both our proposals rely on taskdef/typedef to register the extension points. But a custom selector, a custom filter, a custom mapper, a custom buildpath (in my case) all share the same type or task namespace (the mapping from element name to class name). There are currently two distinct namespaces, one for tasks, and one for types, and Costin says I'd like to merge the two, when I actually would prefer to have N namespaces, each indexed/keyed by a 'role' string. When a task explicitly declares to accept within it selectors for example, it simply declares it wants instances implementing FileSelector.class from the selectors namespace. So the namespace used to resolve the element name to the classname is explicit, rather than implicit, first trying the tasks namespace, and then trying the types namespace. Classes can of course belong to more than one namespace; tahoeresolver could be both a type (types namespace), so it can be declared outside buildpath and refid'd, but it's also a BuildPathResolver.class, of the buildpath/resolvers user-defined (and documented) namespace). I believe one (or both) of the Ant2 proposals had the notion of role, and it's also well defined in Avalon Phoenix, so this is nothing new indeed. Thanks Peter for your interest in this area. I hope others will also look into it. Cheers, --DD -Original Message- From: peter reilly [mailto:[EMAIL PROTECTED] Sent: Monday, April 14, 2003 6:50 PM To: [EMAIL PROTECTED] Subject: RE: DynamicTag Hi, I am on holidays, but have followed this thread. I have been playing with DynamicTag and it is quite neat, but there are some issues with it.. I have made some modifications (well rewrite...) 1) DynamicTag uses UnknownElement. This part of ant code is undergoing a number of changes at the moment, and currently DynamicTag does not work with cvs ant. I extracted the stuff that unknownelement does and placed them in a method, this is compatible with apr12 ant cvs and with ant 1.5.x (tested with 1.5.2). 2) I would like to have dynamic tag behavior on the the current task as well as nested elements. 3) I would like to use reflection in the same way as ant uses reflection for setters and creators. 4) I would like to support multiple dynamic types in the same class. I initially considered using only datatypes, but on consideration it does make sense to have tasks as well. The problems with this are: a) tasks that do not extend ant.task get wrapped by ant.taskadapter which may not be what is expected b) tasks have a more complex life cycle that datatypes (init, perform, execute methods) Attached are two files : DynamicElementHelper and DynamicElementTask. Tasks and Datatypes/Sub-elements extend DynamicElementTask. The signature dynamicElement(Type) is used to indicate the type that this method will handle. DynamicElementTask implements
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/vss MSVSS.java
jesse 2003/04/15 08:12:42 Modified:src/main/org/apache/tools/ant/taskdefs/optional/vss MSVSS.java Log: Make it work with JDK 1.2 Revision ChangesPath 1.30 +3 -3 ant/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java Index: MSVSS.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- MSVSS.java15 Apr 2003 04:26:51 - 1.29 +++ MSVSS.java15 Apr 2003 15:12:42 - 1.30 @@ -720,10 +720,10 @@ */ private String formatCommandLine(Commandline cmd) { StringBuffer sBuff = new StringBuffer(cmd.toString()); -int indexUser = sBuff.indexOf(FLAG_LOGIN); +int indexUser = sBuff.substring(0).indexOf(FLAG_LOGIN); if (indexUser 0) { -int indexPass = sBuff.indexOf(,, indexUser); -int indexAfterPass = sBuff.indexOf( , indexPass); +int indexPass = sBuff.substring(0).indexOf(,, indexUser); +int indexAfterPass = sBuff.substring(0).indexOf( , indexPass); for (int i = indexPass + 1; i indexAfterPass; i++) { sBuff.setCharAt(i, '*');
Re: cvs commit: ant/src/etc/testcases/taskdefs/optional/vss vss.xml
On Tuesday, April 15, 2003, at 02:09 AM, Stefan Bodewig wrote: On 15 Apr 2003, [EMAIL PROTECTED] wrote: jesse 2003/04/14 21:26:52 Modified: src/main/org/apache/tools/ant/taskdefs/optional/vss MSVSS.java This makes the VSS tasks JDK 1.4 dependent. Oops, It's fixed now. Jesse Stockall - [EMAIL PROTECTED] CRYPTOCard Corp.
cvs commit: ant build.xml
umagesh 2003/04/15 08:21:48 Modified:.build.xml Log: HeadTailTest reportedly fails on Mac OS-X and Linux. A correct solution is probably to address PR 18476. Acknowledging this issue while working on a fix. Revision ChangesPath 1.365 +1 -0 ant/build.xml Index: build.xml === RCS file: /home/cvs/ant/build.xml,v retrieving revision 1.364 retrieving revision 1.365 diff -u -r1.364 -r1.365 --- build.xml 14 Apr 2003 18:02:23 - 1.364 +++ build.xml 15 Apr 2003 15:21:47 - 1.365 @@ -277,6 +277,7 @@ patternset id=teststhatfail exclude name=${optional.package}/BeanShellScriptTest.java/ exclude name=${ant.package}/taskdefs/ImportTest.java/ +exclude name=${ant.package}/filters/HeadTailTest.java/ /patternset !--
DO NOT REPLY [Bug 17844] - Standardized deployment files for Ant optional task jars (drag + drop tasks)
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17844. 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=17844 Standardized deployment files for Ant optional task jars (drag + drop tasks) --- Additional Comments From [EMAIL PROTECTED] 2003-04-15 16:15 --- Created an attachment (id=5838) query META-INF/taskdef/default.properties
cvs commit: ant/src/main/org/apache/tools/ant/types/selectors ExtendSelector.java
umagesh 2003/04/15 10:23:16 Modified:src/main/org/apache/tools/ant ComponentHelper.java IntrospectionHelper.java Main.java Project.java src/main/org/apache/tools/ant/filters/util ChainReaderHelper.java src/main/org/apache/tools/ant/types Mapper.java src/main/org/apache/tools/ant/types/selectors ExtendSelector.java Log: Refactor static method into a non-static version. Revision ChangesPath 1.5 +11 -5 ant/src/main/org/apache/tools/ant/ComponentHelper.java Index: ComponentHelper.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/ComponentHelper.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ComponentHelper.java 14 Apr 2003 17:21:25 - 1.4 +++ ComponentHelper.java 15 Apr 2003 17:23:15 - 1.5 @@ -65,12 +65,12 @@ import java.io.IOException; import java.lang.reflect.Modifier; -/** +/** * Component creation and configuration. * * This is cutpaste from Project.java of everything related to * task/type management. Project will just delegate. - * + * * A very simple hook mechnism is provided that allows users to plug * in custom code. It is also possible to replace the default behavior * ( for example in an app embeding ant ) @@ -407,7 +407,9 @@ try { Object o = c.newInstance(); -Project.setProjectOnObject(project, o); +if ( project != null ) { +project.setProjectReference( o ); +} Task task = null; if (o instanceof Task) { task = (Task) o; @@ -416,7 +418,9 @@ // and an Adapter TaskAdapter taskA = new TaskAdapter(); taskA.setProxy(o); -Project.setProjectOnObject(project, taskA); +if ( project != null ) { +project.setProjectReference( taskA ); +} task = taskA; } task.setTaskType(taskType); @@ -521,7 +525,9 @@ } else { o = ctor.newInstance(new Object[] {this}); } -Project.setProjectOnObject(project, o); +if ( project != null ) { +project.setProjectReference( o ); +} String msg =+DataType: + typeName; project.log(msg, Project.MSG_DEBUG); return o; 1.55 +125 -119 ant/src/main/org/apache/tools/ant/IntrospectionHelper.java Index: IntrospectionHelper.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/IntrospectionHelper.java,v retrieving revision 1.54 retrieving revision 1.55 diff -u -r1.54 -r1.55 --- IntrospectionHelper.java 14 Apr 2003 17:21:25 - 1.54 +++ IntrospectionHelper.java 15 Apr 2003 17:23:15 - 1.55 @@ -74,31 +74,31 @@ public class IntrospectionHelper implements BuildListener { /** - * Map from attribute names to attribute types + * Map from attribute names to attribute types * (String to Class). */ private Hashtable attributeTypes; /** - * Map from attribute names to attribute setter methods + * Map from attribute names to attribute setter methods * (String to AttributeSetter). */ private Hashtable attributeSetters; /** - * Map from attribute names to nested types + * Map from attribute names to nested types * (String to Class). */ private Hashtable nestedTypes; /** - * Map from attribute names to methods to create nested types + * Map from attribute names to methods to create nested types * (String to NestedCreator). */ private Hashtable nestedCreators; /** - * Map from attribute names to methods to store configured nested types + * Map from attribute names to methods to store configured nested types * (String to NestedStorer). */ private Hashtable nestedStorers; @@ -118,9 +118,9 @@ */ private static Hashtable helpers = new Hashtable(); -/** - * Map from primitive types to wrapper classes for use in - * createAttributeSetter (Class to Class). Note that char +/** + * Map from primitive types to wrapper classes for use in + * createAttributeSetter (Class to Class). Note that char * and boolean are in here even though they get special treatment * - this way we only need to test for the wrapper class. */ @@ -128,18 +128,18 @@
Re: cvs commit: ant/src/main/org/apache/tools/ant/types/selectors ExtendSelector.java
Pass 1 completed. Static method no longer used. ** * Etc.: A sign to make others believe that * * you know more than you actually do. * ** - Original Message - From: Conor MacNeill [EMAIL PROTECTED] To: Ant Developers List [EMAIL PROTECTED] Sent: Monday, April 14, 2003 8:05 PM Subject: Re: cvs commit: ant/src/main/org/apache/tools/ant/types/selectors ExtendSelector.java I have some questions about this patch On Tue, 15 Apr 2003 03:21 am, [EMAIL PROTECTED] wrote: +Project.setProjectOnObject(project, o); Why is this a static method rather than a plain method like this: project.setProjectOnObject(o); Why don't we define an interface for all things that can have a Project instance (Projectable :-)) rather than using reflection? It could be applied to ProjectComponent. Conor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 18956] - p4change task causes build to hang
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18956. 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=18956 p4change task causes build to hang [EMAIL PROTECTED] changed: What|Removed |Added AssignedTo|[EMAIL PROTECTED] |[EMAIL PROTECTED] Priority|Other |High Target Milestone|--- |1.6 --- Additional Comments From [EMAIL PROTECTED] 2003-04-15 19:12 --- I am going to apply the patch contained in this page to the head CVS revision, which should fix the problem in the next nightly build.
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/perforce P4HandlerAdapter.java
antoine 2003/04/15 12:16:05 Modified:src/main/org/apache/tools/ant/taskdefs/optional/perforce P4HandlerAdapter.java Log: fix bugrep 18956 p4change task causes build to hang Revision ChangesPath 1.11 +3 -2 ant/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4HandlerAdapter.java Index: P4HandlerAdapter.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4HandlerAdapter.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- P4HandlerAdapter.java 10 Feb 2003 14:14:19 - 1.10 +++ P4HandlerAdapter.java 15 Apr 2003 19:16:03 - 1.11 @@ -90,7 +90,8 @@ Thread error = new Thread(new Reader(es)); output.start(); error.start(); - +output.join(); +error.join(); } catch (Exception e) { throw new BuildException(e); } @@ -114,7 +115,7 @@ public void stop() { } - + public class Reader implements Runnable { protected InputStream mystream; public Reader(InputStream is)
cvs commit: ant build.sh
antoine 2003/04/15 12:56:20 Modified:.build.sh Log: fix bugrep 17257 build.sh install problem under cygwin Revision ChangesPath 1.32 +3 -0 ant/build.sh Index: build.sh === RCS file: /home/cvs/ant/build.sh,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- build.sh 18 Feb 2003 14:34:36 - 1.31 +++ build.sh 15 Apr 2003 19:56:20 - 1.32 @@ -54,6 +54,9 @@ if [ $REALANTHOME != ] ; then + if $cygwin; then + REALANTHOME=`cygpath --path --windows $REALANTHOME` + fi ANT_INSTALL=-Dant.install=$REALANTHOME else ANT_INSTALL=-emacs
DO NOT REPLY [Bug 17257] - build.sh install problem under cygwin
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17257. 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=17257 build.sh install problem under cygwin [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2003-04-15 19:59 --- change submitted
DO NOT REPLY [Bug 12143] - NoBannerLogger suppresses empty lines
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12143. 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=12143 NoBannerLogger suppresses empty lines [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||WORKSFORME --- Additional Comments From [EMAIL PROTECTED] 2003-04-15 21:05 --- Since I needed to write my own NoBannerLogger to better support the use of subant (and ant) to indicate the Project Path to the target, I implemented my own fix there. I got tired of seeing build: over and over for all the builds (nested at several levels) that I'm recursing into. --DD P:\acmebuild -f acme.xml Buildfile: acme.xml build:[acme/utils] Starting dependency analysis for 4 files. 4 files are up to date. 0 files to be recompiled from dependency analysis. 1 total files to be compiled. Starting link build:[acme/math] Starting dependency analysis for 4 files. 4 files are up to date. 0 files to be recompiled from dependency analysis. 1 total files to be compiled. Starting link build:[Plugin/ascii] Starting dependency analysis for 3 files. 3 files are up to date. 0 files to be recompiled from dependency analysis. 1 total files to be compiled. Starting link BUILD SUCCESSFUL Total time: 9 seconds
DO NOT REPLY [Bug 12143] - NoBannerLogger suppresses empty lines
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12143. 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=12143 NoBannerLogger suppresses empty lines --- Additional Comments From [EMAIL PROTECTED] 2003-04-15 21:06 --- Created an attachment (id=5845) NoBannerSubBuildLogger.java
junit.jar in Ant 1.5.3 distro?!?!?
Why is Ant 1.5.3 shipping with junit.jar in ANT_HOME/lib??? I don't see anything about it in WHATSNEW, nor a LICENSE.junit for that matter. Plus the Manifest of that JAR doesn't even say which version of JUnit it is, just that it was build using Ant 1.4.1 ;-) Thanks, --DD