DO NOT REPLY [Bug 42742] - big Ant/Ivy builds run out of permanent memory. Classloader leaks?

2007-06-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42742





--- Additional Comments From [EMAIL PROTECTED]  2007-06-28 03:45 ---
well, perhaps we need a forking subant. hmmm. 

Having done -v runs to see what is going on. I am ing the ivy antlib and
smartfrog as a tasks.properties file, both of which are ignored with the
(ignoring redeclaration of ... ) messages. But somehow the classloader is being
retained.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



Re: PropertyHelper thoughts

2007-06-28 Thread Matt Benson
Sorry for the lag... I was sort of wondering if anyone
else had anything at all to say here.  :)  Not even DD
is talking anymore so I guess it's down to you and me,
Peter, to decide where this is going:  do-ocracy and
all...

--- Peter Reilly <[EMAIL PROTECTED]> wrote:

> Thanks Matt,
> 
> I still think that we need to provide write access
> to the properties.
> 
> Writing to expressions is used a lot for example
> with JSF and EL.

Oh, that was your

example, right?

> 
> It may also be used to provide a "var:" prefix - to
> allow rewrittable
> properties without using the  name="me"/> work-around
> (see ant in action
> (http://www.manning.com/loughran/)),
> 

Given these usecases does it then follow that
PropertySetter extends PropertyEvaluator?  i.e. do you
agree we can call it "proper" that a PropertySetter
would know how to retrieve its own properties?  As for
consensus on the property setting extension point, I
think we stand at:

You (Peter): +1
DD: strong -0?
Me (Matt): +0

So I think we can do this unless DD clarifies his
position as being a full -1.  That's not his customary
behavior however.

-Matt

> Peter
> 
> 
> 
> 
> On 6/26/07, Matt Benson <[EMAIL PROTECTED]>
> wrote:
> >
> > --- Peter Reilly <[EMAIL PROTECTED]>
> wrote:
> >
> > > Hi Matt,
> > > this is pretty neat.
> >
> > Thanks for the compliment, and for checking it
> out!
> > :)
> > >
> > > Just a couple of points:
> > > 1) the svn does not have the common external
> pointer
> > > defined
> >
> > Oops--I figured out how to do it but forgot that I
> had
> > to commit properties changes, should be ok now.
> >
> > > 2) how do the property helpers work with <*ant*>
> ?
> >
> > I am currently working from the perspective that
> the
> > availability of a given PropertyHelper delegate is
> > crucial enough to warrant forcing explicit or
> imported
> > invocation.  I am willing to entertain differing
> > opinions, however.  :)
> >
> > -Matt
> > >
> > > Peter
> > >
> > >
> > > On 6/26/07, Matt Benson <[EMAIL PROTECTED]>
> > > wrote:
> > > > Hi all--
> > > >   Just wanted to be sure everyone who cares
> about
> > > this
> > > > thread noticed
> > > >
> > >
> >
>
http://issues.apache.org/bugzilla/show_bug.cgi?id=42736
> > > > and the companion antlib at
> > > >
> > >
> >
>
http://svn.apache.org/repos/asf/ant/sandbox/antlibs/props
> > > > .
> > > >
> > > > br,
> > > > Matt
> > > >
> > > > --- Matt Benson <[EMAIL PROTECTED]> wrote:
> > > >
> > > > >
> > > > > --- Dominique Devienne <[EMAIL PROTECTED]>
> > > wrote:
> > > > >
> > > > > > On 6/22/07, Matt Benson
> <[EMAIL PROTECTED]>
> > > > > > wrote:
> > > > > > > Let me divert the topic for a
> moment--the
> > > other
> > > > > of
> > > > > > the
> > > > > > > two most important property handling
> > > extension
> > > > > > points
> > > > > > > can be expressed with a
> PropertyEvaluator
> > > > > > interface.
> > > > > > > A perfect example is Ant's built-in
> > > > > toString:refid
> > > > > > > property "syntax".  Basically that's an
> > > example
> > > > > of
> > > > > > a
> > > > > > > custom PropertyEvaluator that interprets
> a
> > > > > string
> > > > > > > beginning with "toString:".  Now imagine
> a
> > > > > > > complementary custom property evaluator
> that
> > > > > > evaluates
> > > > > > > "refid:refid" to the Object reference.
> > > Overload
> > > > > > > IH.setAttribute to allow Object values.
> > > Change
> > > > > > > property replacement such that a string
> > > whose
> > > > > > entire
> > > > > > > contents are a property that evaluates
> to an
> > > > > > Object,
> > > > > > > returns the Object.  With the postulated
> > > > > > refid:refid
> > > > > > > PropertyEvaluator,
> "${refid:myclasspath}"
> > > would
> > > > > > return
> > > > > > > the Path at refid myclasspath.  If
> > > > > > RuntimeConfigurable
> > > > > > > calls the PH method that is capable of
> > > returning
> > > > > > an
> > > > > > > Object, then passes that Object (or
> String)
> > > to
> > > > > the
> > > > > > > overloaded IH.setAttribute(), we have
> just
> > > > > > rendered
> > > > > > > all classpathref attributes obsolete;
> > > rather,
> > > > > any
> > > > > > task
> > > > > > > can support ref'd types in attributes
> > > without
> > > > > > having
> > > > > > > to support the foo|fooref paradigm.  If
> the
> > > > > > attribute
> > > > > > > isn't settable as the returned Object,
> > > convert
> > > > > the
> > > > > > > Object to a String and pass it to the
> > > original
> > > > > > > IH.setAttribute() implementation.
> > > > > >
> > > > > > This use case I do care about. But I
> always
> > > felt
> > > > > > refid handling should
> > > > > > be transparent to the tasks, and handled
> > > directly
> > > > > by
> > > > > > the framework.
> > > > > > hard to retrofit on the current
> infrastructure
> > > > > > though I think. But
> > > > > > where I'm getting at is that this
> particular
> > > > > example
> > > > > > of yours, yes, I
> > > > > > agree it's a valid use case, but I don't
> think
>

svn commit: r551541 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/script/ScriptDef.java

2007-06-28 Thread mbenson
Author: mbenson
Date: Thu Jun 28 05:54:31 2007
New Revision: 551541

URL: http://svn.apache.org/viewvc?view=rev&rev=551541
Log:
unused import

Modified:

ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/script/ScriptDef.java

Modified: 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/script/ScriptDef.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/script/ScriptDef.java?view=diff&rev=551541&r1=551540&r2=551541
==
--- 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/script/ScriptDef.java
 (original)
+++ 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/script/ScriptDef.java
 Thu Jun 28 05:54:31 2007
@@ -23,7 +23,6 @@
 import org.apache.tools.ant.MagicNames;
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.ProjectHelper;
-import org.apache.tools.ant.types.Resource;
 import org.apache.tools.ant.types.ResourceCollection;
 import org.apache.tools.ant.taskdefs.DefBase;
 



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



svn commit: r551543 - in /ant/core/trunk/src/main/org/apache/tools/ant/util: ScriptRunnerBase.java optional/JavaxScriptRunner.java optional/ScriptRunner.java

2007-06-28 Thread mbenson
Author: mbenson
Date: Thu Jun 28 05:59:54 2007
New Revision: 551543

URL: http://svn.apache.org/viewvc?view=rev&rev=551543
Log:
javadoc/fmting/refactor

Modified:
ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java

ant/core/trunk/src/main/org/apache/tools/ant/util/optional/JavaxScriptRunner.java
ant/core/trunk/src/main/org/apache/tools/ant/util/optional/ScriptRunner.java

Modified: 
ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java?view=diff&rev=551543&r1=551542&r2=551543
==
--- ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java 
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java Thu 
Jun 28 05:59:54 2007
@@ -117,10 +117,10 @@
 public abstract void executeScript(String execName);
 
 /**
- * Evalulate the script.
- * @param execName the name that will be passed to BSF for this script
- *execution.
- * @return the result of evalulating the script.
+ * Evaluate the script.
+ * @param execName the name that will be passed to the
+ * scripting engine for this script execution.
+ * @return the result of evaluating the script.
  */
 public abstract Object evaluateScript(String execName);
 

Modified: 
ant/core/trunk/src/main/org/apache/tools/ant/util/optional/JavaxScriptRunner.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/util/optional/JavaxScriptRunner.java?view=diff&rev=551543&r1=551542&r2=551543
==
--- 
ant/core/trunk/src/main/org/apache/tools/ant/util/optional/JavaxScriptRunner.java
 (original)
+++ 
ant/core/trunk/src/main/org/apache/tools/ant/util/optional/JavaxScriptRunner.java
 Thu Jun 28 05:59:54 2007
@@ -74,8 +74,8 @@
  *
  * @param execName the name that will be passed to the
  * scripting engine for this script execution.
- * @return the result of the evalulation
- * @exception BuildException if someting goes wrong exectuing the script.
+ * @return the result of the evaluation
+ * @exception BuildException if something goes wrong executing the script.
  */
 public Object evaluateScript(String execName) throws BuildException {
 checkLanguage();

Modified: 
ant/core/trunk/src/main/org/apache/tools/ant/util/optional/ScriptRunner.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/util/optional/ScriptRunner.java?view=diff&rev=551543&r1=551542&r2=551543
==
--- 
ant/core/trunk/src/main/org/apache/tools/ant/util/optional/ScriptRunner.java 
(original)
+++ 
ant/core/trunk/src/main/org/apache/tools/ant/util/optional/ScriptRunner.java 
Thu Jun 28 05:59:54 2007
@@ -21,7 +21,6 @@
 import org.apache.bsf.BSFManager;
 import org.apache.bsf.BSFEngine;
 
-
 import java.util.Iterator;
 import java.util.Hashtable;
 
@@ -87,10 +86,8 @@
 /**
  * Do the work.
  *
- * @param execName the name that will be passed to BSF for this script
- *execution.
- *
- * @exception BuildException if someting goes wrong exectuing the script.
+ * @param execName the name that will be passed to BSF for this script 
execution.
+ * @exception BuildException if something goes wrong executing the script.
  */
 public void executeScript(String execName) throws BuildException {
 checkLanguage();
@@ -105,22 +102,20 @@
 engine.exec(execName, 0, 0, getScript());
 }
 } catch (BSFException be) {
-throwBuildException(be);
+throw getBuildException(be);
 } finally {
 restoreContextLoader(origLoader);
 }
 }
 
 /**
- * Do the work.
+ * Evaluate the script.
  *
- * @param execName the name that will be passed to BSF for this script
- *execution.
- * @return the result of the evalulation
- * @exception BuildException if someting goes wrong exectuing the script.
+ * @param execName the name that will be passed to BSF for this script 
execution.
+ * @return the result of the evaluation
+ * @exception BuildException if something goes wrong executing the script.
  */
-public Object evaluateScript(String execName)
-throws BuildException {
+public Object evaluateScript(String execName) throws BuildException {
 checkLanguage();
 ClassLoader origLoader = replaceContextLoader();
 try {
@@ -129,34 +124,27 @@
 // execute the script
 if (engine == null) {
 return m.eval(getLanguage(), execName, 0, 0, getScript());
-} else {
-   

Re: PropertyHelper thoughts

2007-06-28 Thread Dominique Devienne

On 6/28/07, Matt Benson <[EMAIL PROTECTED]> wrote:

As for consensus on the property setting extension point,
I think we stand at:

You (Peter): +1
DD: strong -0?
Me (Matt): +0


I'm +1 for the evaluator, and -0 for the setter, although I do see the
need for a solution to properties being used in macros. I'm not
convinced the setter is the best approach, but I think setter is one
possible solution indeed, and may be the easiest to implement.

I do respect do-ocracy ;-) --DD

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



svn commit: r551578 - /ant/sandbox/antlibs/props/trunk/docs/index.html

2007-06-28 Thread mbenson
Author: mbenson
Date: Thu Jun 28 07:35:43 2007
New Revision: 551578

URL: http://svn.apache.org/viewvc?view=rev&rev=551578
Log:
tablize

Modified:
ant/sandbox/antlibs/props/trunk/docs/index.html

Modified: ant/sandbox/antlibs/props/trunk/docs/index.html
URL: 
http://svn.apache.org/viewvc/ant/sandbox/antlibs/props/trunk/docs/index.html?view=diff&rev=551578&r1=551577&r2=551578
==
--- ant/sandbox/antlibs/props/trunk/docs/index.html (original)
+++ ant/sandbox/antlibs/props/trunk/docs/index.html Thu Jun 28 07:35:43 2007
@@ -93,24 +93,40 @@
 
 Tasks and Types
 
-The types provided are (so far) instances of
+The types provided are instances of
org.apache.tools.ant.PropertyHelper.Delegate and can be 
invoked
using the  task provided at the 
referenced Bugzilla entry:
 
-
-  nested - Implements nested property expansion; e.g. 
${${double-expand-me}}.
-  
-  stringops - Implements *nix 
shell-inspired string operations.
-  
-  refs - Given ref:refid, resolves reference
-  refid.
-  
-  types - Given type:arg, attempts to 
invoke
-  type constructor (project, 
arg),
-  then (arg).
-  
-
-
+
+  
+Delegate
+Delegate Type
+Description
+  
+  
+nested
+PropertyExpander
+Implements nested property expansion; e.g. 
${${double-expand-me}}.
+  
+  
+stringops
+PropertyEvaluator
+Implements *nix shell-inspired string operations.
+  
+  
+refs
+PropertyEvaluator
+Given ref:refid,
+resolves reference refid.
+  
+  
+types
+PropertyEvaluator
+Given type:arg, attempts to invoke
+type constructor (project, 
arg),
+then (arg).
+  
+
 
   
 



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



Re: PropertyHelper thoughts

2007-06-28 Thread Matt Benson

--- Dominique Devienne <[EMAIL PROTECTED]> wrote:

> On 6/28/07, Matt Benson <[EMAIL PROTECTED]>
> wrote:
> > As for consensus on the property setting extension
> point,
> > I think we stand at:
> >
> > You (Peter): +1
> > DD: strong -0?
> > Me (Matt): +0
> 
> I'm +1 for the evaluator, and -0 for the setter,
> although I do see the
> need for a solution to properties being used in
> macros. I'm not

Properties used in macros--i.e., scoped aka "local"
properties?

> convinced the setter is the best approach, but I
> think setter is one
> possible solution indeed, and may be the easiest to
> implement.
> 

I don't know either, but it's on my radar.  :|

> I do respect do-ocracy ;-) --DD
> 

;)

-Matt

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



   

Moody friends. Drama queens. Your life? Nope! - their life, your story. Play 
Sims Stories at Yahoo! Games.
http://sims.yahoo.com/  

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



svn commit: r551592 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/types/optional/AbstractScriptComponent.java src/main/org/apache/tools/ant/types/optional/ScriptCondition.java src/tests

2007-06-28 Thread mbenson
Author: mbenson
Date: Thu Jun 28 08:14:04 2007
New Revision: 551592

URL: http://svn.apache.org/viewvc?view=rev&rev=551592
Log:
 now prefers evaluation result/return value over value 
property.

Modified:
ant/core/trunk/WHATSNEW

ant/core/trunk/src/main/org/apache/tools/ant/types/optional/AbstractScriptComponent.java

ant/core/trunk/src/main/org/apache/tools/ant/types/optional/ScriptCondition.java
ant/core/trunk/src/tests/antunit/types/scriptcondition-test.xml

Modified: ant/core/trunk/WHATSNEW
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?view=diff&rev=551592&r1=551591&r2=551592
==
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Thu Jun 28 08:14:04 2007
@@ -14,6 +14,8 @@
   been modified to encode outgoing (InputStream) content as well as encoding
   incoming (OutputStream) content.
 
+*  now prefers evaluation result/return value over value 
property.
+
 Fixed bugs:
 ---
 * Regression: Locator fails with URI encoding problem when spaces in path

Modified: 
ant/core/trunk/src/main/org/apache/tools/ant/types/optional/AbstractScriptComponent.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/optional/AbstractScriptComponent.java?view=diff&rev=551592&r1=551591&r2=551592
==
--- 
ant/core/trunk/src/main/org/apache/tools/ant/types/optional/AbstractScriptComponent.java
 (original)
+++ 
ant/core/trunk/src/main/org/apache/tools/ant/types/optional/AbstractScriptComponent.java
 Thu Jun 28 08:14:04 2007
@@ -17,6 +17,8 @@
  */
 package org.apache.tools.ant.types.optional;
 
+import java.io.File;
+
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.ProjectComponent;
 import org.apache.tools.ant.types.Path;
@@ -24,9 +26,6 @@
 import org.apache.tools.ant.util.ScriptRunnerBase;
 import org.apache.tools.ant.util.ScriptRunnerHelper;
 
-
-import java.io.File;
-
 /**
  * This is a [EMAIL PROTECTED] ProjectComponent} that has script support built 
in
  * Use it as a foundation for scriptable things.
@@ -140,5 +139,14 @@
  */
 protected void executeScript(String execName) {
 getRunner().executeScript(execName);
+}
+
+/**
+ * Evaluate a script.
+ * @param execName name of the script.
+ * @return the result of the evaluation.
+ */
+protected Object evaluateScript(String execName) {
+return getRunner().evaluateScript(execName);
 }
 }

Modified: 
ant/core/trunk/src/main/org/apache/tools/ant/types/optional/ScriptCondition.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/optional/ScriptCondition.java?view=diff&rev=551592&r1=551591&r2=551592
==
--- 
ant/core/trunk/src/main/org/apache/tools/ant/types/optional/ScriptCondition.java
 (original)
+++ 
ant/core/trunk/src/main/org/apache/tools/ant/types/optional/ScriptCondition.java
 Thu Jun 28 08:14:04 2007
@@ -33,7 +33,6 @@
  */
 private boolean value = false;
 
-
 /**
  * Is this condition true?
  *
@@ -44,8 +43,8 @@
  */
 public boolean eval() throws BuildException {
 initScriptRunner();
-executeScript("ant_condition");
-return getValue();
+Object result = evaluateScript("ant_condition");
+return result instanceof Boolean ? ((Boolean) result).booleanValue() : 
getValue();
 }
 
 /**

Modified: ant/core/trunk/src/tests/antunit/types/scriptcondition-test.xml
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/types/scriptcondition-test.xml?view=diff&rev=551592&r1=551591&r2=551592
==
--- ant/core/trunk/src/tests/antunit/types/scriptcondition-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/types/scriptcondition-test.xml Thu Jun 28 
08:14:04 2007
@@ -70,4 +70,87 @@
   
 
   
+
+  
+
+  
+return true;
+  
+
+  
+
+  
+
+  
+return false;
+  
+
+  
+
+  
+
+  
+self.setValue(true);
+return false;
+  
+
+  
+
+  
+
+  
+return null;
+  
+
+  
+
+  
+
+  
+return 20;
+  
+
+  
+
+  
+
+  
+java.lang.Boolean.TRUE
+  
+
+  
+
+  
+
+  
+java.lang.Boolean.FALSE
+  
+
+  
+
+  
+
+  
+self.setValue(true);
+false
+  
+
+  
+
+  
+
+  
+null
+  
+
+  
+
+  
+
+  
+new java.lang.Integer(20)
+  
+
+  
+
 



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



Re: svn commit: r551592 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/types/optional/AbstractScriptComponent.java src/main/org/apache/tools/ant/types/optional/ScriptCondition.java src/t

2007-06-28 Thread Matt Benson
Steve or anyone else:  Let me know if you feel this
change is too risky; it just seemed intuitive to me.

br,
Matt

--- [EMAIL PROTECTED] wrote:

> Author: mbenson
> Date: Thu Jun 28 08:14:04 2007
> New Revision: 551592
> 
> URL:
> http://svn.apache.org/viewvc?view=rev&rev=551592
> Log:
>  now prefers evaluation
> result/return value over value property.
> 
> Modified:
> ant/core/trunk/WHATSNEW
>
>
ant/core/trunk/src/main/org/apache/tools/ant/types/optional/AbstractScriptComponent.java
>
>
ant/core/trunk/src/main/org/apache/tools/ant/types/optional/ScriptCondition.java
>
>
ant/core/trunk/src/tests/antunit/types/scriptcondition-test.xml
> 
> Modified: ant/core/trunk/WHATSNEW
> URL:
>
http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?view=diff&rev=551592&r1=551591&r2=551592
>
==
> --- ant/core/trunk/WHATSNEW (original)
> +++ ant/core/trunk/WHATSNEW Thu Jun 28 08:14:04 2007
> @@ -14,6 +14,8 @@
>been modified to encode outgoing (InputStream)
> content as well as encoding
>incoming (OutputStream) content.
>  
> +*  now prefers evaluation
> result/return value over value property.
> +
>  Fixed bugs:
>  ---
>  * Regression: Locator fails with URI encoding
> problem when spaces in path
> 
> Modified:
>
ant/core/trunk/src/main/org/apache/tools/ant/types/optional/AbstractScriptComponent.java
> URL:
>
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/optional/AbstractScriptComponent.java?view=diff&rev=551592&r1=551591&r2=551592
>
==
> ---
>
ant/core/trunk/src/main/org/apache/tools/ant/types/optional/AbstractScriptComponent.java
> (original)
> +++
>
ant/core/trunk/src/main/org/apache/tools/ant/types/optional/AbstractScriptComponent.java
> Thu Jun 28 08:14:04 2007
> @@ -17,6 +17,8 @@
>   */
>  package org.apache.tools.ant.types.optional;
>  
> +import java.io.File;
> +
>  import org.apache.tools.ant.Project;
>  import org.apache.tools.ant.ProjectComponent;
>  import org.apache.tools.ant.types.Path;
> @@ -24,9 +26,6 @@
>  import org.apache.tools.ant.util.ScriptRunnerBase;
>  import
> org.apache.tools.ant.util.ScriptRunnerHelper;
>  
> -
> -import java.io.File;
> -
>  /**
>   * This is a [EMAIL PROTECTED] ProjectComponent} that has
> script support built in
>   * Use it as a foundation for scriptable things.
> @@ -140,5 +139,14 @@
>   */
>  protected void executeScript(String execName) {
>  getRunner().executeScript(execName);
> +}
> +
> +/**
> + * Evaluate a script.
> + * @param execName name of the script.
> + * @return the result of the evaluation.
> + */
> +protected Object evaluateScript(String
> execName) {
> +return
> getRunner().evaluateScript(execName);
>  }
>  }
> 
> Modified:
>
ant/core/trunk/src/main/org/apache/tools/ant/types/optional/ScriptCondition.java
> URL:
>
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/optional/ScriptCondition.java?view=diff&rev=551592&r1=551591&r2=551592
>
==
> ---
>
ant/core/trunk/src/main/org/apache/tools/ant/types/optional/ScriptCondition.java
> (original)
> +++
>
ant/core/trunk/src/main/org/apache/tools/ant/types/optional/ScriptCondition.java
> Thu Jun 28 08:14:04 2007
> @@ -33,7 +33,6 @@
>   */
>  private boolean value = false;
>  
> -
>  /**
>   * Is this condition true?
>   *
> @@ -44,8 +43,8 @@
>   */
>  public boolean eval() throws BuildException {
>  initScriptRunner();
> -executeScript("ant_condition");
> -return getValue();
> +Object result =
> evaluateScript("ant_condition");
> +return result instanceof Boolean ?
> ((Boolean) result).booleanValue() : getValue();
>  }
>  
>  /**
> 
> Modified:
>
ant/core/trunk/src/tests/antunit/types/scriptcondition-test.xml
> URL:
>
http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/types/scriptcondition-test.xml?view=diff&rev=551592&r1=551591&r2=551592
>
==
> ---
>
ant/core/trunk/src/tests/antunit/types/scriptcondition-test.xml
> (original)
> +++
>
ant/core/trunk/src/tests/antunit/types/scriptcondition-test.xml
> Thu Jun 28 08:14:04 2007
> @@ -70,4 +70,87 @@
>
>  
>
> +
> +  
> +
> +   value="false">
> +return true;
> +  
> +
> +  
> +
> +  
> +
> +   value="true">
> +return false;
> +  
> +
> +  
> +
> +  
> +
> +   value="false">
> +self.setValue(true);
> +return false;
> +  
> +
> +  
> +
> +  
> +
> +   value="true">
> +return null;
> +  
> +
> +  
> +
> +   name="testBeanshellReturnNonBooleanIgnored">
> + message="testBeanshellReturnNonBooleanIgnored">
> +   value="true"

DO NOT REPLY [Bug 42770] New: - IndexOutOfBounds exception in when the URI is invalid

2007-06-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42770

   Summary: IndexOutOfBounds exception in  when the URI is
invalid
   Product: Ant
   Version: 1.7Alpha (nightly)
  Platform: Other
OS/Version: other
Status: NEW
  Severity: normal
  Priority: P2
 Component: Optional Tasks
AssignedTo: dev@ant.apache.org
ReportedBy: [EMAIL PROTECTED]


I'm doing an scp, but the path I am setting up is wrong; its an unexpanded 
property:



  


This is breaking the code that cracks the string:

release.rpm-upload:
Property "ssh.server" has not been set
 [echo] SCP target is ${ssh.server}
  [ssh-rpm] Connecting to 16.25.169.163:22
Property "rpm.ssh.path" has not been set

==
Exiting failing project "release"
==

BUILD FAILED - at 28/06/07 17:02
/home/slo/Projects/SmartFrog/Forge/core/release/build.xml:547:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at org.apache.tools.ant.taskdefs.optional.ssh.Scp.execute(Scp.java:215)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of 
range: -1
at java.lang.String.substring(String.java:1938)
at org.apache.tools.ant.taskdefs.optional.ssh.Scp.parseUri(Scp.java:321)
at org.apache.tools.ant.taskdefs.optional.ssh.Scp.upload(Scp.java:253)
at org.apache.tools.ant.taskdefs.optional.ssh.Scp.execute(Scp.java:201)
... 16 more
--- Nested Exception ---
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1938)
at org.apache.tools.ant.taskdefs.optional.ssh.Scp.parseUri(Scp.java:321)
at org.apache.tools.ant.taskdefs.optional.ssh.Scp.upload(Scp.java:253)
at org.apache.tools.ant.taskdefs.optional.ssh.Scp.execute(Scp.java:201)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 42770] - IndexOutOfBounds exception in when the URI is invalid

2007-06-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42770





--- Additional Comments From [EMAIL PROTECTED]  2007-06-28 10:22 ---
What is the expected behavior? In this case the '@' symbol is not found in the 
URI, therefore the java.lang.StringIndexOutOfBoundsException is produced. Do we 
want it to produce a useful error message?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 42774] New: - dependset incorrectly evaluates newest source when over 24 days old

2007-06-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42774

   Summary: dependset incorrectly evaluates newest source when over
24 days old
   Product: Ant
   Version: 1.7.0
  Platform: Other
OS/Version: Windows XP
Status: NEW
  Severity: regression
  Priority: P1
 Component: Core tasks
AssignedTo: dev@ant.apache.org
ReportedBy: [EMAIL PROTECTED]


The dependset task returns older source file as newer when a file included in
srcfileset is older than 24 days (the cutoff is actually 35791 minutes). 
Dependset works as expected in versions 1.6.2 and 1.6.5.  The result (in 1.7.0)
is that target files are not deleted if any source files are over 24 days old.

To reproduce:
1. Create a target file, a source file newer than the target file, and another
source file with a timestamp of (at least) 25 days old.
2. Create a target that includes the following code:
  


   
3. Invoke "ant  -verbose -debug".

The oldest source file be reported as "newest source".

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 42774] - dependset incorrectly evaluates newest source when over 24 days old

2007-06-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42774





--- Additional Comments From [EMAIL PROTECTED]  2007-06-28 16:28 ---
Created an attachment (id=20414)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=20414&action=view)
Ant files that demonstrates bug

Ant buildfile ("ant -f dependset.xml") that demonstrates the bug in dependset.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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