DO NOT REPLY [Bug 33162] - OutOfMemoryException when compiling a large project

2005-03-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=33162.
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=33162


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2005-03-02 01:15 ---
I used the javac fork option with memoryMaximumSize=800m and it worked 
fine.   
Now I feel silly.   
  
Anyone know how to pass to javac -Xmx800m without forking?  
   

-- 
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]



Ant documentation

2005-03-02 Thread Kev Jackson
Since there has been some discussion about prodcuing better docs on the 
list I thought I'd look into it.

I've recently debugged the AspectJ teams docbook, so I've had my head in 
the docbook format/FOP for a couple of weeks.  I've just got a basic 
transform to PDF done of the first section (really just a test section 
to prove that Fop was doing it's thing) (attached for comments).

The dependencies are pretty hefty, currently I'm using :
Fop (latest 20.5 or something)
Saxon (something like version 6, not sure on this, but it works)
Docbook 4.1.2 I think, again a little unsure, and I've made a couple of 
bug fixes to this version too.

Anyway, with the correct config, it's a fairly simple build file to 
generate the pdf, although rewriting the manual from html-xml will be a 
chore (although by no means impossible :)

Thoughts/comments more than welcome
Kev
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Ant docs again

2005-03-02 Thread Kev Jackson
Sorry didn't seem to attach last time?
I'll create a bug rep and upload to that as its probably more sensible 
than spamming everyone with a pdf hey.

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


DO NOT REPLY [Bug 33800] New: - PDF manual for ant

2005-03-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=33800.
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=33800

   Summary: PDF manual for ant
   Product: Ant
   Version: unspecified
  Platform: PC
OS/Version: All
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Documentation
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


As mentioned on dev list

-- 
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 33800] - PDF manual for ant

2005-03-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=33800.
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=33800





--- Additional Comments From [EMAIL PROTECTED]  2005-03-02 05:30 ---
Created an attachment (id=14384)
 -- (http://issues.apache.org/bugzilla/attachment.cgi?id=14384action=view)
Fop generated pdf manual

First pass/proof of concept of docbook/Fop generated pdf manual for ant

Comments welcome.

-- 
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 33800] - PDF manual for ant

2005-03-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=33800.
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=33800





--- Additional Comments From [EMAIL PROTECTED]  2005-03-02 05:30 ---
Created an attachment (id=14385)
 -- (http://issues.apache.org/bugzilla/attachment.cgi?id=14385action=view)
Fop generated pdf manual

First pass/proof of concept of docbook/Fop generated pdf manual for ant

Comments welcome.

-- 
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: Launching Ant again

2005-03-02 Thread Yves Martin
Phil Weighill-Smith [EMAIL PROTECTED] writes:

 You could make your build generate a build-targets.xml from the
 project.xml then have a standard build.xml that:

 1. invokes a task that will re-generate the build-targets.xml from
 project.xml if it is out-of-date
 2. imports build-targets.xml

 That's an option. I will try.
 But I think '-projecthelp' command will have difficulty to report all
 available targets if the default build.xml is used.

 Thank you for your idea
-- 
Yves Martin


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



RE: Launching Ant again

2005-03-02 Thread Phil Weighill-Smith
-projecthelp will still work since it executes after the entire build.xml has 
been loaded, including any imports.

-Original Message- 
From: Yves Martin [mailto:[EMAIL PROTECTED] 
Sent: Wed 02/03/2005 07:32 
To: Ant Developers List 
Cc: 
Subject: Re: Launching Ant again



Phil Weighill-Smith [EMAIL PROTECTED] writes:

 You could make your build generate a build-targets.xml from the
 project.xml then have a standard build.xml that:

 1. invokes a task that will re-generate the build-targets.xml from
 project.xml if it is out-of-date
 2. imports build-targets.xml

 That's an option. I will try.
 But I think '-projecthelp' command will have difficulty to report all
 available targets if the default build.xml is used.

 Thank you for your idea
--
Yves Martin


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



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

AW: extra diagnosis

2005-03-02 Thread Jan . Materne
  3. do we want this extra diagnosis in 'ant -diagnosis'? OR something
  like
  
  ant -diagnosis taskname
  to trigger a task analysis (and nothing else)
  
  i like that latter;
 
 Me too.

That needs the possibility to pass args.
ATM the
  ant -diagnostics taskname
sounds to start the target taskname. -help, -version and -diagnostics quit
the oata.Main.processArgs() method without any additional parameters so this
wouldnt
happen. But supplying a parameter for these attributes would be incosistent
to the usual
invocation syntax
  ant [options] [targetname]

IMO something like
  ant -diagnostics -- taskname
would be more consistent. And it would allow to pass additional parameters
(I think DD has
done a Bug for that :)


Jan


DO NOT REPLY [Bug 33800] - PDF manual for ant

2005-03-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=33800.
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=33800


[EMAIL PROTECTED] changed:

   What|Removed |Added

  Attachment #14384|0   |1
is obsolete||
  Attachment #14385|0   |1
is obsolete||




--- Additional Comments From [EMAIL PROTECTED]  2005-03-02 10:18 ---
Created an attachment (id=14387)
 -- (http://issues.apache.org/bugzilla/attachment.cgi?id=14387action=view)
First translation of using.html to PDF

Generated from docbook xml sources through Fop

-- 
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 33162] - OutOfMemoryException when compiling a large project

2005-03-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=33162.
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=33162





--- Additional Comments From [EMAIL PROTECTED]  2005-03-02 10:47 ---
you cant increase the memory for javac without forking, as it is the JVM itself
that is being given the memory allocation -you need a new JVM.

If you really are building big things, try using the jikes compiler instead. Its
a lot faster, and is always in a new process. What it does not do is compile
Java1.5 language extensions yet.

Interesting that you have a 64 bit box, presumably running a 64 bit linux
release? I suspect the memory requirement of 64-bit JVMs to be a lot higher,
just because all pointers doubled in size. I wonder what the default JVM size
has to be -it has to be more than 64M. But as a consequence, wherever you set a
JVM size in ant, those sizes will need to be bumped up too. (unless we try and
be clever and on 64 bit boxes, double all memory allocations. Something to 
consider)

-- 
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]



[GUMP@brutus]: Project test-ant-no-xerces (in module ant) failed

2005-03-02 Thread Gump Integration Build
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at [EMAIL PROTECTED]

Project test-ant-no-xerces has an issue affecting its community integration.
This issue affects 1 projects,
 and has been outstanding for 10 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- test-ant-no-xerces :  Java based build tool


Full details are available at:
http://brutus.apache.org/gump/public/ant/test-ant-no-xerces/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -INFO- Failed with reason build failed



The following work was performed:
http://brutus.apache.org/gump/public/ant/test-ant-no-xerces/gump_work/build_ant_test-ant-no-xerces.html
Work Name: build_ant_test-ant-no-xerces (Type: Build)
Work ended in a state of : Failed
Elapsed: 7 mins 41 secs
Command Line: java -Djava.awt.headless=true org.apache.tools.ant.Main 
-Dgump.merge=/home/gump/workspaces2/public/gump/work/merge.xml 
-Dbuild.sysclasspath=only -Dtest.haltonfailure=false 
-Dant.home=/usr/local/gump/public/workspace/ant/dist run-tests 
[Working Directory: /usr/local/gump/public/workspace/ant]
CLASSPATH: 

Re: a few questions (sorry quite long)

2005-03-02 Thread Peter Reilly
Stefan Bodewig wrote:
On Mon, 28 Feb 2005, James Fuller [EMAIL PROTECTED] wrote:
 

- does scriptdef have namespace capability
   

I read in a comment on my blog that a user found the only way to place
a scriptdef'ed task into a namspace other than default was putting it
into an antlib.  This feels wrong.
 

The doc does not mention it, but scriptdef inherits attributes from 
DefBase,
so the following works:
   scriptdef name=a uri=a.b.c language=beanshell
 attribute name=attr/
 self.log(Attribute attr1 =  + attributes.get(attr));
   /scriptdef
   a xmlns=a.b.c attr=b/
 /target

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


Re: [PATCH] fix typo in script documentation

2005-03-02 Thread Peter Reilly
Shatzer, Larry wrote:
It is supposed to be importClass(Packages.org...) not
importClass(Package.org...).
 

Thanks Larry, I was wondering why this did not work!
Peter
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


USE ANT_OPTS RE: OutOfMemoryException when compiling a large project

2005-03-02 Thread Kenneth Wood

As someone suggested earlier, define ANT_OPTS in your environment
(read the Ant documentation about using ANT_OPTS)

For example, we use

ANT_OPTS=-Xmx1024m -Xms256m

Then you can compile without the need to use fork.

From my build log, compiling more files than your case of 496 files:

javac:
[javac] Compiling 643 source files to ...


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 01, 2005 6:15 PM
To: [EMAIL PROTECTED]
Subject: DO NOT REPLY [Bug 33162] - OutOfMemoryException when compiling
a large project


DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG*
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=33162.
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=33162


[EMAIL PROTECTED] changed:

   What|Removed |Added


 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2005-03-02 01:15
---
I used the javac fork option with memoryMaximumSize=800m and it
worked fine.   
Now I feel silly.   
  
Anyone know how to pass to javac -Xmx800m without forking?  
   

-- 
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]


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



[Ant Wiki] Updated: Ant17/Planning

2005-03-02 Thread ant-cvs
   Date: 2005-03-02T07:05:43
   Editor: SteveLoughran
   Wiki: Ant Wiki
   Page: Ant17/Planning
   URL: http://wiki.apache.org/ant/Ant17/Planning

   moving fixed stuff into an appropriate place.

Change Log:

--
@@ -46,6 +46,9 @@
  * reduce number of outstanding bugzilla ''bugs'' by fixing them.
  * reduce number of outstanding bugzilla ''enhancements'' by implementing 
some, or closing them off.
  * include fetch.xml in redist package
+
+=== ''Want'' Features Implemented ===
+
  * improve diagnostics when something like junit wont instantiate. i.e. 
distinguish class not found from class not loadable and explain why the 
difference. Maybe allow for per-task diagnostics text through a static member 
function, or extra markup in the taskdef.
 
 
@@ -58,6 +61,10 @@
  * Look at all SCM tasks and pull in pending patches for new features. Find 
people to test them.
  * rename junit.jar to junit-3.8.1 in SCM, for libraries integration. As 
this is only in lib/optional, effects should be minimal (i.e. rename wont be 
visible to end users).
 
+
+== Bugs to Fix ==
+
+With bugzilla URLs and summary text, please.
 
 == WONTFIX ==
 

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



DO NOT REPLY [Bug 33162] - OutOfMemoryException when compiling a large project

2005-03-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=33162.
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=33162





--- Additional Comments From [EMAIL PROTECTED]  2005-03-02 19:10 ---
You can bump the memory available to javac without fork, along with everything
processed by the jvm ant is running by specifying the -Xmx option in ANT_OPTS
(or by tinkering your script to start ant.)

-- 
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]



cvs commit: ant/docs/manual/OptionalTasks script.html

2005-03-02 Thread peterreilly
peterreilly2005/03/02 11:26:09

  Modified:docs/manual/OptionalTasks script.html
  Log:
  remove reference to jruby 0.7.0 as jruby 0.8.0 has been released
  
  Revision  ChangesPath
  1.23  +0 -5  ant/docs/manual/OptionalTasks/script.html
  
  Index: script.html
  ===
  RCS file: /home/cvs/ant/docs/manual/OptionalTasks/script.html,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- script.html   1 Mar 2005 23:22:01 -   1.22
  +++ script.html   2 Mar 2005 19:26:09 -   1.23
  @@ -95,11 +95,6 @@
   /pre
 /blockquote
 p
  -Note that due to a limitation in the current version of jruby (0.7.0),
  -$project.log(Hello World) does not work (most likely because there are
  -two log methods on Project), this is fixed in the current CVS version of 
jruby.
  -  /p
  -  p
   The same example in groovy is:
 /p
 blockquotepre
  
  
  

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



cvs commit: ant/docs/manual/OptionalTasks script.html

2005-03-02 Thread peterreilly
peterreilly2005/03/02 11:38:45

  Modified:docs/manual/OptionalTasks Tag: ANT_16_BRANCH script.html
  Log:
  sync
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.13.2.6  +62 -13ant/docs/manual/OptionalTasks/script.html
  
  Index: script.html
  ===
  RCS file: /home/cvs/ant/docs/manual/OptionalTasks/script.html,v
  retrieving revision 1.13.2.5
  retrieving revision 1.13.2.6
  diff -u -r1.13.2.5 -r1.13.2.6
  --- script.html   19 Nov 2004 09:10:04 -  1.13.2.5
  +++ script.html   2 Mar 2005 19:38:45 -   1.13.2.6
  @@ -1,7 +1,7 @@
   html
   
   head
  -meta http-equiv=Content-Language content=en-us
  +meta http-equiv=Content-Language content=en-us/meta
   titleScript Task/title
   link rel=stylesheet type=text/css href=../stylesheets/antmanual.css
   /head
  @@ -20,14 +20,14 @@
   valid Java identifiers, that is).
   The name project is a pre-defined reference to the Project, which can be
   used instead of the project name. The name self is a pre-defined reference 
to the actual
  -lt;scriptgt;-Task instance.brFrom these objects you have access to the 
Ant Java API, see the
  +codelt;scriptgt;/code-Task instance.br/From these objects you have 
access to the Ant Java API, see the
   a href=../api/index.htmlJavaDoc/a (especially for
   a href=../api/org/apache/tools/ant/Project.htmlProject/a and
   a 
href=../api/org/apache/tools/ant/taskdefs/optional/Script.htmlScript/a) 
for more information./p
   pIf you are using JavaScript a good resource is a target=_blank 
href=http://www.mozilla.org/rhino/doc.html;
   http://www.mozilla.org/rhino/doc.html/a as we are using their JavaScript 
interpreter./p
   pScripts can do almost anything a task written in Java could do./p
  -pRhino provides a special construct - the iJavaAdapter/i. Whith that 
you can
  +pRhino provides a special construct - the iJavaAdapter/i. With that 
you can
   create an object which implements several interfaces, extends classes and 
for which you
   can overwrite methods. Because this is an undocumented feature (yet), here 
is the link
   to an explanation: a 
href=http://groups.google.com/groups?hl=enlr=ie=UTF-8oe=UTF-8newwindow=1frame=rightth=610d2db45c0756bdseekm=391EEC3C.5236D929%40yahoo.com#link2;
  @@ -56,31 +56,80 @@
 /tr
   /table
   h3Examples/h3
  +The following snippet shows use of five different languages:
  +  blockquotepre
  +lt;property name=message value=Hello world/gt;
  +
  +lt;script language=groovygt;
  +  println(message is  + message)
  +lt;/scriptgt;
  +
  +lt;script language=beanshellgt;
  +  System.out.println(message is  + message);
  +lt;/scriptgt;
  +
  +lt;script language=judoscriptgt;
  +println 'message is ', message
  +lt;/scriptgt;
  +
  +lt;script language=rubygt;
  +print 'message is ', $message, \n
  +lt;/scriptgt;
  +
  +lt;script language=jythongt;
  +print message is %s % message
  +lt;/scriptgt;
  +/pre
  +  /blockquote
  +  p
  +  Note that for the ijython/i example, the script contents bmust/b
  +  start on the first column.
  +  /p
  +  p
  +The following script shows a little more complicated jruby example:
  +  /p
  +  blockquotepre
  +lt;script language=rubygt;
  +  xmlfiles = Dir.new(.).entries.delete_if { |i| ! (i =~ /\.xml$/) }
  +  xmlfiles.sort.each { |i| $self.log(i) }
  +lt;/scriptgt;
  +/pre
  +  /blockquote
  +  p
  +The same example in groovy is:
  +  /p
  +  blockquotepre
  +lt;script language=groovygt;
  +  xmlfiles = new java.io.File(.).listFiles().findAll{ it =~ \.xml$}
  +  xmlfiles.sort().each { self.log(it.toString())}
  +lt;/scriptgt;
  +/pre
  +  /blockquote
  +  p
  +The following script uses javascript to create a number of
  +echo tasks and execute them.
  +  /p
   blockquotepre
   lt;project name=quot;squaresquot; default=quot;mainquot; 
basedir=quot;.quot;gt;
   
  -  lt;target name=quot;setupquot;gt;
  +  lt;target name=quot;mainquot;gt;
   
   lt;script language=quot;javascriptquot;gt; lt;![CDATA[
   
 for (i=1; ilt;=10; i++) {
   echo = squares.createTask(quot;echoquot;);
  -main.addTask(echo);
   echo.setMessage(i*i);
  +echo.perform();
 }
   
   ]]gt; lt;/scriptgt;
   
 lt;/targetgt;
   
  -  lt;target name=quot;mainquot; depends=quot;setupquot;/gt;
  -
   lt;/projectgt;
   /pre/blockquote
   pgenerates/p
   blockquotepre
  -setup:
  -
   main:
   1
   4
  @@ -184,13 +233,13 @@
 lt;/targetgt;
   lt;/projectgt;
   /pre/blockquote
  -pWe want to use the Java API. Because we don´t want always typing the 
package signature
  +pWe want to use the Java API. Because we don't want always typing the 
package signature
   we do an import. Rhino knows two different methods for import statements: 
one for packages
   and one for a single class. By default only the ijava/i packages 

cvs commit: ant/docs/manual/CoreTasks input.html

2005-03-02 Thread stevel
stevel  2005/03/02 13:45:11

  Modified:docs/manual/CoreTasks input.html
  Log:
  please stop complaining about the echo
  
  Revision  ChangesPath
  1.12  +10 -0 ant/docs/manual/CoreTasks/input.html
  
  Index: input.html
  ===
  RCS file: /home/cvs/ant/docs/manual/CoreTasks/input.html,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- input.html15 Feb 2004 15:18:47 -  1.11
  +++ input.html2 Mar 2005 21:45:10 -   1.12
  @@ -29,6 +29,16 @@
   a property should be set by the task that has already been set in the
   project (and the task wouldn't have any effect)./p
   
  +pA regular complaint about this task is that it echoes characters to the
  +console, this is a critical security defect, we must fix it immediately, 
etc, etc.
  +We know it leaves something to be desired, but the problem is Java, not Ant.
  +There is nothing we can do to stop the console echoing. /p
  +
  +p
  +IDE behaviour depends upon the IDE: some hang waiting for input, some let you
  +type it in. For this situation, place the password in a (secured) property
  +file and load in before the input task./p
  +
   h3Parameters/h3
   table border=1 cellpadding=2 cellspacing=0
 tr
  
  
  

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



cvs commit: ant/src/main/org/apache/tools/ant DirectoryScanner.java

2005-03-02 Thread mbenson
mbenson 2005/03/02 14:43:54

  Modified:src/main/org/apache/tools/ant DirectoryScanner.java
  Log:
  Stop scanning directories where we match the directory but know based
  on the pattern that we will never match any of its contents.
  
  Revision  ChangesPath
  1.91  +19 -5 ant/src/main/org/apache/tools/ant/DirectoryScanner.java
  
  Index: DirectoryScanner.java
  ===
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/DirectoryScanner.java,v
  retrieving revision 1.90
  retrieving revision 1.91
  diff -u -r1.90 -r1.91
  --- DirectoryScanner.java 11 Feb 2005 22:49:56 -  1.90
  +++ DirectoryScanner.java 2 Mar 2005 22:43:54 -   1.91
  @@ -1117,7 +1117,7 @@
   dirsDeselected.addElement(name);
   }
   everythingIncluded = included;
  -if (fast  (included || couldHoldIncluded(name))) {
  +if (fast  couldHoldIncluded(name)) {
   scandir(file, name + File.separator, fast);
   }
   }
  @@ -1156,16 +1156,30 @@
*/
   protected boolean couldHoldIncluded(String name) {
   for (int i = 0; i  includes.length; i++) {
  -if (matchPatternStart(includes[i], name, isCaseSensitive())) {
  -if (isMorePowerfulThanExcludes(name, includes[i])) {
  -return true;
  -}
  +if (matchPatternStart(includes[i], name, isCaseSensitive())
  + isMorePowerfulThanExcludes(name, includes[i])
  + isDeeper(includes[i], name)) {
  +return true;
   }
   }
   return false;
   }
   
   /**
  + * Verify that a pattern specifies files deeper
  + * than the level of the specified file.
  + * @param pattern the pattern to check.
  + * @param name the name to check.
  + * @return whether the pattern is deeper than the name.
  + * @since Ant 1.6.3
  + */
  +private boolean isDeeper(String pattern, String name) {
  +Vector p = SelectorUtils.tokenizePath(pattern);
  +Vector n = SelectorUtils.tokenizePath(name);
  +return p.contains(**) || p.size()  n.size();
  +}
  +
  +/**
*  Find out whether one particular include pattern is more powerful
*  than all the excludes.
*  Note:  the power comparison is based on the length of the include 
pattern
  
  
  

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



DO NOT REPLY [Bug 33118] - Filescanner toasts on directory without read permissions

2005-03-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=33118.
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=33118





--- Additional Comments From [EMAIL PROTECTED]  2005-03-02 23:58 ---
Hmm... this solved the sub-question: why were we looking in a directory whose
contents we couldn't match?  However, if we specifically try to scan a
restricted directory, the result will be the same. DS is coded (correctly, as
far as it goes) to interpret a null result from File.list() as an I/O error...
then it throws a BuildException.  If we are agreed that it is okay to raise the
exception here then we should probably change the heading of this bugrep;
otherwise we should reopen it.

-- 
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: cvs commit: ant/src/main/org/apache/tools/ant DirectoryScanner.java

2005-03-02 Thread Matt Benson
--- Antoine Levy-Lambert [EMAIL PROTECTED] wrote:

 Hello Matt and others,
 
 I had thought about this issue of optimizing pattern
 scanning.
 DirectoryScanner used to be written so that if an
 exclude pattern looks like
 foo/bar/** scanning stops in foo/bar.
 Actually if an exclude pattern is like **/Test/**,
 every time a directory Test is encountered it should
 not be scanned.

The exception to that rule is if some other directory
Test is more explicitly specified as an include; I
think this is handled as well as can be in
couldHoldIncluded().

 Not sure whether this change does exactly that.
 
 I am not sure exactly what the semantics of isDeeper
 are ?

This method does as little as it has to.  When this
(private) method is called, other methods have
determined the matching as well as we already have
had.  isDeeper defers to SelectorUtils to return
tokenized path Vectors... if the pattern Vector
contains ** it is infinitely deep and thus is
deeper, otherwise the pattern Vector must contain more
tokens than the name in order to be considered deeper.
 Thus if we have no patterns that match files at
deeper levels than we have already reached, we do not
scan.

Hope this clears up a bit,
Matt

 
 Cheers,
 
 Antoine
 
 [EMAIL PROTECTED] wrote:
 
 
 mbenson 2005/03/02 14:43:54
 
   Modified:src/main/org/apache/tools/ant
 DirectoryScanner.java
   Log:
   Stop scanning directories where we match the
 directory but know based
   on the pattern that we will never match any of
 its contents.
    
/**
   + * Verify that a pattern specifies files
 deeper
   + * than the level of the specified file.
   + * @param pattern the pattern to check.
   + * @param name the name to check.
   + * @return whether the pattern is deeper
 than the name.
   + * @since Ant 1.6.3
   + */
   +private boolean isDeeper(String pattern,
 String name) {
   +Vector p =
 SelectorUtils.tokenizePath(pattern);
   +Vector n =
 SelectorUtils.tokenizePath(name);
   +return p.contains(**) || p.size() 
 n.size();
   +}
   +
   
 
 
 
 

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





__ 
Celebrate Yahoo!'s 10th Birthday! 
Yahoo! Netrospective: 100 Moments of the Web 
http://birthday.yahoo.com/netrospective/

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