cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional/script ScriptDefTest.java
conor 2003/07/20 02:34:21 Modified:.build.xml src/main/org/apache/tools/ant/taskdefs/optional Script.java src/main/org/apache/tools/ant/taskdefs/optional/script ScriptDef.java src/main/org/apache/tools/ant/types/optional ScriptFilter.java src/testcases/org/apache/tools/ant/taskdefs/optional/script ScriptDefTest.java Added: src/main/org/apache/tools/ant/util ScriptRunner.java Log: Refactor script related tasks into single ScriptRunner utility. Revision ChangesPath 1.389 +1 -0 ant/build.xml Index: build.xml === RCS file: /home/cvs/ant/build.xml,v retrieving revision 1.388 retrieving revision 1.389 diff -u -w -u -r1.388 -r1.389 --- build.xml 16 Jul 2003 14:39:30 - 1.388 +++ build.xml 20 Jul 2003 09:34:21 - 1.389 @@ -233,6 +233,7 @@ filename name=${optional.package}/Script*/ filename name=${optional.package}/script/**/*/ filename name=${optional.type.package}/Script*/ + filename name=${util.package}/Script*/ /or /selector 1.23 +16 -80 ant/src/main/org/apache/tools/ant/taskdefs/optional/Script.java Index: Script.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/Script.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -w -u -r1.22 -r1.23 --- Script.java 18 Jul 2003 12:45:57 - 1.22 +++ Script.java 20 Jul 2003 09:34:21 - 1.23 @@ -1,7 +1,7 @@ /* * The Apache Software License, Version 1.1 * - * Copyright (c) 2000-2002 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 @@ -54,14 +54,9 @@ package org.apache.tools.ant.taskdefs.optional; import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.util.Enumeration; -import java.util.Hashtable; -import org.apache.bsf.BSFException; -import org.apache.bsf.BSFManager; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Task; +import org.apache.tools.ant.util.ScriptRunner; /** * Executes a script. @@ -70,29 +65,8 @@ * @author Sam Ruby a href=mailto:[EMAIL PROTECTED][EMAIL PROTECTED]/a */ public class Script extends Task { -private String language; -private String script = ; -private Hashtable beans = new Hashtable(); - -/** - * Add a list of named objects to the list to be exported to the script - */ -private void addBeans(Hashtable dictionary) { -for (Enumeration e = dictionary.keys(); e.hasMoreElements();) { -String key = (String) e.nextElement(); - -boolean isValid = key.length() 0 - Character.isJavaIdentifierStart(key.charAt(0)); - -for (int i = 1; isValid i key.length(); i++) { -isValid = Character.isJavaIdentifierPart(key.charAt(i)); -} - -if (isValid) { -beans.put(key, dictionary.get(key)); -} -} -} +/** Used to run the script */ +private ScriptRunner runner = new ScriptRunner(); /** * Do the work. @@ -100,38 +74,15 @@ * @exception BuildException if someting goes wrong with the build */ public void execute() throws BuildException { -try { -addBeans(getProject().getProperties()); -addBeans(getProject().getUserProperties()); -addBeans(getProject().getTargets()); -addBeans(getProject().getReferences()); - -beans.put(project, getProject()); - -beans.put(self, this); - -BSFManager manager = new BSFManager (); - -for (Enumeration e = beans.keys(); e.hasMoreElements();) { -String key = (String) e.nextElement(); -Object value = beans.get(key); -manager.declareBean(key, value, value.getClass()); -} +runner.addBeans(getProject().getProperties()); +runner.addBeans(getProject().getUserProperties()); +runner.addBeans(getProject().getTargets()); +runner.addBeans(getProject().getReferences()); -// execute the script -manager.exec(language, ANT, 0, 0, script); -} catch (BSFException be) { -Throwable t = be; -Throwable te = be.getTargetException(); -if (te != null) { -if (te instanceof
cvs commit: ant check.xml
conor 2003/07/20 02:47:19 Modified:.check.xml Log: pickup defs from main build via import Revision ChangesPath 1.10 +1 -5 ant/check.xml Index: check.xml === RCS file: /home/cvs/ant/check.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -u -w -u -r1.9 -r1.10 --- check.xml 9 Jul 2003 13:44:49 - 1.9 +++ check.xml 20 Jul 2003 09:47:19 - 1.10 @@ -1,12 +1,8 @@ ?xml version=1.0? project default=checkstyle name=CheckAnt -!-- import file=build.xml/ -- - property name=src.dir value=src/ - property name=java.dir value=${src.dir}/main/ - property name=etc.dir value=${src.dir}/etc/ + import file=build.xml/ property name=config.dir value=${etc.dir}/checkstyle/ - property name=build.dir value=build/ property name=checkstyle.reportdir value=${build.dir}/reports/checkstyle/ property name=checkstyle.raw value=${checkstyle.reportdir}/raw.xml/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/script ScriptDefBase.java
conor 2003/07/20 03:01:27 Modified:src/main/org/apache/tools/ant/launch Locator.java src/main/org/apache/tools/ant/taskdefs/optional/script ScriptDefBase.java Log: Some javadoc'ing Revision ChangesPath 1.5 +15 -4 ant/src/main/org/apache/tools/ant/launch/Locator.java Index: Locator.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/launch/Locator.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -w -u -r1.4 -r1.5 --- Locator.java 16 Jul 2003 10:43:11 - 1.4 +++ Locator.java 20 Jul 2003 10:01:27 - 1.5 @@ -68,12 +68,19 @@ * @author Conor MacNeill * @since Ant 1.6 */ -public class Locator { +public final class Locator { +/** + * Not instantiable + */ +private Locator() { +} /** * Find the directory or jar file the class has been loaded from. * - * @return null if we cannot determine the location. + * @param c the class whose location is required. + * @return the file or jar with the class or null if we cannot + * determine the location. * * @since Ant 1.6 */ @@ -83,9 +90,13 @@ } /** - * Find the directory or a give resource has been loaded from. + * Find the directory or jar a give resource has been loaded from. + * + * @param c the classloader to be consulted for the source + * @param resource the resource whose location is required. * - * @return null if we cannot determine the location. + * @return the file with the resource source or null if + * we cannot determine the location. * * @since Ant 1.6 */ 1.4 +11 -0 ant/src/main/org/apache/tools/ant/taskdefs/optional/script/ScriptDefBase.java Index: ScriptDefBase.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/script/ScriptDefBase.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -w -u -r1.3 -r1.4 --- ScriptDefBase.java4 Jul 2003 14:04:55 - 1.3 +++ ScriptDefBase.java20 Jul 2003 10:01:27 - 1.4 @@ -102,6 +102,11 @@ return definition; } +/** + * Create a nested element + * + * @param name the nested element name + */ public Object createDynamicElement(String name) { List nestedElementList = (List) nestedElementMap.get(name); if (nestedElementList == null) { @@ -113,6 +118,12 @@ return element; } +/** + * Set a task attribute + * + * @param name the attribute name. + * @param value the attribute's string value + */ public void setDynamicAttribute(String name, String value) { ScriptDef definition = getScript(); if (!definition.isAttributeSupported(name)) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/etc/checkstyle checkstyle-frames.xsl checkstyle-xdoc.xsl
conor 2003/07/20 03:18:29 Modified:src/etc coverage-frames.xsl jdepend-frames.xsl junit-frames.xsl maudit-frames.xsl mmetrics-frames.xsl src/etc/checkstyle checkstyle-frames.xsl checkstyle-xdoc.xsl Log: Update stylesheets to use Xalan2 redirect. PR: 21627 Submitted by: Paul Krause Revision ChangesPath 1.6 +17 -17ant/src/etc/coverage-frames.xsl Index: coverage-frames.xsl === RCS file: /home/cvs/ant/src/etc/coverage-frames.xsl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -w -u -r1.5 -r1.6 --- coverage-frames.xsl 10 Feb 2003 14:13:28 - 1.5 +++ coverage-frames.xsl 20 Jul 2003 10:18:26 - 1.6 @@ -1,6 +1,6 @@ xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version=1.0 xmlns:lxslt=http://xml.apache.org/xslt; -xmlns:redirect=org.apache.xalan.xslt.extensions.Redirect +xmlns:redirect=org.apache.xalan.lib.Redirect extension-element-prefixes=redirect xsl:output method=html indent=yes/ xsl:decimal-format decimal-separator=. grouping-separator=, / 1.6 +18 -18ant/src/etc/jdepend-frames.xsl Index: jdepend-frames.xsl === RCS file: /home/cvs/ant/src/etc/jdepend-frames.xsl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -w -u -r1.5 -r1.6 --- jdepend-frames.xsl10 Feb 2003 14:13:28 - 1.5 +++ jdepend-frames.xsl20 Jul 2003 10:18:27 - 1.6 @@ -1,6 +1,6 @@ xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version=1.0 xmlns:lxslt=http://xml.apache.org/xslt; - xmlns:redirect=org.apache.xalan.xslt.extensions.Redirect + xmlns:redirect=org.apache.xalan.lib.Redirect extension-element-prefixes=redirect xsl:output method=html indent=yes encoding=US-ASCII/ !-- 1.14 +23 -23ant/src/etc/junit-frames.xsl Index: junit-frames.xsl === RCS file: /home/cvs/ant/src/etc/junit-frames.xsl,v retrieving revision 1.13 retrieving revision 1.14 diff -u -w -u -r1.13 -r1.14 --- junit-frames.xsl 10 Feb 2003 14:13:28 - 1.13 +++ junit-frames.xsl 20 Jul 2003 10:18:28 - 1.14 @@ -1,6 +1,6 @@ xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version=1.0 xmlns:lxslt=http://xml.apache.org/xslt; -xmlns:redirect=org.apache.xalan.xslt.extensions.Redirect +xmlns:redirect=org.apache.xalan.lib.Redirect extension-element-prefixes=redirect xsl:output method=html indent=yes encoding=US-ASCII/ xsl:decimal-format decimal-separator=. grouping-separator=,/ 1.7 +18 -18ant/src/etc/maudit-frames.xsl Index: maudit-frames.xsl === RCS file: /home/cvs/ant/src/etc/maudit-frames.xsl,v retrieving revision 1.6 retrieving revision 1.7 diff -u -w -u -r1.6 -r1.7 --- maudit-frames.xsl 10 Feb 2003 14:13:28 - 1.6 +++ maudit-frames.xsl 20 Jul 2003 10:18:28 - 1.7 @@ -1,6 +1,6 @@ xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version=1.0 xmlns:lxslt=http://xml.apache.org/xslt; -xmlns:redirect=org.apache.xalan.xslt.extensions.Redirect +xmlns:redirect=org.apache.xalan.lib.Redirect extension-element-prefixes=redirect xsl:output method=html indent=yes encoding=US-ASCII/ xsl:decimal-format decimal-separator=. grouping-separator=, / 1.6 +26 -26ant/src/etc/mmetrics-frames.xsl Index: mmetrics-frames.xsl === RCS file: /home/cvs/ant/src/etc/mmetrics-frames.xsl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -w -u -r1.5 -r1.6 --- mmetrics-frames.xsl 10 Feb 2003 14:13:28 - 1.5 +++ mmetrics-frames.xsl 20 Jul 2003 10:18:28 - 1.6 @@ -1,7 +1,7 @@ xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version=1.0 xmlns:lxslt=http://xml.apache.org/xslt; xmlns:xalan=http://xml.apache.org/xalan; - xmlns:redirect=org.apache.xalan.xslt.extensions.Redirect + xmlns:redirect=org.apache.xalan.lib.Redirect exclude-result-prefixes=xalan extension-element-prefixes=redirect xsl:output method=html indent=yes encoding=US-ASCII/ 1.3 +1 -1 ant/src/etc/checkstyle/checkstyle-frames.xsl Index: checkstyle-frames.xsl === RCS file: /home/cvs/ant/src/etc/checkstyle/checkstyle-frames.xsl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -u -r1.2 -r1.3 --- checkstyle-frames.xsl 5 Jul 2003 14:34:11 - 1.2 +++
DO NOT REPLY [Bug 20110] - Ant Dirname task behavior change/attribute request
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=20110. 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=20110 Ant Dirname task behavior change/attribute request [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||WONTFIX --- Additional Comments From [EMAIL PROTECTED] 2003-07-20 10:22 --- Current behaviour is as expected - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 21738] New: - Spelling error in docs/manual/base_task_classes.html page (desgined)
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=21738. 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=21738 Spelling error in docs/manual/base_task_classes.html page (desgined) Summary: Spelling error in docs/manual/base_task_classes.html page (desgined) Product: Ant Version: 1.5.3 Platform: All OS/Version: All Status: NEW Severity: Minor Priority: Other Component: Documentation AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] On ${ANT_HOME}/docs/manual/base_task_classes.html the word designed is twice misspelled as desgined - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Bug report for Ant [2003/07/20]
+---+ | Bugzilla Bug ID | | +-+ | | Status: UNC=Unconfirmed NEW=New ASS=Assigned| | | OPN=ReopenedVER=Verified(Skipped Closed/Resolved) | | | +-+ | | | Severity: BLK=Blocker CRI=CriticalMAJ=Major | | | | MIN=Minor NOR=Normal ENH=Enhancement | | | | +-+ | | | | Date Posted | | | | | +--+ | | | | | Description | | | | | | | | 1484|New|Enh|2001-04-24|Request additional flexibility in AntOn task for A| | 1509|Opn|Enh|2001-04-25|Project object not fully functional in BuildEvents| | 2743|New|Enh|2001-07-23|More sophisticated dependency analysis| | 2811|Ass|Enh|2001-07-25|depend does not work when an interface is modifi| | 3198|Opn|Maj|2001-08-21|The javac task doesn't work properly with multi-| | 3310|New|Enh|2001-08-28|Clear case files and directories | | 3807|New|Enh|2001-09-25|target .. access rights | | 3808|New|Enh|2001-09-25|making interfaces that projects implements. | | 3968|New|Enh|2001-10-04|Need way to have ejbjar task continue when errors | | 4066|New|Enh|2001-10-10|Ant task and classpath| | 4750|Opn|Min|2001-11-08|jspc flattens directory structure when translating| | 5019|Ass|Maj|2001-11-21|ejbjar does not package ejb-ref interfaces| | 5035|New|Enh|2001-11-22|Patternset and fileset enhancements | | 5270|Opn|Enh|2001-12-04|Ant task - allow multiple targets | | 5748|New|Enh|2002-01-08|Filtering, Default Filter | | 5789|New|Enh|2002-01-10|Enhanced PVCS task. | | 5907|New|Enh|2002-01-17|ExecTask waits regardless of what you are executin| | 5949|New|Enh|2002-01-21|Stop using timestamp for out-of-dateness check | | 6226|New|Enh|2002-02-04|Organization of ant/lib directory, contents of ant| | 6266|New|Enh|2002-02-06|Ant Zip task additional parameter request | | 6323|Ass|Maj|2002-02-08|java failonerror not working unless fork=true | | 6368|Opn|Enh|2002-02-11|Wild card as a target name or comma separated targ| | 6475|New|Enh|2002-02-14|I would like to be able to do the diff with to fil| | 6495|New|Enh|2002-02-15|Support XML catalogs to resolve external entities | | 6599|New|Enh|2002-02-20|Fork in javadoc is not needed if you added a secur| | 6606|Opn|Enh|2002-02-21|META-BUG problems with delegating classloaders| | 6757|New|Enh|2002-02-28|adding visibility to tasks| | 7245|Ass|Enh|2002-03-19|JUnit JUnitReport tasks / VM constraints| | 7546|New|Enh|2002-03-27|EjbJar:Borland Task doesn't allow alternate compil| | 7624|New|Enh|2002-03-29|chmod task should be extensible to non-Unix system| | 7712|New|Enh|2002-04-03|Provide patternset support for VSSGET task? | | 7879|New|Enh|2002-04-09|the style task is very useful, but a little too | | 8031|Opn|Enh|2002-04-12|Suggest ProjectHelperImpl use File.toURI().toURL()| | 8085|Opn|Nor|2002-04-15|cvschangelog does not correctly detect ends of com| | 8089|New|Maj|2002-04-15|weblogic-Element of ejbjar-Task needs support for | | 8294|New|Enh|2002-04-19|Make apply better!| | 8502|New|Enh|2002-04-25|Style task needs a failonerror/haltonerror attribu| | 8559|New|Enh|2002-04-26|Add fileset to arg, add a new task ex. direct| | 8656|New|Enh|2002-04-30|Add the possibility to specify a URL in the Filter| | 8722|New|Enh|2002-05-02|allow setting class path for optional tasks via bu| | 8745|New|Enh|2002-05-02|log compile errors so that they can be picked up b| | 8866|New|Enh|2002-05-07|Signal handling in java task | | 8873|Ass|Enh|2002-05-07|.NET task - should have resource option | | 8892|New|Enh|2002-05-07|Provide a way to access targets/commandline that a| | 8895|New|Enh|2002-05-08|ant and/or antcall should support forking | | 8972|New|Enh|2002-05-10|allow property expansion in filterset property v| | 8981|New|Enh|2002-05-10|Tar task command additional features | | 8986|New|Enh|2002-05-10|New attributes and nested tags for WAR task | | 8988|New|Enh|2002-05-10|global property inside a target | | 9294|New|Enh|2002-05-21|[PATCH] optional/j2ee/ServerDeploy OC4J Support | | 9296|New|Enh|2002-05-21|pathconvert should use default separators without | |
Re: New external task: Just4log.
On Fri, 18 Jul 2003 16:04:08 +1000 Conor MacNeill [EMAIL PROTECTED] wrote: On Fri, 18 Jul 2003 07:10 am, Lucas Bruand wrote: It is distributed ( by me) under the terms of the Apache License 1.1. You cannot declare code you maintain to be Copyright (c) 2003 The Apache Software Foundation. Only the ASF can do that :-) You can use an Apache-style license but you need to update the names in the copyright statement and section 4. Sorry, I did that too quickly, I 'll change this... Cheers, Lucas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]