RE: antlibs and classloaders #2

2004-05-10 Thread Jose Alberto Fernandez
 From: Mariano Benitez [mailto:[EMAIL PROTECTED] 
 
 but ... If I call typedef for the same file, with the same 
 task, same 
 uri, etc, why it redefine the tasks if they are already defined?
 
 BTW, it could help an unless attribute for typedef, not to 
 do it again :)
typedef resource=fuego/internal/test/ant/antlib.xml   
 uri=antlib:fuego.internal.test.ant   
 loaderRef=fuego.internal.test 
 classpathref=fuego.internal.test.antlibs.path unless=defined/
property name=defined value=true/
 

I would advocate for a new condition:

  isdefined {uri=uri | name=[NS:]name} /

Which is true for uri if there are things already defined in that uri;
and for name if there is a definition already associated with that
name
(in te particular NS). This should include all kinds of definitions
typedefs, macros, selectors, mappers, etc. We should add a role
also once that issue is sorted out.

Jose Alberto

 MAriano
 
 Peter Reilly wrote:
 
  Hi Mariano,
  I assume you are calling the typedef commands multiple times.
  - hence the different antloaders. But you only need to typedef the 
  types/tasks once.
 
  You should wrap the taskdefs in a macrodef or a target,
  and call them once in the master build file before doing
  any subant, or ant calls.
 
  Peter
 
  Mariano Benitez wrote:
 
  I am at the edge of a mental crisis, I need help
 
 
  Can someone explain how antlib paths and tasks works, I have this
  situation that I cannot understand.
 
 
  I defined this:
 
  project name=fuego.internal.test.include basedir=.
 
 property name=xml.encoding value=ISO-8859-1/
   path id=fuego.internal.test.antlibs.path
 fileset dir=${fuego.basedir}/lib
 include name=fuegoexpress-antlib.jar/
 include name=fuegoenterprise-antlib.jar/
 include name=fuegoj2ee-antlib.jar/
 include name=fuego-test-antlib.jar/
 /fileset
 /path
 typedef resource=fuego/internal/test/ant/antlib.xml   
  uri=antlib:fuego.internal.test.ant   
  loaderRef=fuego.internal.test
  classpathref=fuego.internal.test.antlibs.path/
 typedef resource=fuego/tools/ant/enterprise/antlib.xml 
  uri=antlib:fuego.tools.ant.enterprise 
  loaderRef=fuego.internal.test 
  classpathref=fuego.internal.test.antlibs.path/
 typedef resource=fuego/tools/ant/express/antlib.xml
  uri=antlib:fuego.tools.ant.express  
  loaderRef=fuego.internal.test 
  classpathref=fuego.internal.test.antlibs.path/
 typedef resource=fuego/tools/ant/j2ee/antlib.xml  
  uri=antlib:fuego.tools.ant.j2ee  
  loaderRef=fuego.internal.test 
  classpathref=fuego.internal.test.antlibs.path/
  /project
 
  another Jar fuegocore.jar is in the classpath manifest of those
  jars, inside the fuegocore jar there is a clas Loader.
 
  When I am executing one of the tasks in the antlib I do this.
 
  Inside an Utils.class static method:
 task.log([LOADERS]  Loader Class [ + 
 Loader.class.hashCode()
  + / + Loader.class.getClassLoader() + ]);
 task.log([LOADERS]  Utils Class [ + 
 Utils.class.hashCode() +
  / + Utils.class.getClassLoader() + ]);
 
  and  this is the result I get when I run this multiple times in the
  same ant run.
 
  [t:testsetup] [LOADERS]  Loader Class
  [6597453/[EMAIL PROTECTED]
  [t:testsetup] [LOADERS]  Utils Class 
  [19551658/[EMAIL PROTECTED]
 
  [t:testsetup] [LOADERS]  Loader Class
  [6597453/[EMAIL PROTECTED]
  [t:testsetup] [LOADERS]  Utils Class 
  [10520143/[EMAIL PROTECTED]
 
  [t:testsetup] [LOADERS]  Loader Class
  [6597453/[EMAIL PROTECTED]
  [t:testsetup] [LOADERS]  Utils Class 
  [28623319/[EMAIL PROTECTED]
 
 
 
  the thing is: WHY THE LOADER CLASS IS ALWAYS THE SAME 
 WHILE THE UTILS
  CLASS IS ALWAYS IN DIFFERENT ANT CLASSLOADERS!!!
 
  Also, If I put a static {} block in the Loader class it is invoked
  many times, not only one as it should, being the same 
 class the one 
  being returned.
 
  Please help,  I cannot understand what is causing this and the
  side-effect is that I get OutOfMemory errors when I run 
 nightly batch 
  tests.
 
 
  Everything is appreciated.
 
  MAriano
 
  
 -
  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]
 
 
 -
 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]



Re: antlibs and classloaders #2

2004-05-10 Thread Peter Reilly
Mariano Benitez wrote:
another thing, I did the typedef thing because I cannot add 
classpath to an antlib definition, so the problems are chained
I hope to get this in for ant 1.6.2.
If I would define antlibs with classpath references directly it would 
be better
You would still face the problem.
The antlib: namespace automatic loading of tasks/types is only triggered 
if a task or type from
the namespace is used.

for example if you have a master.xml file:
project name=master default=dosubprojects
  target name=dosubprojects
 subant target=
fileset dir=. includes=**/build.xml/
 /subant
  /target
/project
and each of the projects had:
project xmlns:cpp=antlib:net.sf.antcontrib.cpptasks default=compile
 cpp:compiler id=compiler.flags
  ...
/project
Each of the subprojects would trigger the task defs for the cpptasks namespace.
The way to work around this would be to do:
project name=master default=dosubprojects 
xmlns:cpp=antlib:net.sf.antcontrib.cpptasks
  cpp:compiler id=dummy.flags/
  target name=dosubprojects
 subant target=
fileset dir=. includes=**/build.xml/
 /subant
  /target
/project
Peter

MAriano
Mariano Benitez wrote:
but ... If I call typedef for the same file, with the same task, 
same uri, etc, why it redefine the tasks if they are already defined?

BTW, it could help an unless attribute for typedef, not to do it 
again :)
  typedef resource=fuego/internal/test/ant/antlib.xml   
uri=antlib:fuego.internal.test.ant   
loaderRef=fuego.internal.test 
classpathref=fuego.internal.test.antlibs.path unless=defined/
  property name=defined value=true/

MAriano
Peter Reilly wrote:
Hi Mariano,
I assume you are calling the typedef commands multiple times.
- hence the different antloaders. But you only need to typedef
the types/tasks once.
You should wrap the taskdefs in a macrodef or a target,
and call them once in the master build file before doing
any subant, or ant calls.
Peter
Mariano Benitez wrote:
I am at the edge of a mental crisis, I need help
Can someone explain how antlib paths and tasks works, I have this 
situation that I cannot understand.

I defined this:
project name=fuego.internal.test.include basedir=.
   property name=xml.encoding value=ISO-8859-1/
 path id=fuego.internal.test.antlibs.path
   fileset dir=${fuego.basedir}/lib
   include name=fuegoexpress-antlib.jar/
   include name=fuegoenterprise-antlib.jar/
   include name=fuegoj2ee-antlib.jar/
   include name=fuego-test-antlib.jar/
   /fileset
   /path
   typedef resource=fuego/internal/test/ant/antlib.xml   
uri=antlib:fuego.internal.test.ant   
loaderRef=fuego.internal.test 
classpathref=fuego.internal.test.antlibs.path/
   typedef resource=fuego/tools/ant/enterprise/antlib.xml 
uri=antlib:fuego.tools.ant.enterprise 
loaderRef=fuego.internal.test 
classpathref=fuego.internal.test.antlibs.path/
   typedef resource=fuego/tools/ant/express/antlib.xml
uri=antlib:fuego.tools.ant.express  
loaderRef=fuego.internal.test 
classpathref=fuego.internal.test.antlibs.path/
   typedef resource=fuego/tools/ant/j2ee/antlib.xml  
uri=antlib:fuego.tools.ant.j2ee  
loaderRef=fuego.internal.test 
classpathref=fuego.internal.test.antlibs.path/
/project

another Jar fuegocore.jar is in the classpath manifest of those 
jars, inside the fuegocore jar there is a clas Loader.

When I am executing one of the tasks in the antlib I do this.
Inside an Utils.class static method:
   task.log([LOADERS]  Loader Class [ + 
Loader.class.hashCode() + / + Loader.class.getClassLoader() + ]);
   task.log([LOADERS]  Utils Class [ + Utils.class.hashCode() 
+ / + Utils.class.getClassLoader() + ]);

and  this is the result I get when I run this multiple times in the 
same ant run.

[t:testsetup] [LOADERS]  Loader Class 
[6597453/[EMAIL PROTECTED]
[t:testsetup] [LOADERS]  Utils Class 
[19551658/[EMAIL PROTECTED]

[t:testsetup] [LOADERS]  Loader Class 
[6597453/[EMAIL PROTECTED]
[t:testsetup] [LOADERS]  Utils Class 
[10520143/[EMAIL PROTECTED]

[t:testsetup] [LOADERS]  Loader Class 
[6597453/[EMAIL PROTECTED]
[t:testsetup] [LOADERS]  Utils Class 
[28623319/[EMAIL PROTECTED]


the thing is: WHY THE LOADER CLASS IS ALWAYS THE SAME WHILE THE 
UTILS CLASS IS ALWAYS IN DIFFERENT ANT CLASSLOADERS!!!

Also, If I put a static {} block in the Loader class it is invoked 
many times, not only one as it should, being the same class the one 
being returned.

Please help,  I cannot understand what is causing this and the 
side-effect is that I get OutOfMemory errors when I run nightly 
batch tests.

Everything is appreciated.
MAriano
-
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]

DO NOT REPLY [Bug 28865] New: - JDepend classespath does not accept jars, but can with minor change.

2004-05-10 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=28865.
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=28865

JDepend classespath does not accept jars, but can with minor change.

   Summary: JDepend classespath does not accept jars, but can with
minor change.
   Product: Ant
   Version: 1.6.1
  Platform: All
OS/Version: Other
Status: NEW
  Severity: Enhancement
  Priority: Other
 Component: Optional Tasks
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


JDepend versions =2.6 can accept .jar, .war and .zip files containing classes 
for analysis.

The current JDependTask has code in methods executeAsForked and executeInVM 
that prevents this by incorrectly preempting JDepend failing in code such as:
  if (!f.exists() || !f.isDirectory()) {
String msg = \
+ f.getPath()
+ \ does not represent a valid
+  directory. JDepend would fail.;
log(msg);
throw new BuildException(msg);
  }

If the || !f.isDirectory() conditions are removed the code works with .jar 
files.  I have tested this with both fork=yes and fork=no.

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



DO NOT REPLY [Bug 28820] - Concat throws ArrayIndexOutOfBounds

2004-05-10 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=28820.
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=28820

Concat throws ArrayIndexOutOfBounds

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |1.6.2



--- Additional Comments From [EMAIL PROTECTED]  2004-05-10 09:20 ---
Fixed in cvs,
Thanks for the report

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



DO NOT REPLY [Bug 28795] - java.lang.StackOverflowError

2004-05-10 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=28795.
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=28795

java.lang.StackOverflowError





--- Additional Comments From [EMAIL PROTECTED]  2004-05-10 13:00 ---
Can you provide a sample build script that
demonstrates the proble?

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



DO NOT REPLY [Bug 28782] - Antlib ClassLoading issues in J2EE environment

2004-05-10 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=28782.
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=28782

Antlib  ClassLoading issues in J2EE environment





--- Additional Comments From [EMAIL PROTECTED]  2004-05-10 13:01 ---
Could you provide a patch against ant head cvs?

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



Re: antlibs and classloaders #2

2004-05-10 Thread Mariano Benitez
Peter Reilly wrote:
another thing, I did the typedef thing because I cannot add 
classpath to an antlib definition, so the problems are chained

I hope to get this in for ant 1.6.2.
This is still in a definition process, I guess, so I cannot make any 
work towards this direction.

You would still face the problem.
The antlib: namespace automatic loading of tasks/types is only 
triggered if a task or type from
the namespace is used.

From what you said I understand that the antlib definition is lazy and 
done from the current ant and descendents, not for the whole ant script, 
this is why if the usage of an antlib task is inside subants, then for 
each one another classloader is created. That's why if I define it in 
the top level ant it applies for all subants.

So, I am thinking of the following workaround for the complete scope of 
the problem:

I create a task antlib that performs would look like this:
antlib property=fuego.antlib.defined
   classpath
   fileset dir=${fuego.basedir}/lib
   include name=fuegoexpress-antlib.jar/
   include name=fuegoenterprise-antlib.jar/
   include name=fuegoj2ee-antlib.jar/
   include name=fuego-test-antlib.jar/
   /fileset
   /classpath
   typedef package=fuego.tools.ant.enterprise/
   typedef package=fuego.tools.ant.express/
   typedef resource=fuego/tools/ant/j2ee/antlib.xml/
   typedef resource=fuego/internal/test/ant/myFile.xml/
/antlib
Here I would check with the property, and if not set define a 
classloader with that classpath and define the antlibs in that loader, 
just what I do in the import file, but inside a task. I can put this 
task in the ant -lib path, and use it in the import files.

What do you think?
MAriano

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


DO NOT REPLY [Bug 28874] New: - Execute class has buggy patchEnvironment() implementation

2004-05-10 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=28874.
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=28874

Execute class has buggy patchEnvironment() implementation

   Summary: Execute class has buggy patchEnvironment()
implementation
   Product: Ant
   Version: 1.5.4
  Platform: All
OS/Version: All
Status: NEW
  Severity: Major
  Priority: Other
 Component: Core
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


When trying to extend an environment for a forked VM for example, it is 
possible to specify modified environment variables, such as pre-pending 
something to the PATH for example.  The modified environment is worked out 
within the Execute class' patchEnvironment() method which has two fundamental 
problems which could cause things to go subtly wrong.

1.  It does case sensitive matching of environment variable keys on all 
platforms.  This should not be the case on Windows.  Our XP machines use Path 
for the PATH environment variable, however this is not necessarily guaranteed.  
Personally I suggest to extend the env element with an optional boolean 
attribute to specify whether the environment variable is case sensitive or not.

2.  Looking at the patchEnvironment() implementation, it matches keys by using 
string.startsWith() which means that PATH_CAT also matches PATH substring.  
This could dangerously cause some environment variables to be dropped off your 
forked process leading to all sorts of potential problems.  Keys should be 
matched for exact length match as well as contents, and also check case 
insestive matches according to the platform or possibly some user specification.

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



RE: antlibs and classloaders #2

2004-05-10 Thread Jose Alberto Fernandez
 From: Mariano Benitez [mailto:[EMAIL PROTECTED] 
 

 So, I am thinking of the following workaround for the 
 complete scope of 
 the problem:
 
 I create a task antlib that performs would look like this:
 
 antlib property=fuego.antlib.defined
 classpath
 fileset dir=${fuego.basedir}/lib
 include name=fuegoexpress-antlib.jar/
 include name=fuegoenterprise-antlib.jar/
 include name=fuegoj2ee-antlib.jar/
 include name=fuego-test-antlib.jar/
 /fileset
 /classpath
 typedef package=fuego.tools.ant.enterprise/
 typedef package=fuego.tools.ant.express/
 typedef resource=fuego/tools/ant/j2ee/antlib.xml/
 typedef resource=fuego/internal/test/ant/myFile.xml/
 /antlib
 

Would the following solve this problem generically? 

project name=X xmlns:mylib=antlib:my.library.package

 !-- 
   This task is automatically available for every ANTLIB
   and its only function is to force the loading of the library
   if necessary. Force the lazy loading.
  --
 mylib:antlibresolve/

/project

The above assumes somehow we manage to define the classpath required
as part of the ANTLIB itself. If not, the task could have the classpath
information.

This looks much better than calling some task from the antlib with
doggie 
parameters.

What do people think?

Jose Alberto

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



Re: antlibs and classloaders #2

2004-05-10 Thread Peter Reilly
This soulds ok, but it could be done
like this:
onceonly
   classpath id=fuego.classpath
  fileset dir=${fuego.basedir}/lib
  include name=fuegoexpress-antlib.jar/
  include name=fuegoenterprise-antlib.jar/
  include name=fuegoj2ee-antlib.jar/
  include name=fuego-test-antlib.jar/
  /fileset
  /classpath
  typedef uri=antlib:fuego.tools.ant.enterprise
 classpathref=fuego.classpath
 loaderref=fuego.classpath.loader
 resource=fuego/tools/ant/j2ee/antlib.xml/
  typedef uri=antlib:fuego.tools.ant.express
 loaderref=fuego.classpath.loader
 resource=fuego/internal/test/ant/myFile.xml
/onceonly
see:
http://marc.theaimsgroup.com/?l=ant-devm=108331661709918w=2
Peter
Mariano Benitez wrote:
Peter Reilly wrote:
another thing, I did the typedef thing because I cannot add 
classpath to an antlib definition, so the problems are chained

I hope to get this in for ant 1.6.2.

This is still in a definition process, I guess, so I cannot make any 
work towards this direction.

You would still face the problem.
The antlib: namespace automatic loading of tasks/types is only 
triggered if a task or type from
the namespace is used.

From what you said I understand that the antlib definition is lazy and 
done from the current ant and descendents, not for the whole ant 
script, this is why if the usage of an antlib task is inside subants, 
then for each one another classloader is created. That's why if I 
define it in the top level ant it applies for all subants.

So, I am thinking of the following workaround for the complete scope 
of the problem:

I create a task antlib that performs would look like this:
antlib property=fuego.antlib.defined
   classpath
   fileset dir=${fuego.basedir}/lib
   include name=fuegoexpress-antlib.jar/
   include name=fuegoenterprise-antlib.jar/
   include name=fuegoj2ee-antlib.jar/
   include name=fuego-test-antlib.jar/
   /fileset
   /classpath
   typedef package=fuego.tools.ant.enterprise/
   typedef package=fuego.tools.ant.express/
   typedef resource=fuego/tools/ant/j2ee/antlib.xml/
   typedef resource=fuego/internal/test/ant/myFile.xml/
/antlib
Here I would check with the property, and if not set define a 
classloader with that classpath and define the antlibs in that loader, 
just what I do in the import file, but inside a task. I can put this 
task in the ant -lib path, and use it in the import files.

What do you think?
MAriano

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


Re: antlibs and classloaders #2

2004-05-10 Thread Peter Reilly
Jose Alberto Fernandez wrote:
Would the following solve this problem generically? 

project name=X xmlns:mylib=antlib:my.library.package
!-- 
  This task is automatically available for every ANTLIB
  and its only function is to force the loading of the library
  if necessary. Force the lazy loading.
 --
mylib:antlibresolve/

/project
The above assumes somehow we manage to define the classpath required
as part of the ANTLIB itself. If not, the task could have the classpath
information.
 

That sounds like a good idea.
It may however be difficult to remember to do this.
The only difference will be the speed of the build.
Peter
This looks much better than calling some task from the antlib with
doggie 
parameters.

What do people think?
Jose Alberto
-
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]


DO NOT REPLY [Bug 28782] - Antlib ClassLoading issues in J2EE environment

2004-05-10 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=28782.
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=28782

Antlib  ClassLoading issues in J2EE environment





--- Additional Comments From [EMAIL PROTECTED]  2004-05-10 17:48 ---
Created an attachment (id=11500)
Hi Peter, here is the patch, cheers

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



DO NOT REPLY [Bug 17240] - Log level of message 'Overriding previous definition of reference to'

2004-05-10 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=17240.
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=17240

Log level of message 'Overriding previous definition of reference to'





--- Additional Comments From [EMAIL PROTECTED]  2004-05-10 18:36 ---
The same problem occurs with script language=jython/ on Ant 1.6.1

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



DO NOT REPLY [Bug 28881] New: - javadoc nested link element does not support packagelistLoc as URL

2004-05-10 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=28881.
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=28881

javadoc nested link element does not support packagelistLoc as URL

   Summary: javadoc nested link element does not support
packagelistLoc as URL
   Product: Ant
   Version: 1.6.1
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Core tasks
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


The linkoffline attribute is described as:  Link to docs at url using 
package list at url2 - separate the URLs by using a space character -- see 
also the nested link element.

A nested link attribute behaves inconsistently with the the javadoc 
linkoffline attribute in that its packagelistLoc attribute cannot be a URL, but 
rather a directory path.  For example, taken from the javadoc section of the 
manual:

link
  offline=true
  href=http://java.sun.com/products/jdk/1.2/docs/api/;
  packagelistLoc=C:\tmp/


The following should also be legal, but is not:

link
  offline=true
  href=http://java.sun.com/products/jdk/1.2/docs/api/;
  packagelistLoc=http://java.sun.com/products/jdk/1.2/docs/api//

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



DO NOT REPLY [Bug 28882] New: - Add if and unless attributes to ProjectComponent.

2004-05-10 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=28882.
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=28882

Add if and unless attributes to ProjectComponent.

   Summary: Add if and unless attributes to ProjectComponent.
   Product: Ant
   Version: 1.7Alpha (nightly)
  Platform: All
OS/Version: Other
Status: NEW
  Severity: Enhancement
  Priority: Other
 Component: Core
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


The ProjectComponent object should have a setIf and setUnless method. If the 
property is not set, the component is not take into account.
If it's not possible It should be at least possible in the Task object.
This feature would add some flexibility in Ant file by removing copy/paste for 
similar targets or by removing extra targets created only for the purpose of the
if/unless.

This feature has been discussed on Ant developer mailing list at
http://marc.theaimsgroup.com/?t=10836900651r=1w=2

Examples
echo message=username property not set using ${user.name} 
unless=username/
property name=username value=${user.name}/

copy dir=dest
  fileset dir=src
excluse name=test/**/* unless=testing/
  /fileset
/copy

!-- In this case it's the caller who set the condition --
antcall target=upload-files if=uptodate/

checksum file=foo.bar if=file-exists/

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



DO NOT REPLY [Bug 28883] New: - Add regex conditions to Ant

2004-05-10 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=28883.
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=28883

Add regex conditions to Ant

   Summary: Add regex conditions to Ant
   Product: Ant
   Version: 1.7Alpha (nightly)
  Platform: All
OS/Version: All
Status: NEW
  Severity: Enhancement
  Priority: Other
 Component: Optional Tasks
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


containsregexp and matchesregexp
 The first one would test a string if it contains a regular exression.
 The second one would test if a string matches a regular expression.

 Example:
 condition propery=legal-password
containsregexp pattern=[1-9] value=${user-input}/
 /condition
 fail message=Your password should at least contain one number
unless=legal-password/
 
 This feature has been discussed on Ant developer mailing list at
http://marc.theaimsgroup.com/?t=10836900651r=1w=2 and it seems that
nobody disagreed.
 I'll try to find some time this week or next week to implement them.
 
About the implementation:
 They should be in the optional package (as dependant of a regex library).
 containsregexp pattern= value=
 both condition should also accept the regexp sub element.

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



DO NOT REPLY [Bug 28884] New: - Keep the properties set after ant or antcall.

2004-05-10 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=28884.
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=28884

Keep the properties set after ant or antcall.

   Summary: Keep the properties set after ant or antcall.
   Product: Ant
   Version: 1.7Alpha (nightly)
  Platform: All
OS/Version: All
Status: NEW
  Severity: Enhancement
  Priority: Other
 Component: Core tasks
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


At the moment if you have a target that define some properties, the only way to
call it in order to get the values is by using depends.
 If you use ant or antcall all properties set in the target are local.
 That's why it would be nice to have a keepProperties (or whatever) attribute
to the ant and antcall task.
  
  Example:
  antcall target=define-versions keepProperties=true/
 This feature has been discussed on Ant developer mailing list at
http://marc.theaimsgroup.com/?t=10836900651r=1w=2

Note that Dale Anson mailed at
http://marc.theaimsgroup.com/?l=ant-devm=108377046631849w=2
that already several tasks exist in AntContrib and Antelop to perform this 
feature.
This means that there is a real need for this functionality.

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



cvs commit: ant/docs external.html projects.html

2004-05-10 Thread jhm
jhm 2004/05/10 08:01:41

  Modified:xdocsTag: ANT_16_BRANCH external.xml projects.xml
   docs Tag: ANT_16_BRANCH external.html projects.html
  Log:
  Sync with HEAD
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.100.2.12 +25 -5 ant/xdocs/external.xml
  
  Index: external.xml
  ===
  RCS file: /home/cvs/ant/xdocs/external.xml,v
  retrieving revision 1.100.2.11
  retrieving revision 1.100.2.12
  diff -u -r1.100.2.11 -r1.100.2.12
  --- external.xml  30 Apr 2004 06:23:09 -  1.100.2.11
  +++ external.xml  10 May 2004 15:01:40 -  1.100.2.12
  @@ -130,7 +130,7 @@
   pAntDoc can be run via an Ant task, AntDoc GUI can be run
   via an Ant task, or via a JVM launch./p
   
  -table
  +table class=externals
 tr
   thCompatibility:/th
   tdAnt 1.4.1 and higher/td
  @@ -389,7 +389,7 @@
 /tr
 tr
   thContact:/th
  -tda href=[EMAIL PROTECTED][EMAIL PROTECTED]/a/td
  +tda href=mailto:[EMAIL PROTECTED][EMAIL PROTECTED]/a/td
 /tr
 tr
   thLicense:/th
  @@ -728,7 +728,15 @@
   quot;borderquot; (add a border), quot;textquot; (text on
   image), quot;cropquot; (a sub-image of a bigger image),
   quot;rotatequot;, quot;grayscalequot; (change a color
  -image to shades of gray)./p
  +image to shades of gray).br/
  +Now it supports transparency (making images translucent), a
  +bestfit option for Resize, simple support for images within
  +a security-constraint, a preliminary support (if pjatools.jar
  +is available) for saving files as GIF and some other fixes./p
  +
  +pIMPORTANT: You will need the PMIW (Poor Man's Imaging Wrapper) jar
  +for all the operations and the pjatools jar for GIF encoding/ saving
  +support./p
   
   table class=externals
 tr
  @@ -741,8 +749,20 @@
   
href=http://www.mullassery.com/software/ANT/;http://www.mullassery.com/software/ANT//a/td
 /tr
 tr
  +thpmiw jar/th
  +tda
  +
href=http://www.mullassery.com/software/PMIW/;http://www.mullassery.com/software/PMIW//a
  +(Poor Man's Imaging Wrapper)/td
  +  /tr
  +  tr
  +thpjatools jar/th
  +tda
  +
href=http://www.eteks.com/pja/en/;http://www.eteks.com/pja/en//a
  +(pjatools for GIF encoding support)/td
  +  /tr
  +  tr
   thContact:/th
  -tda 
href=http://www.mullassery.com/contact/feedback.jsp;Abey Mullassery/a/td
  +tda href=http://www.mullassery.com;Abey Mullassery/a/td
 /tr
 tr
   thLicense:/th
  @@ -1548,7 +1568,7 @@
 tr
   thURL:/th
   td
  -  a href=http://www.kanaputs.org/;http://www.kanaputs.org//a
  +  a 
href=http://www.kanaputs.org/;http://www.kanaputs.org//a br/
 a 
href=http://www.kanaputs.org/ant.html;http://www.kanaputs.org/ant.html/a
   /td
 /tr
  
  
  
  1.10.2.3  +80 -48ant/xdocs/projects.xml
  
  Index: projects.xml
  ===
  RCS file: /home/cvs/ant/xdocs/projects.xml,v
  retrieving revision 1.10.2.2
  retrieving revision 1.10.2.3
  diff -u -r1.10.2.2 -r1.10.2.3
  --- projects.xml  16 Feb 2004 16:45:09 -  1.10.2.2
  +++ projects.xml  10 May 2004 15:01:40 -  1.10.2.3
  @@ -22,7 +22,7 @@
 /properties
   
 body
  -
  +
   section name=Related Projects
   
 pNothing listed here is directly supported by the Ant
  @@ -37,7 +37,7 @@
   (J2EE or other) specific for your application
   architecture./p
   
  -table
  +table class=externals
 tr
   thCompatibility:/th
   td1.4.1 and above/td
  @@ -64,7 +64,7 @@
   playground for experimental tasks like a C/C++ compilation
   task for different compilers./p
   
  -table
  +table class=externals
 tr
   thCompatibility:/th
   td1.4.1 and above/td
  @@ -96,14 +96,14 @@
   Try/Catch/Finally, Switch, Variable, Stopwatch, Limit, Math,
   Post, SSH, SCP, AntFetch, AntCallBack./p
   
  -table
  +table class=externals
 tr
   thCompatibility:/th
  -tdTested extensively with Ant 1.5.x./td
  +tdAnt 1.5 and higher./td
 /tr
 tr
   thURL:/th
  -tda 
href=http://antelope.sourceforge.net/;http://antelope.sourceforge.net//a/td
  +tda 

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

2004-05-10 Thread peterreilly
peterreilly2004/05/10 02:42:04

  Modified:src/main/org/apache/tools/ant/taskdefs Tag: ANT_16_BRANCH
Concat.java
  Log:
  sync with head
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.28.2.7  +3 -1  ant/src/main/org/apache/tools/ant/taskdefs/Concat.java
  
  Index: Concat.java
  ===
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Concat.java,v
  retrieving revision 1.28.2.6
  retrieving revision 1.28.2.7
  diff -u -r1.28.2.6 -r1.28.2.7
  --- Concat.java   9 Mar 2004 17:01:33 -   1.28.2.6
  +++ Concat.java   10 May 2004 09:42:04 -  1.28.2.7
  @@ -677,6 +677,8 @@
   
   private Reader getReader() throws IOException {
   if (reader == null) {
  +log(Concating file  + sourceFiles.elementAt(pos),
  +Project.MSG_VERBOSE);
   if (encoding == null) {
   reader = new BufferedReader(
   new FileReader((File) sourceFiles.elementAt(pos)));
  @@ -773,7 +775,7 @@
   for (int i = nRead;
i  (nRead - lastChars.length);
--i) {
  -if (i  0) {
  +if (i = 0) {
   break;
   }
   addLastChar(cbuf[off + i - 1]);
  
  
  

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



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

2004-05-10 Thread peterreilly
peterreilly2004/05/10 02:19:30

  Modified:src/main/org/apache/tools/ant/taskdefs Concat.java
  Log:
  Concat throws ArrayIndexOutOfBounds with fixlastline
  PR: 28820
  Reported by: Andre Vanha
  
  Revision  ChangesPath
  1.35  +3 -1  ant/src/main/org/apache/tools/ant/taskdefs/Concat.java
  
  Index: Concat.java
  ===
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Concat.java,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- Concat.java   9 Mar 2004 16:48:04 -   1.34
  +++ Concat.java   10 May 2004 09:19:30 -  1.35
  @@ -677,6 +677,8 @@
   
   private Reader getReader() throws IOException {
   if (reader == null) {
  +log(Concating file  + sourceFiles.elementAt(pos),
  +Project.MSG_VERBOSE);
   if (encoding == null) {
   reader = new BufferedReader(
   new FileReader((File) sourceFiles.elementAt(pos)));
  @@ -773,7 +775,7 @@
   for (int i = nRead;
i  (nRead - lastChars.length);
--i) {
  -if (i  0) {
  +if (i = 0) {
   break;
   }
   addLastChar(cbuf[off + i - 1]);
  
  
  

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