[GUMP] Test Failure - Ant
This email is autogenerated from the output from: http://cvs.apache.org/builds/gump/2003-04-01/test-ant.html Buildfile: build.xml check_for_optional_packages: xml-check: dump-sys-properties: run-which: [which] # BEGIN: Which report [which] Which.version=Which.java:($Revision: 1.4 $) WhichJar.java:($Revision: 1.3 $) [which] Which.special-note=No -projects provided, using DEFAULT_PROJECTS [which] java.version=1.4.1_01 [which] file.encoding=ANSI_X3.4-1968 [which] java.ext.dirs=/usr/java/j2sdk1.4.1_01/jre/lib/ext [which] java.class.path=/home/rubys/jakarta/xml-xerces2/java/build/xmlParserAPIs.jar:/home/rubys/jakarta/xml-xerces2/java/build/xercesImpl.jar:/home/rubys/jakarta/xml-xalan/java/build/xalan.jar:/home/rubys/jakarta/xml-commons/java/external/build/xml-apis.jar:.:/usr/java/j2sdk1.4.1_01/lib/tools.jar:/usr/java/j2sdk1.4.1_01/jre/lib/rt.jar:/usr/java/j2sdk1.4.1_01/lib/tools.jar:/home/rubys/jakarta/ant/build/lib/ant-testutil.jar:/home/rubys/jakarta/xml-commons/java/build/which.jar:/home/rubys/jakarta/rhino/build/rhino_20030401/js.jar:/home/rubys/jakarta/beanshell/dist/bsh-20030401.jar:/home/rubys/jakarta/beanshell/dist/bsh-bsf-20030401.jar:/home/rubys/jakarta/beanshell/dist/bsh-classpath-20030401.jar:/home/rubys/jakarta/beanshell/dist/bsh-commands-20030401.jar:/home/rubys/jakarta/beanshell/dist/bsh-core-20030401.jar:/home/rubys/jakarta/beanshell/dist/bsh-reflect-20030401.jar:/home/rubys/jakarta/beanshell/dist/bsh-util-20030401.jar:/home/rubys/jakarta/jakarta-commons/logging/dist/commons-logging.jar:/home/rubys/jakarta/jakar [which] ta-commons/logging/dist/commons-logging-api.jar:/home/rubys/jakarta/jakarta-log4j/log4j-20030401.jar:/home/rubys/jakarta/jakarta-log4j/log4j-lf5-20030401.jar:/home/rubys/jakarta/jakarta-log4j/log4j-chainsaw-20030401.jar:/home/rubys/jakarta/xml-stylebook/bin/stylebook-1.0-b3_xalan-2.jar:/home/rubys/jakarta/jakarta-oro/jakarta-oro-20030401.jar:/home/rubys/jakarta/xml-commons/java/build/resolver.jar:/home/rubys/jakarta/jakarta-bcel/bin/bcel.jar:/opt/javamail-1.2/mail.jar:/opt/jaf-1.0.1/activation.jar:/opt/jdepend/lib/jdepend.jar:/home/rubys/jakarta/jakarta-commons/net/dist/commons-net-20030401.jar:/home/rubys/jakarta/jakarta-bsf/src/bsf-2.3/build/lib/bsf.jar:/home/rubys/jakarta/ant/dist/lib/ant.jar:/home/rubys/jakarta/ant/dist/lib/ant-jmf.jar:/home/rubys/jakarta/ant/dist/lib/ant-junit.jar:/home/rubys/jakarta/ant/dist/lib/ant-stylebook.jar:/home/rubys/jakarta/ant/dist/lib/ant-swing.jar:/home/rubys/jakarta/ant/dist/lib/ant-trax.jar:/home/rubys/jakarta/ant/dist/lib/ant-xalan2.jar:/home/rubys/jakarta/ant/dist/lib/nod [which] eps.jar:/home/rubys/jakarta/ant/build/lib/ant.jar:/home/rubys/jakarta/ant/build/lib/ant-antlr.jar:/home/rubys/jakarta/ant/build/lib/ant-apache-bsf.jar:/home/rubys/jakarta/ant/build/lib/ant-apache-resolver.jar:/home/rubys/jakarta/ant/build/lib/ant-bcel.jar:/home/rubys/jakarta/ant/build/lib/ant-commons-logging.jar:/home/rubys/jakarta/ant/build/lib/ant-commons-net.jar:/home/rubys/jakarta/ant/build/lib/ant-jakarta-regexp.jar:/home/rubys/jakarta/ant/build/lib/ant-javamail.jar:/home/rubys/jakarta/ant/build/lib/ant-jdepend.jar:/home/rubys/jakarta/ant/build/lib/ant-jmf.jar:/home/rubys/jakarta/ant/build/lib/ant-jsch.jar:/home/rubys/jakarta/ant/build/lib/ant-junit.jar:/home/rubys/jakarta/ant/build/lib/ant-log4j.jar:/home/rubys/jakarta/ant/build/lib/ant-oro.jar:/home/rubys/jakarta/ant/build/lib/ant-stylebook.jar:/home/rubys/jakarta/ant/build/lib/ant-swing.jar:/home/rubys/jakarta/ant/build/lib/ant-trax.jar:/home/rubys/jakarta/ant/build/lib/ant-xalan2.jar:/home/rubys/jakarta/ant/build/lib/nodeps.jar:/opt/antlr-2.7.2/antlra [which] ll.jar:/opt/antlr-2.7.2/antlr.jar:/home/rubys/jakarta/ant/bootstrap/lib/ant.jar:/home/rubys/jakarta/jakarta-servletapi-4/lib/servlet.jar:/opt/jsch-0.1.2/dist/lib/jsch-gump.jar:/home/rubys/jakarta/dist/junit/junit.jar:/home/rubys/jakarta/jakarta-tomcat-4.0/dist/common/lib/jasper-compiler.jar:/home/rubys/jakarta/jakarta-tomcat-4.0/dist/common/lib/jasper-runtime.jar:/home/rubys/jakarta/jakarta-regexp/bin/jakarta-regexp-20030401.jar:/home/rubys/jakarta/ant/build/testcases:/home/rubys/jakarta/ant/src/testcases:/home/rubys/jakarta/ant/src/etc/testcases [which] Which.status=.ok-present [which] os.name=Linux [which] java.vendor=Sun Microsystems Inc. [which] sun.boot.class.path=/home/rubys/jakarta/xml-commons/java/external/build/xml-apis.jar:/home/rubys/jakarta/xml-xalan/java/build/xalan.jar:/home/rubys/jakarta/xml-xerces2/java/build/xercesImpl.jar:/home/rubys/jakarta/xml-xerces2/java/build/xmlParserAPIs.jar:/usr/java/j2sdk1.4.1_01/jre/lib/rt.jar:/usr/java/j2sdk1.4.1_01/jre/lib/i18n.jar:/usr/java/j2sdk1.4.1_01/jre/lib/sunrsasign.jar:/usr/java/j2sdk1.4.1_01/jre/lib/jsse.jar:/usr/java/j2sdk1.4.1_01/jre/lib/jce.jar:/usr/java/j2sdk1.4.1_01/jre/lib/charsets.jar:/usr/java/j2sdk1.4.1_01/jre
Re: [GUMP] Test Failure - Ant
This is bug 17807, I knew it would happen, I'll take care of it http://issues.apache.org/bugzilla/show_bug.cgi?id=17807 Stefan
Re: cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional ANTLRTest.java
Note that test8 is now going to fail. test8 expects a BuildException to be thrown because the supergrammar file didn't exist. The real reason for the exception that has been thrown so far was that the outputdirectory didn't exist, I've fixed that. Now antlr will pront a warning error: file non-existant-file.g not found but return with an exit code of 0 so the task doesn't see an error. We will have to parse the output, I'm afraid. I wonder whether the now modified test would have passed with ANTLR 2.7.1 or whether it has been broken since its creation. Stefan
DO NOT REPLY [Bug 17807] - antlr test fails
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=17807. 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=17807 antlr test fails [EMAIL PROTECTED] changed: What|Removed |Added CC||[EMAIL PROTECTED] AssignedTo|[EMAIL PROTECTED] |[EMAIL PROTECTED] Target Milestone|--- |1.6 --- Additional Comments From [EMAIL PROTECTED] 2003-04-01 11:05 --- If you use ./configure; make antlrall.jar on Unix for ANTLR 2.7.2, things work except for test10. I've now fixed test10 but broken test8 (by showing that it doesn't work, at least not for ANTL 2.7.2).
DO NOT REPLY [Bug 17807] - antlr test fails
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=17807. 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=17807 antlr test fails --- Additional Comments From [EMAIL PROTECTED] 2003-04-01 11:06 --- Should have been make antlr-all.jar and use the resulting antlrall.jar, sorry.
DO NOT REPLY [Bug 17807] - antlr test fails
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=17807. 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=17807 antlr test fails --- Additional Comments From [EMAIL PROTECTED] 2003-04-01 11:08 --- For 2.7.1, Tilman, have you followed the comments at the top of the testcase?
cvs commit: ant/src/main/org/apache/tools/ant/types DataType.java
conor 2003/04/01 03:25:26 Modified:src/main/org/apache/tools/ant RuntimeConfigurable.java src/main/org/apache/tools/ant/types DataType.java Log: Small cleanup Revision ChangesPath 1.26 +26 -23 ant/src/main/org/apache/tools/ant/RuntimeConfigurable.java Index: RuntimeConfigurable.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/RuntimeConfigurable.java,v retrieving revision 1.25 retrieving revision 1.26 diff -u -w -u -r1.25 -r1.26 --- RuntimeConfigurable.java 7 Mar 2003 11:22:59 - 1.25 +++ RuntimeConfigurable.java 1 Apr 2003 11:25:26 - 1.26 @@ -61,9 +61,7 @@ import java.io.Serializable; import org.xml.sax.AttributeList; -import org.xml.sax.Attributes; import org.xml.sax.helpers.AttributeListImpl; -import org.xml.sax.helpers.AttributesImpl; /** * Wrapper class that holds the attributes of an element, its children, and @@ -76,15 +74,19 @@ /** Name of the element to configure. */ private String elementTag = null; + /** List of child element wrappers. */ private Vector children = new Vector(); + /** The element to configure. It is only used during * maybeConfigure. */ private transient Object wrappedObject = null; -/** @@deprecated - * XML attributes for the element. */ +/** + * @deprecated + * XML attributes for the element. + */ private transient AttributeList attributes; /** Attribute names and values. While the XML spec doesn't require @@ -93,12 +95,14 @@ * We could also just use SAX2 Attributes and convert to SAX1 ( DOM * attribute Nodes can also be stored in SAX2 Attributges ) */ -private Vector attNames=new Vector(); -private Vector attValues=new Vector(); -private Hashtable attMap=new Hashtable(); +private Vector attributeNames = new Vector(); + +/** Map of attribute names to values */ +private Hashtable attributeMap = new Hashtable(); /** Text appearing within the element. */ private StringBuffer characters = new StringBuffer(); + /** Indicates if the wrapped object has been configured */ private boolean proxyConfigured = false; @@ -114,9 +118,10 @@ this.elementTag = elementTag; proxyConfigured = false; // Most likely an UnknownElement -if( proxy instanceof Task ) +if (proxy instanceof Task) { ((Task)proxy).setRuntimeConfigurableWrapper( this ); } +} /** * Sets the element to configure. @@ -142,14 +147,13 @@ public void setAttributes(AttributeList attributes) { this.attributes = new AttributeListImpl(attributes); for (int i = 0; i attributes.getLength(); i++) { -this.setAttribute( attributes.getName(i), attributes.getValue(i)); +setAttribute(attributes.getName(i), attributes.getValue(i)); } } public void setAttribute( String name, String value ) { -attNames.addElement( name ); -attValues.addElement( value ); -attMap.put( name, value ); +attributeNames.addElement(name); +attributeMap.put(name, value); } /** Return the attribute map. @@ -157,7 +161,7 @@ * @return Attribute name to attribute value map */ public Hashtable getAttributeMap() { -return attMap; +return attributeMap; } /** @@ -286,8 +290,7 @@ *an element which doesn't accept it. */ public void maybeConfigure(Project p, boolean configureChildren) -throws BuildException -{ +throws BuildException { String id = null; if (proxyConfigured) { @@ -302,9 +305,9 @@ IntrospectionHelper ih = IntrospectionHelper.getHelper(p, target.getClass()); -for( int i=0; i attNames.size(); i++ ) { -String name=(String) attNames.elementAt(i); -String value=(String) attValues.elementAt(i); +for (int i = 0; i attributeNames.size(); i++) { +String name = (String) attributeNames.elementAt(i); +String value = (String) attributeMap.get(name); // reflect these into the target value = p.replaceProperties(value); @@ -318,7 +321,7 @@ } } } -id = (String)attMap.get(id); +id = (String) attributeMap.get(id); if (characters.length() != 0) { ProjectHelper.addText(p, wrappedObject, characters.toString()); 1.12 +1 -1 ant/src/main/org/apache/tools/ant/types/DataType.java Index:
[Patch] for antlib proposal (sorry attachment was incomplete in previous email)
Sorry, in my previous email the attachment did not contain the patches for Antlib and Antjar. In order to keep the antlib proposal of Jose-Alberto Fernandez compatible with the current head revision of ant, I have prepared a patch. The patch addresses mainly changes in : - Project.java - Zip.java (to make the Antjar task still work) It does not affect the proposal "semantically" Please submit quickly if you can to allow work on this proposal to resume. Yours Antoine Index: proposal/sandbox/antlib/src/main/org/apache/tools/ant/Project.java === RCS file: /home/cvspublic/ant/proposal/sandbox/antlib/src/main/org/apache/tools/ant/Project.java,v retrieving revision 1.4 diff -u -r1.4 Project.java --- proposal/sandbox/antlib/src/main/org/apache/tools/ant/Project.java 3 Mar 2002 12:37:13 - 1.4 +++ proposal/sandbox/antlib/src/main/org/apache/tools/ant/Project.java 1 Apr 2003 11:26:28 - @@ -61,7 +61,6 @@ import java.util.Properties; import java.util.Enumeration; import java.util.Stack; -import java.lang.reflect.Modifier; import java.lang.reflect.Method; import java.lang.reflect.InvocationTargetException; @@ -70,8 +69,10 @@ import org.apache.tools.ant.types.FilterSet; import org.apache.tools.ant.types.FilterSetCollection; import org.apache.tools.ant.util.FileUtils; +import org.apache.tools.ant.util.LazyHashtable; import org.apache.tools.ant.types.Path; import org.apache.tools.ant.taskdefs.Antlib; +import org.apache.tools.ant.input.InputHandler; /** * Central representation of an Ant project. This class defines a Ant project @@ -165,13 +166,16 @@ private String name; private String description; +/** Map of references within the project (paths etc) (String to Object). */ private Hashtable properties = new Hashtable(); private Hashtable userProperties = new Hashtable(); -private Hashtable references = new Hashtable(); +private Hashtable references = new AntRefTable(this); private String defaultTarget; -//private Hashtable dataClassDefinitions = new Hashtable(); -//private Hashtable taskClassDefinitions = new Hashtable(); +/** Map from data type names to implementing classes (String to Class). */ +private Hashtable dataClassDefinitions = new AntTaskTable(this, false); +/** Map from task names to implementing classes (String to Class). */ +private Hashtable taskClassDefinitions = new AntTaskTable(this, true); private Hashtable createdTasks = new Hashtable(); private Hashtable targets = new Hashtable(); private FilterSet globalFilterSet = new FilterSet(); @@ -185,11 +189,13 @@ */ private ClassLoader coreLoader = null; -/** - * Records the latest task on a thread - */ +/** Records the latest task to be executed on a thread (Thread to Task). */ private Hashtable threadTasks = new Hashtable(); +/** Records the latest task to be executed on a thread Group. */ +private Hashtable threadGroupTasks = new Hashtable(); + + /** * Store symbol tables */ @@ -219,6 +225,48 @@ } } +/** + * Called to handle any input requests. + */ +private InputHandler inputHandler = null; + +/** + * The default input stream used to read any input + */ +private InputStream defaultInputStream = null; + +/** + * Sets the input handler + * + * @param handler the InputHandler instance to use for gathering input. + */ +public void setInputHandler(InputHandler handler) { +inputHandler = handler; +} + +/** + * Set the default System input stream. Normally this stream is set to + * System.in. This inputStream is used when no task inptu redirection is + * being performed. + * + * @param defaultInputStream the default input stream to use when input + *is reuested. + * @since Ant 1.6 + */ +public void setDefaultInputStream(InputStream defaultInputStream) { +this.defaultInputStream = defaultInputStream; +} + +/** + * Retrieves the current input handler. + * + * @return the InputHandler instance currently in place for the project + * instance. + */ +public InputHandler getInputHandler() { +return inputHandler; +} + private FileUtils fileUtils; @@ -302,12 +350,17 @@ private void autoLoadDefinitions() { DirectoryScanner ds = new DirectoryScanner(); -ds.setBasedir(new File(getProperty(ant.home),autolib)); -ds.scan(); -String dirs[] = ds.getIncludedDirectories(); -for (int i = 0; i dirs.length; i++) { -autoLoad(ds.getBasedir(), dirs[i]); -} +try { +File autolib=new File(getProperty(ant.home),autolib); +log(scanning the autolib directory +autolib.toString(),MSG_DEBUG); +ds.setBasedir(autolib); +
cvs commit: ant/proposal/sandbox/antlib/src/main/org/apache/tools/ant IntrospectionHelper.java Project.java
bodewig 2003/04/01 03:35:07 Modified:proposal/sandbox/antlib/src/main/org/apache/tools/ant IntrospectionHelper.java Project.java Log: Sync with main code line Revision ChangesPath 1.4 +451 -182 ant/proposal/sandbox/antlib/src/main/org/apache/tools/ant/IntrospectionHelper.java Index: IntrospectionHelper.java === RCS file: /home/cvs/ant/proposal/sandbox/antlib/src/main/org/apache/tools/ant/IntrospectionHelper.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- IntrospectionHelper.java 7 Mar 2003 11:22:58 - 1.3 +++ IntrospectionHelper.java 1 Apr 2003 11:35:06 - 1.4 @@ -1,7 +1,7 @@ /* * The Apache Software License, Version 1.1 * - * Copyright (c) 2000-2001 The Apache Software Foundation. All rights + * Copyright (c) 2000-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,7 +23,7 @@ *Alternately, this acknowlegement may appear in the software itself, *if and wherever such third-party acknowlegements normally appear. * - * 4. The names The Jakarta Project, Ant, and Apache Software + * 4. The names Ant and Apache Software *Foundation must not be used to endorse or promote products derived *from this software without prior written permission. For written *permission, please contact [EMAIL PROTECTED] @@ -54,16 +54,15 @@ package org.apache.tools.ant; -import org.apache.tools.ant.types.Path; -import org.apache.tools.ant.types.EnumeratedAttribute; - -import java.lang.reflect.Method; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Constructor; import java.io.File; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; import java.util.Enumeration; import java.util.Hashtable; import java.util.Locale; +import org.apache.tools.ant.types.EnumeratedAttribute; +import org.apache.tools.ant.types.Path; /** * Helper class that collects the methods a task or nested element @@ -75,45 +74,125 @@ public class IntrospectionHelper implements BuildListener { /** - * holds the types of the attributes that could be set. + * Map from attribute names to attribute types + * (String to Class). */ private Hashtable attributeTypes; /** - * holds the attribute setter methods. + * Map from attribute names to attribute setter methods + * (String to AttributeSetter). */ private Hashtable attributeSetters; /** - * Holds the types of nested elements that could be created. + * Map from attribute names to nested types + * (String to Class). */ private Hashtable nestedTypes; /** - * Holds methods to create nested elements. + * Map from attribute names to methods to create nested types + * (String to NestedCreator). */ private Hashtable nestedCreators; /** - * Holds methods to store configured nested elements. + * Map from attribute names to methods to store configured nested types + * (String to NestedStorer). */ private Hashtable nestedStorers; /** - * The method to add PCDATA stuff. + * The method to invoke to add PCDATA. */ private Method addText = null; /** - * The Class that's been introspected. + * The class introspected by this instance. */ private Class bean; /** - * instances we've already created + * Helper instances we've already created (Class to IntrospectionHelper). */ private static Hashtable helpers = new Hashtable(); +/** + * 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. + */ +private static final Hashtable PRIMITIVE_TYPE_MAP = new Hashtable(8); + +// Set up PRIMITIVE_TYPE_MAP +static { +Class[] primitives = {Boolean.TYPE, Byte.TYPE, Character.TYPE, + Short.TYPE, Integer.TYPE, Long.TYPE, + Float.TYPE, Double.TYPE}; +Class[] wrappers = {Boolean.class, Byte.class, Character.class, +Short.class, Integer.class, Long.class, +Float.class, Double.class}; +for (int i = 0; i primitives.length; i++) { +PRIMITIVE_TYPE_MAP.put (primitives[i], wrappers[i]); +} +}
cvs commit: ant/proposal/sandbox/antlib/src/main/org/apache/tools/ant/taskdefs Antjar.java Antlib.java
bodewig 2003/04/01 03:38:30 Modified:proposal/sandbox/antlib/src/main/org/apache/tools/ant/taskdefs Antjar.java Antlib.java Log: Part 2 of Antoine's patch Revision ChangesPath 1.5 +6 -8 ant/proposal/sandbox/antlib/src/main/org/apache/tools/ant/taskdefs/Antjar.java Index: Antjar.java === RCS file: /home/cvs/ant/proposal/sandbox/antlib/src/main/org/apache/tools/ant/taskdefs/Antjar.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Antjar.java 7 Mar 2003 11:22:59 - 1.4 +++ Antjar.java 1 Apr 2003 11:38:30 - 1.5 @@ -1,7 +1,7 @@ /* * The Apache Software License, Version 1.1 * - * Copyright (c) 2000 The Apache Software Foundation. All rights + * Copyright (c) 2000,2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -53,15 +53,12 @@ */ package org.apache.tools.ant.taskdefs; -import org.xml.sax.*; -import javax.xml.parsers.*; import org.apache.tools.ant.*; import org.apache.tools.ant.types.ZipFileSet; import org.apache.tools.zip.*; import java.io.*; -import java.util.*; /** * Creates a ANTLIB archive. Code is similar to the War class, but with @@ -129,7 +126,7 @@ // If no antxml file is specified, it's an error. if (libraryDescriptor == null) { throw new BuildException(antxml attribute is required, - location); + getLocation()); } super.initZipOutputStream(zOut); @@ -142,9 +139,10 @@ * @param file file to add * @param zOut stream to add to * @param vPath the path to add it to in the zipfile + * @param mode the Unix permissions to set. * @exception IOException io trouble */ -protected void zipFile(File file, ZipOutputStream zOut, String vPath) +protected void zipFile(File file, ZipOutputStream zOut, String vPath, int mode) throws IOException { // If the file being added is META-INF/antlib.xml, we warn if it's not the // one specified in the antxml attribute - or if it's being added twice, @@ -159,12 +157,12 @@ task), Project.MSG_WARN); } else { -super.zipFile(file, zOut, vPath); +super.zipFile(file, zOut, vPath, mode); descriptorAdded = true; } } else { -super.zipFile(file, zOut, vPath); +super.zipFile(file, zOut, vPath, mode); } } 1.6 +25 -31 ant/proposal/sandbox/antlib/src/main/org/apache/tools/ant/taskdefs/Antlib.java Index: Antlib.java === RCS file: /home/cvs/ant/proposal/sandbox/antlib/src/main/org/apache/tools/ant/taskdefs/Antlib.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Antlib.java 3 Mar 2002 12:37:41 - 1.5 +++ Antlib.java 1 Apr 2003 11:38:30 - 1.6 @@ -1,7 +1,7 @@ /* * The Apache Software License, Version 1.1 * - * Copyright (c) 1999 The Apache Software Foundation. All rights + * Copyright (c) 1999,2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -55,7 +55,6 @@ import org.apache.tools.ant.*; import org.apache.tools.ant.types.*; -import org.apache.tools.ant.taskdefs.*; import org.xml.sax.*; import javax.xml.parsers.*; @@ -108,10 +107,6 @@ */ private Path classpath = null; -/** - * the manufacture set of classes to load - */ -private Path loaderPath = null; /** * our little xml parse @@ -357,7 +352,7 @@ * Default is codetrue/code. * This property is mostly used by the core when loading core tasks. * - * @param failedonerror if true loading will stop if classes + * @param onerror if true loading will stop if classes * cannot be instantiated */ public void setOnerror(FailureAction onerror) { @@ -399,7 +394,7 @@ */ public Path createClasspath() { if (classpath == null) { -classpath = new Path(project); +classpath = new Path(getProject()); } return classpath.createPath(); } @@ -424,7 +419,7 @@ private File libraryFile(String homeSubDir, String lib) { // For the time being libraries live in $ANT_HOME/antlib. // The idea being that not to load all the jars
Re: [Patch] for antlib proposal (sorry attachment was incomplete in previous email)
On Tue, 1 Apr 2003, Antoine Levy-Lambert [EMAIL PROTECTED] wrote: Please submit quickly if you can to allow work on this proposal to resume. Quick enough? Stefan
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh SSHExec.java
bodewig 2003/04/01 05:01:09 Modified:docs/manual/OptionalTasks scp.html sshexec.html src/main/org/apache/tools/ant/taskdefs/optional/ssh SSHExec.java Log: Make sshexec wait for the remote command to finish. Requires jsch-0.1.3 to work. Submitted by: Dale Anson danson at germane dash software dot com Revision ChangesPath 1.6 +1 -1 ant/docs/manual/OptionalTasks/scp.html Index: scp.html === RCS file: /home/cvs/ant/docs/manual/OptionalTasks/scp.html,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- scp.html 14 Mar 2003 15:10:26 - 1.5 +++ scp.html 1 Apr 2003 13:01:09 - 1.6 @@ -19,7 +19,7 @@ pbNote:/b This task depends on external libraries not included in the Ant distribution. See a href=../install.html#librarydependenciesLibrary Dependencies/a -for more information. This task has been tested with jsch-0.1.2./p +for more information. This task has been tested with jsch-0.1.2 and jsch-0.1.3./p h3Parameters/h3 table border=1 cellpadding=2 cellspacing=0 1.3 +23 -1 ant/docs/manual/OptionalTasks/sshexec.html Index: sshexec.html === RCS file: /home/cvs/ant/docs/manual/OptionalTasks/sshexec.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- sshexec.html 14 Mar 2003 15:10:27 - 1.2 +++ sshexec.html 1 Apr 2003 13:01:09 - 1.3 @@ -18,7 +18,7 @@ pbNote:/b This task depends on external libraries not included in the Ant distribution. See a href=../install.html#librarydependenciesLibrary Dependencies/a -for more information. This task has been tested with jsch-0.1.2./p +for more information. This task has been tested with jsch-0.1.3./p h3Parameters/h3 table border=1 cellpadding=2 cellspacing=0 @@ -79,6 +79,28 @@ td valign=toppassphrase/td td valign=topPassphrase for your private key./td td valign=top align=centerNo, defaults to an empty string./td + /tr + tr +td valign=topoutput/td +td valign=topName of a file to which to write the output./td +td align=center valign=topNo/td + /tr + tr +td valign=topappend/td +td valign=topWhether output file should be appended to or overwritten. Defaults to false, meaning overwrite any existing file./td +td align=center valign=topNo/td + /tr + tr +td valign=topoutputproperty/td +td valign=topThe name of a property in which the output of the + command should be stored./td +td align=center valign=topNo/td + /tr + tr +td valign=toptimeout/td +td valign=topStop the command if it doesn't finish within the + specified time (given in seconds). Defaults to 0 which means quot;wait foreverquot;./td +td align=center valign=topNo/td /tr /table 1.2 +195 -25 ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java Index: SSHExec.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- SSHExec.java 11 Mar 2003 13:15:43 - 1.1 +++ SSHExec.java 1 Apr 2003 13:01:09 - 1.2 @@ -56,14 +56,13 @@ import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; -import org.apache.tools.ant.Task; -import org.apache.tools.ant.TaskContainer; -import org.apache.tools.ant.taskdefs.LogOutputStream; - -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.util.Vector; -import java.util.Enumeration; + +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.io.OutputStream; +import java.io.StringReader; import com.jcraft.jsch.Channel; import com.jcraft.jsch.ChannelExec; @@ -71,14 +70,22 @@ /** * Executes a command on a remote machine via ssh. + * * @authorRobert Anderson, [EMAIL PROTECTED] + * @authorDale Anson, [EMAIL PROTECTED] + * @version $Revision$ * @created February 2, 2003 - * @since Ant 1.6 + * @since Ant 1.6 */ public class SSHExec extends SSHBase { -private String command = null; -private int maxwait = 3; +private String command = null; // the command to execute via ssh +private int maxwait = 0; // units are milliseconds, default is 0=infinite +private Thread thread = null; // for waiting for the command to finish + +private String output_property = null; // like exec +private File output_file = null; // like
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh SSHExec.java
bodewig 2003/04/01 05:09:28 Modified:src/main/org/apache/tools/ant/taskdefs/optional/ssh SSHExec.java Log: Compile, then commit! Revision ChangesPath 1.4 +1 -1 ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java Index: SSHExec.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- SSHExec.java 1 Apr 2003 13:05:25 - 1.3 +++ SSHExec.java 1 Apr 2003 13:09:28 - 1.4 @@ -170,7 +170,7 @@ try { // execute the command Session session = openSession(); -session.setTimeout(maxwait); +session.setTimeout((int) maxwait); final ChannelExec channel=(ChannelExec) session.openChannel(exec); channel.setCommand(command); channel.setOutputStream(tee);
Re: ssh exec task...
On 01 Apr 2003, Stefan Bodewig [EMAIL PROTECTED] wrote: The main difference (apart from formatting changes) are that timeout uses milliseconds as its value and defaults to 0 (like exec) Stefan
DO NOT REPLY [Bug 18563] New: - Inherited project field not initialised in custom implementations of FileSelector
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=18563. 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=18563 Inherited project field not initialised in custom implementations of FileSelector Summary: Inherited project field not initialised in custom implementations of FileSelector Product: Ant Version: 1.5.2 Platform: All OS/Version: All Status: NEW Severity: Minor Priority: Other Component: Core AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The project field inherited from ProjectComponent by BaseExtendSelector is never set when a user makes use of the custom tag for selectors, thus making the owning Project instance inaccessible from within custom selectors. Have my own candidate fix for 1.5.2 source. Applied same fix to CVS tip which yields following CVS diff: RCS file: /home/cvspublic/ant/src/main/org/apache/tools/ant/types/selectors/ExtendSe lector.java,v retrieving revision 1.6 diff -c -r1.6 ExtendSelector.java *** ExtendSelector.java 10 Feb 2003 14:14:35 - 1.6 --- ExtendSelector.java 1 Apr 2003 12:06:55 - *** *** 106,111 --- 106,114 AntClassLoader.initializeClass(c); } dynselector = (FileSelector) c.newInstance(); + if (dynselector instanceof ProjectComponent) { + ((ProjectComponent)dynselector).setProject(getProject()); + } } catch (ClassNotFoundException cnfexcept) { setError(Selector + classname + although perhaps using reflexion to get at a method with a signature the same as setProject() would be more suitable, to avoid type dependency on ProjectComponent, since otherwise implementers of FileSelector would be constrained to work from subclasses of ProjectComponent.
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh SSHExec.java
bodewig 2003/04/01 05:29:03 Modified:src/main/org/apache/tools/ant/taskdefs/optional/junit JUnitTestRunner.java src/main/org/apache/tools/ant/taskdefs/optional/ssh SSHExec.java Log: Remove redundant classes Revision ChangesPath 1.34 +4 -29 ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java Index: JUnitTestRunner.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- JUnitTestRunner.java 7 Mar 2003 11:23:06 - 1.33 +++ JUnitTestRunner.java 1 Apr 2003 13:29:01 - 1.34 @@ -78,6 +78,7 @@ import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; import org.apache.tools.ant.util.StringUtils; +import org.apache.tools.ant.util.TeeOutputStream; /** * Simple Testrunner for JUnit that runs all tests of a testsuite. @@ -302,17 +303,12 @@ System.setErr(systemError); } else { System.setOut(new PrintStream( - new TeeOutputStream( - new OutputStream[] {savedOut, - systemOut} - ) + new TeeOutputStream(savedOut, systemOut) ) ); System.setErr(new PrintStream( - new TeeOutputStream( - new OutputStream[] {savedErr, - systemError} - ) + new TeeOutputStream(savedErr, + systemError) ) ); } @@ -613,25 +609,4 @@ return false; } -/** - * Helper class that sends output sent to multiple streams. - * - * @since Ant 1.5 - */ -private class TeeOutputStream extends OutputStream { - -private OutputStream[] outs; - -private TeeOutputStream(OutputStream[] outs) { -this.outs = outs; -} - -public void write(int b) throws IOException { -for (int i = 0; i outs.length; i++) { -outs[i].write(b); -} -} - -} - } // JUnitTestRunner 1.5 +2 -62 ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java Index: SSHExec.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- SSHExec.java 1 Apr 2003 13:09:28 - 1.4 +++ SSHExec.java 1 Apr 2003 13:29:03 - 1.5 @@ -56,6 +56,7 @@ import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; +import org.apache.tools.ant.util.TeeOutputStream; import java.io.ByteArrayOutputStream; import java.io.File; @@ -165,7 +166,7 @@ } ByteArrayOutputStream out = new ByteArrayOutputStream(); -Tee tee = new Tee(out, System.out); +TeeOutputStream tee = new TeeOutputStream(out, System.out); try { // execute the command @@ -249,67 +250,6 @@ if (out != null) { out.close(); } -} -} - -/** - * Similar to standard unix tee utility, sends output to two streams. - * - * @authorDale Anson, [EMAIL PROTECTED] - * @version $Revision$ - */ -public class Tee extends OutputStream { - -private OutputStream left = null; -private OutputStream right = null; - -/** - * Constructor for Tee, sends output to both of the given - * streams, which are referred to as the teed streams. - * - * @param left one stream to write to - * @param right the other stream to write to - */ -public Tee(OutputStream left, OutputStream right) { -if (left == null || right == null) { -throw new IllegalArgumentException(Both streams are required.); -} -this.left = left; -this.right = right; -} - -/** - *
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-01 13:35 --- There could be a problem if multiple addins uses the same name for different tasks. So the order of loading would be important. First loaded wins (like properties).
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional ANTLR.java
bodewig 2003/04/01 05:47:06 Modified:src/main/org/apache/tools/ant/taskdefs/optional ANTLR.java Log: Fix ANTLR's test8 testcase. Revision ChangesPath 1.21 +26 -3 ant/src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java Index: ANTLR.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- ANTLR.java31 Mar 2003 13:46:18 - 1.20 +++ ANTLR.java1 Apr 2003 13:47:06 - 1.21 @@ -55,6 +55,7 @@ package org.apache.tools.ant.taskdefs.optional; import java.io.BufferedReader; +import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileReader; import java.io.IOException; @@ -63,12 +64,14 @@ import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; import org.apache.tools.ant.taskdefs.Execute; -import org.apache.tools.ant.taskdefs.LogStreamHandler; +import org.apache.tools.ant.taskdefs.LogOutputStream; +import org.apache.tools.ant.taskdefs.PumpStreamHandler; import org.apache.tools.ant.types.Commandline; import org.apache.tools.ant.types.CommandlineJava; import org.apache.tools.ant.types.Path; import org.apache.tools.ant.util.JavaEnvUtils; import org.apache.tools.ant.util.LoaderUtils; +import org.apache.tools.ant.util.TeeOutputStream; /** * Invokes the ANTLR Translator generator on a grammar file. @@ -111,6 +114,9 @@ /** working directory */ private File workingdir = null; +/** captures ANTLR's output */ +private ByteArrayOutputStream bos = new ByteArrayOutputStream(); + public ANTLR() { commandline.setVm(JavaEnvUtils.getJreExecutable(java)); commandline.setClassname(antlr.Tool); @@ -277,6 +283,12 @@ int err = run(commandline.getCommandline()); if (err == 1) { throw new BuildException(ANTLR returned: + err, getLocation()); +} else { +String output = bos.toString(); +if (output.indexOf(error:) -1) { +throw new BuildException(ANTLR signaled an error: + + output, getLocation()); +} } } else { log(Skipped grammar file. Generated file is newer., Project.MSG_VERBOSE); @@ -352,8 +364,14 @@ /** execute in a forked VM */ private int run(String[] command) throws BuildException { -Execute exe = new Execute(new LogStreamHandler(this, Project.MSG_INFO, -Project.MSG_WARN), null); +PumpStreamHandler psh = +new PumpStreamHandler(new LogOutputStream(this, Project.MSG_INFO), + new TeeOutputStream( + new LogOutputStream(this, + Project.MSG_WARN), + bos) + ); +Execute exe = new Execute(psh, null); exe.setAntRun(getProject()); if (workingdir != null) { exe.setWorkingDirectory(workingdir); @@ -363,6 +381,11 @@ return exe.execute(); } catch (IOException e) { throw new BuildException(e, getLocation()); +} finally { +try { +bos.close(); +} catch (IOException e) { +} } } }
DO NOT REPLY [Bug 17780] - Instead of updating a jar file, the task overrides it.
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=17780. 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=17780 Instead of updating a jar file, the task overrides it. [EMAIL PROTECTED] changed: What|Removed |Added OS/Version|Linux |Windows 9x
cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional ANTLRTest.java
bodewig 2003/04/01 06:33:29 Modified:src/etc/testcases/taskdefs/optional/antlr antlr.xml src/main/org/apache/tools/ant/taskdefs/optional ANTLR.java src/testcases/org/apache/tools/ant/taskdefs/optional ANTLRTest.java Log: demonstrate bug 12961 Revision ChangesPath 1.9 +19 -0 ant/src/etc/testcases/taskdefs/optional/antlr/antlr.xml Index: antlr.xml === RCS file: /home/cvs/ant/src/etc/testcases/taskdefs/optional/antlr/antlr.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- antlr.xml 1 Apr 2003 10:54:36 - 1.8 +++ antlr.xml 1 Apr 2003 14:33:28 - 1.9 @@ -73,6 +73,25 @@ antlr target=antlr.g outputdirectory=${tmp.dir} traceLexer=yes traceParser=yes traceTreeWalker=yes/ /target + !-- test9 will have been run before that -- + target name=noRecompile +antlr target=${tmp.dir}/extended.calc.g glib=${tmp.dir}/antlr.g/ + /target + + !-- test9 will have been run before that -- + target name=normalRecompile +sleep seconds=2/ +touch file=${tmp.dir}/extended.calc.g/ +antlr target=${tmp.dir}/extended.calc.g glib=${tmp.dir}/antlr.g/ + /target + + !-- test9 will have been run before that -- + target name=supergrammarChangeRecompile +sleep seconds=2/ +touch file=${tmp.dir}/antlr.g/ +antlr target=${tmp.dir}/extended.calc.g glib=${tmp.dir}/antlr.g/ + /target + target name=cleanup delete dir=${tmp.dir} / delete file=../../../../../../CalcParserTokenTypes.txt/ 1.22 +7 -2 ant/src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java Index: ANTLR.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- ANTLR.java1 Apr 2003 13:47:06 - 1.21 +++ ANTLR.java1 Apr 2003 14:33:28 - 1.22 @@ -275,7 +275,11 @@ public void execute() throws BuildException { validateAttributes(); //TODO: use ANTLR to parse the grammer file to do this. -if (target.lastModified() getGeneratedFile().lastModified()) { +File generatedFile = getGeneratedFile(); +if (target.lastModified() generatedFile.lastModified()) { +log(Compiling + target + as it is newer than ++ generatedFile, Project.MSG_VERBOSE); + populateAttributes(); commandline.createArgument().setValue(target.toString()); @@ -291,7 +295,8 @@ } } } else { -log(Skipped grammar file. Generated file is newer., Project.MSG_VERBOSE); +log(Skipped grammar file. Generated file + generatedFile ++ is newer., Project.MSG_VERBOSE); } } 1.13 +22 -0 ant/src/testcases/org/apache/tools/ant/taskdefs/optional/ANTLRTest.java Index: ANTLRTest.java === RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/optional/ANTLRTest.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- ANTLRTest.java1 Apr 2003 10:54:36 - 1.12 +++ ANTLRTest.java1 Apr 2003 14:33:28 - 1.13 @@ -169,6 +169,28 @@ public void test13() { executeTarget(test13); } + +public void testNoRecompile() { +executeTarget(test9); +assertEquals(-1, getFullLog().indexOf(Skipped grammar file.)); +executeTarget(noRecompile); +assertTrue(-1 != getFullLog().indexOf(Skipped grammar file.)); +} + +public void testNormalRecompile() { +executeTarget(test9); +assertEquals(-1, getFullLog().indexOf(Skipped grammar file.)); +executeTarget(normalRecompile); +assertEquals(-1, getFullLog().indexOf(Skipped grammar file.)); +} + +// Bugzilla Report 12961 +public void testSupergrammarChangeRecompile() { +executeTarget(test9); +assertEquals(-1, getFullLog().indexOf(Skipped grammar file.)); +executeTarget(supergrammarChangeRecompile); +assertEquals(-1, getFullLog().indexOf(Skipped grammar file.)); +} } class CalcFileFilter implements FilenameFilter {
DO NOT REPLY [Bug 17780] - Instead of updating a jar file, the task overrides it.
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=17780. 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=17780 Instead of updating a jar file, the task overrides it. [EMAIL PROTECTED] changed: What|Removed |Added CC||[EMAIL PROTECTED] Priority|Other |High
DO NOT REPLY [Bug 17780] - Instead of updating a jar file, the task overrides it.
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=17780. 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=17780 Instead of updating a jar file, the task overrides it. [EMAIL PROTECTED] changed: What|Removed |Added URL||[EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional ANTLR.java
bodewig 2003/04/01 06:44:00 Modified:.WHATSNEW docs/manual/OptionalTasks antlr.html src/main/org/apache/tools/ant/taskdefs/optional ANTLR.java Log: Recompile grammar if supergrammar has changed. PR: 12961 Revision ChangesPath 1.383 +3 -0 ant/WHATSNEW Index: WHATSNEW === RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.382 retrieving revision 1.383 diff -u -r1.382 -r1.383 --- WHATSNEW 31 Mar 2003 12:27:13 - 1.382 +++ WHATSNEW 1 Apr 2003 14:44:00 - 1.383 @@ -76,6 +76,9 @@ * The stripjavacomments filter sometimes removed parts of string constants. Bugzilla Report 17441. +* antlr will now recompile your grammar if the supergrammar has + changed. Bugzilla Report 12691. + Other changes: -- * Shipped XML parser is now Xerces 2.4.0 1.11 +12 -4 ant/docs/manual/OptionalTasks/antlr.html Index: antlr.html === RCS file: /home/cvs/ant/docs/manual/OptionalTasks/antlr.html,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- antlr.html4 Sep 2002 11:05:18 - 1.10 +++ antlr.html1 Apr 2003 14:44:00 - 1.11 @@ -21,10 +21,11 @@ the grammar file. /p p - This task only invokes ANTLR if the grammar file is newer than the generated - files. + This task only invokes ANTLR if the grammar file (or the + supergrammar specified by the glib attribute) is newer than the + generated files. /p -p +pAntlr 2.7.1 Note: i To successfully run ANTLR, your best option is probably to build the whole jar with the provided script bmkalljar/b and drop the resulting jar (about 300KB) @@ -33,6 +34,13 @@ to your classpath as described in ANTLR ttinstall.html/tt document. /i /p +pAntlr 2.7.2 Note: +i + Instead of the above, you will need antlrall.jar that can be created + by the bantlr-all.jar/b target of the Makefile provided with the + download. +/i +/p h3Parameters/h3 table border=1 cellpadding=2 cellspacing=0 @@ -170,7 +178,7 @@ /p hr -p align=centerCopyright copy; 2000-2002 Apache Software Foundation. All rights +p align=centerCopyright copy; 2000-2003 Apache Software Foundation. All rights Reserved./p /body 1.23 +12 -4 ant/src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java Index: ANTLR.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- ANTLR.java1 Apr 2003 14:33:28 - 1.22 +++ ANTLR.java1 Apr 2003 14:44:00 - 1.23 @@ -276,10 +276,18 @@ validateAttributes(); //TODO: use ANTLR to parse the grammer file to do this. File generatedFile = getGeneratedFile(); -if (target.lastModified() generatedFile.lastModified()) { -log(Compiling + target + as it is newer than -+ generatedFile, Project.MSG_VERBOSE); - +boolean targetIsOutOfDate = +target.lastModified() generatedFile.lastModified(); +boolean superGrammarIsOutOfDate = superGrammar != null +(new File(superGrammar).lastModified() generatedFile.lastModified()); +if (targetIsOutOfDate || superGrammarIsOutOfDate) { +if (targetIsOutOfDate) { +log(Compiling + target + as it is newer than ++ generatedFile, Project.MSG_VERBOSE); +} else if (superGrammarIsOutOfDate) { +log(Compiling + target + as + superGrammar ++ is newer than + generatedFile, Project.MSG_VERBOSE); +} populateAttributes(); commandline.createArgument().setValue(target.toString());
Re: The JavaCC and JJTree tasks....
Hmm, Gump still uses the old version, so I guess others will be slow on switching as well. Yup, JavaCC version updates have been few and far between. Hopefully the package name change to org.netbeans.blah means that a full open sourcing of JavaCC is on the way... this possibility has been bandied about on the JavaCC mailing list a couple of times, but no one's made any firm promises. If possible we should support both (and I think there already is a bugzilla report to that effect, including a patch IIRC). I poked around Bugzilla for a bit and couldn't find anything. But maybe I'm not entering the right query params. Anyhow, sounds like you have this one under control... please let me know if you need someone to do some testing or anything... Yours, Tom
Re: ssh exec task...
Thanks -- I take it you saw that jsch 0.1.3 was released this morning? Would you mind making one other minor change to the docs, it references jsch 0.1.2 as a requirement, but 0.1.3 is the minimum. Dale Anson Stefan Bodewig wrote: On Tue, 25 Mar 2003, Dale Anson [EMAIL PROTECTED] wrote: The updates fix the problem with output not always showing on the screen (or log). I've committed a slightly modified version. The main difference (apart from formatting changes) are that timeout uses milliseconds as its value (like exec) and that I've made sure the file will get closed - if writing to a file that is. Thanks Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ssh exec task...
On Tue, 01 Apr 2003, Dale Anson [EMAIL PROTECTED] wrote: I take it you saw that jsch 0.1.3 was released this morning? Yep. Would you mind making one other minor change to the docs, it references jsch 0.1.2 as a requirement, but 0.1.3 is the minimum. Already changed in CVS. 8-) Stefan
RE: The JavaCC and JJTree tasks....
I have some patches coming up for JavaCC and JJTree concerning some missing parameters and also an enhancement for a JJDoc taskdef (code is finished, only cvs -diff left on a nightly snapshot). I could look into a patch for version 3.0 added support this coming weekend. Jene Jasper. -Oorspronkelijk bericht- Van: Stefan Bodewig [mailto:[EMAIL PROTECTED] Verzonden: dinsdag 1 april 2003 16:57 Aan: [EMAIL PROTECTED] Onderwerp: Re: The JavaCC and JJTree tasks On 01 Apr 2003, Tom Copeland [EMAIL PROTECTED] wrote: If possible we should support both (and I think there already is a bugzilla report to that effect, including a patch IIRC). I poked around Bugzilla for a bit and couldn't find anything. I was wrong. There is one for JDepend, which has similar problems (changed directory structure in new release). Anyhow, sounds like you have this one under control... Not really. 8-) A patch that would enable the tasks to work with either version would be appreciated. Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: The JavaCC and JJTree tasks....
Not really. 8-) A patch that would enable the tasks to work with either version would be appreciated. Sure thing, will do... [much typing and testing commences] Yours, Tom
cvs commit: ant/src/main/org/apache/tools/ant UnknownElement.java
conor 2003/04/01 07:34:38 Modified:src/main/org/apache/tools/ant UnknownElement.java Log: Defer configuration of TaskContainer's tasks. This forces Tasks to get configured just prior to execution picking up latest property values etc. Revision ChangesPath 1.43 +5 -1 ant/src/main/org/apache/tools/ant/UnknownElement.java Index: UnknownElement.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/UnknownElement.java,v retrieving revision 1.42 retrieving revision 1.43 diff -u -w -u -r1.42 -r1.43 --- UnknownElement.java 1 Apr 2003 14:59:58 - 1.42 +++ UnknownElement.java 1 Apr 2003 15:34:38 - 1.43 @@ -141,7 +141,11 @@ handleChildren(realThing, getWrapper()); -getWrapper().maybeConfigure(getProject()); +// configure attributes of the object and it's children. If it is +// a task container, defer the configuration till the task container +// attempts to use the task +getWrapper().maybeConfigure(getProject(), +!(realThing instanceof TaskContainer)); } /**
DO NOT REPLY [Bug 17134] - Change jdepend task to support JDepend 2.5
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=17134. 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=17134 Change jdepend task to support JDepend 2.5 [EMAIL PROTECTED] changed: What|Removed |Added CC||[EMAIL PROTECTED] AssignedTo|[EMAIL PROTECTED] |[EMAIL PROTECTED] Target Milestone|--- |1.6
DO NOT REPLY [Bug 17807] - antlr test fails
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=17807. 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=17807 antlr test fails --- Additional Comments From [EMAIL PROTECTED] 2003-04-01 15:44 --- With 2.7.2 all tests should pass now (CVS HEAD, that is). Can you run the test3 target in src/etc/testcases/taskdefs/optional/antlr/antlr.xml directly (without JUnit in between) and see whether it generates any useful output (maybe throwing in -verbose or *shudder* even -debug)?
DO NOT REPLY [Bug 6495] - Support XML catalogs to resolve external entities in build 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=6495. 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=6495 Support XML catalogs to resolve external entities in build files [EMAIL PROTECTED] changed: What|Removed |Added Summary|Support XML catalogs to |Support XML catalogs to |resolve external entities |resolve external entities in ||build files --- Additional Comments From [EMAIL PROTECTED] 2003-04-01 15:47 --- Please note that Ant ships with Xerces, so relying on an internal Crimson API may be a bad idea. Ant already supports catalogs to be used within style or xmlvalidate, using them even before Ant's build file gets parsed seems a bit tricky. You could write your own ProjectHelper implementation and solve it there, I guess.
DO NOT REPLY [Bug 14849] - JProbe tasks: executables cannot be found with JProbe 4.0.1
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=14849. 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=14849 JProbe tasks: executables cannot be found with JProbe 4.0.1 [EMAIL PROTECTED] changed: What|Removed |Added CC||[EMAIL PROTECTED] AssignedTo|[EMAIL PROTECTED] |[EMAIL PROTECTED] Target Milestone|--- |1.6
DO NOT REPLY [Bug 18581] - ClearCase ChangeLog Task
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=18581. 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=18581 ClearCase ChangeLog Task --- Additional Comments From [EMAIL PROTECTED] 2003-04-01 19:52 --- Created an attachment (id=5589) Includes the source, description, and an example changelog.
DO NOT REPLY [Bug 18588] New: - log.xsl build info is not 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=18588. 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=18588 log.xsl build info is not output Summary: log.xsl build info is not output Product: Ant Version: 1.6Alpha (nightly) Platform: Other OS/Version: Windows XP Status: NEW Severity: Normal Priority: Other Component: Other AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The table which includes ant.file, ant.version, java.version and os.name have blank values instead of the values from the XML log file. Patch follows. Example invocation: ant -logger org.apache.tools.ant.XmlLogger -logfile antlog.xml some target Tested with: MS IE 6.0.2800.1106.xpsp1.020828-1920 Mozilla 1.3
DO NOT REPLY [Bug 18588] - log.xsl build info is not 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=18588. 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=18588 log.xsl build info is not output --- Additional Comments From [EMAIL PROTECTED] 2003-04-01 23:43 --- I am talking about the HTML table which contains one row for each of the build info messages echoed to the console in case this was not clear in my first post.
DO NOT REPLY [Bug 18588] - log.xsl build info is not 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=18588. 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=18588 log.xsl build info is not output --- Additional Comments From [EMAIL PROTECTED] 2003-04-01 23:45 --- Sorry, one more detail: I marked this bug as 1.6Alpha(nightly) because the xsl file I patched is the latest from CVS. What I really did was to use ant 1.5.2 and the latest version of log.xsl from CVS (1.9 at the time of the writing of this report).