RE: The JavaCC and JJTree tasks....

2003-04-02 Thread Jene Jasper
Tom,

I noticed your changes. I already downloaded JavaCC 3.0. 

Enabling the taskdefs to work with both versions seems pretty straight
forward. 

But I think it could be useful to make the taskdefs also work when both
versions are available. In which case there should be an optional attribute
to force the taskdef to use a specific version. If the attribute isn't
present the taskdef will figure out the required package name. If both are
available should it then default to 2.1 or 3.0.

Any suggestions for the attribute name: javaccversion 2.1 or 3.0 or
package com or org ?

Sincerely yours,

Jene.
On Tue, 2003-04-01 at 10:05, Jene Jasper wrote:
 I have some patches coming up for JavaCC and JJTree concerning some
missing
 parameters and also an enhancement for a JJDoc taskdef (code is finished,
 only cvs -diff left on a nightly snapshot).
 
 I could look into a patch for version 3.0 added support this coming
weekend.

That's cool... you saw my changes for JavaCC 3.0, right?  Just a package
name change?  Sounds like you're further along than I am

Yours,

tom


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


Re: Patch JavaCC - KEEP_LINE_COLUMN, JJTree - OUTPUT_FILE and new tas kdef JJDoc

2003-04-02 Thread Stefan Bodewig
On Wed, 2 Apr 2003, Jene Jasper [EMAIL PROTECTED] wrote:

 As mentioned yesterday, I have made some changes to the JavaCC and
 JJTree taskdefs and added a new taskdef for JJDoc. I have included
 the patch.txt for the changes.  But what is the best way to deliver
 the new files JJDoc.java and jjdoc.html ?

Create an enhancement request in Bugzilla, attach this patch and the
two new files.

Does your patch include the JavaCC 3.0/2.1 changes?  I'd like to
tackle that separately if possible.

Stefan


DO NOT REPLY [Bug 11044] - FTP chmod from Windows-UNIX: wrong separator

2003-04-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11044.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11044

FTP chmod from Windows-UNIX: wrong separator





--- Additional Comments From [EMAIL PROTECTED]  2003-04-02 08:16 ---
Another problem about separators within class FTP:

Using a Windows client and a Solaris 8 FTP server,
ftp.changeWorkingDirectory(parent) will fail at line 632
within method 

protected void createParents(FTPClient ftp, String filename)

because the local file separator has not been replaced.

Fix:
parent = resolveFile(parent); has to be added at line 632.

if (parent != null) {
+   parent = resolveFile(parent);
if (!ftp.changeWorkingDirectory(parent)) {


RE: Patch JavaCC - KEEP_LINE_COLUMN, JJTree - OUTPUT_FILE and new tas kdef JJDoc

2003-04-02 Thread Jene Jasper
On Wed, 2 Apr 2003, Jene Jasper [EMAIL PROTECTED] wrote:

 As mentioned yesterday, I have made some changes to the JavaCC and
 JJTree taskdefs and added a new taskdef for JJDoc. I have included
 the patch.txt for the changes.  But what is the best way to deliver
 the new files JJDoc.java and jjdoc.html ?

Create an enhancement request in Bugzilla, attach this patch and the
two new files.

Does your patch include the JavaCC 3.0/2.1 changes?  I'd like to
tackle that separately if possible.

We are thinking along the same line. That is why I created this separate
patch.

And about the patch for the JavaCC 3.0/2.1 changes, I have the following
question:
Does it make a difference if I make the patch on my latest revision or the
snapshot of April 1st?
I don't think it will involve the same lines of code.

Jene.



RE: Patch JavaCC - KEEP_LINE_COLUMN, JJTree - OUTPUT_FILE and new tas kdef JJDoc

2003-04-02 Thread Jene Jasper

On Wed, 2 Apr 2003, Jene Jasper [EMAIL PROTECTED] wrote:

 Does it make a difference if I make the patch on my latest revision
 or the snapshot of April 1st?

It might be easier to do if you diffed against CVS HEAD, but ...

 I don't think it will involve the same lines of code.

in this case, patch might work with some fuzzyness.

You could try to apply your patch against a CVS HEAD version to be
sure.

Stefan

I having some problems getting anonymous cvs to work tunneling through my
firewall with PuTTy.
Thus I will try to check in a patch for JavaCC 2.1/3.0 changes against the
latest snapshot around Monday.

Jene.


DO NOT REPLY [Bug 18602] - Enhancement JavaCC, JJTree and JJDoc

2003-04-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18602.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18602

Enhancement JavaCC, JJTree and JJDoc





--- Additional Comments From [EMAIL PROTECTED]  2003-04-02 08:52 ---
Created an attachment (id=5600)
New taskdef JJDoc


Re: Patch JavaCC - KEEP_LINE_COLUMN, JJTree - OUTPUT_FILE and new tas kdef JJDoc

2003-04-02 Thread Stefan Bodewig
On Wed, 2 Apr 2003, Jene Jasper [EMAIL PROTECTED] wrote:

 Thus I will try to check in a patch for JavaCC 2.1/3.0 changes
 against the latest snapshot around Monday.

CVS HEAD hasn't changed for quite some time, shouldn't be a problem.

Stefan


DO NOT REPLY [Bug 18605] New: - XML parser factory nas not been configured correctly

2003-04-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18605.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18605

XML parser factory nas not been configured correctly

   Summary: XML parser factory nas not been configured correctly
   Product: Ant
   Version: 1.5.1
  Platform: Sun
OS/Version: Solaris
Status: NEW
  Severity: Blocker
  Priority: Other
 Component: Build Process
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Hello.

I'm trying to use Ant for the first time. I have installed 
jakarta-ant-1.5.1-bin.zip and I have a problem when I try to build my project.

I get the following error:

BUILD FAILED
XML parser factory has not been configured  correctly: Provider for 
javax.xml.parsers.SAXParserFactory cannot be found

Total time: 0 seconds

I have set JAVA_HOME and ANT_HOME.

The variables set by the ant shell have these values:

JAVACMD= /APLICACIONES/jdk1.1.6/solaris/bin/java
ANT_HOME= /opt/jakarta-ant-1.5.1
LOCALCLASSPATH= 
/opt/jakarta-ant-1.5.1/lib/xml-apis.jar:/opt/jakarta-ant-1.5.1/lib/xercesImpl.ja
r:/opt/jakarta-ant-1.5.1/lib/optional.jar:/opt/jakarta-ant-1.5.1/lib/cpptasks.ja
r:/opt/jakarta-ant-1.5.1/lib/ant.jar:/APLICACIONES/jdk1.1.6/solaris/lib/classes.
zip

All of them are OK.

Our OS is: SUNOS 5.6 Generic_105181-31

Can yo give me any suggestions in order to solve this problem?

Thanks.


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

2003-04-02 Thread conor
conor   2003/04/02 03:43:41

  Modified:src/main/org/apache/tools/ant RuntimeConfigurable.java
UnknownElement.java
   src/main/org/apache/tools/ant/taskdefs Sequential.java
  Log:
  Tweak the handling of config of tasks in task containers.
  Tasks in task containers are not configured until they are used.
  Other elements in Task containers (which is now supported by 1.6)
  will be configured when the task container itself is configured.
  
  Remove override in Sequential as it is no longer necessary
  
  Revision  ChangesPath
  1.28  +6 -1  
ant/src/main/org/apache/tools/ant/RuntimeConfigurable.java
  
  Index: RuntimeConfigurable.java
  ===
  RCS file: 
/home/cvs/ant/src/main/org/apache/tools/ant/RuntimeConfigurable.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -w -u -r1.27 -r1.28
  --- RuntimeConfigurable.java  2 Apr 2003 06:24:34 -   1.27
  +++ RuntimeConfigurable.java  2 Apr 2003 11:43:41 -   1.28
  @@ -339,7 +339,12 @@
   if (configureChildren) {
   if (child.wrappedObject instanceof Task) {
   Task childTask = (Task) child.wrappedObject;
  +
  +// we don't configure tasks of task containers These
  +// we be configured at the time they are used.
  +if (!(target instanceof TaskContainer)) {
   childTask.maybeConfigure();
  +}
   } else {
   child.maybeConfigure(p);
   }
  
  
  
  1.44  +1 -6  ant/src/main/org/apache/tools/ant/UnknownElement.java
  
  Index: UnknownElement.java
  ===
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/UnknownElement.java,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -w -u -r1.43 -r1.44
  --- UnknownElement.java   1 Apr 2003 15:34:38 -   1.43
  +++ UnknownElement.java   2 Apr 2003 11:43:41 -   1.44
  @@ -144,8 +144,7 @@
   // configure attributes of the object and it's children. If it is
   // a task container, defer the configuration till the task container
   // attempts to use the task
  -getWrapper().maybeConfigure(getProject(), 
  -!(realThing instanceof TaskContainer));
  +getWrapper().maybeConfigure(getProject());
   }
   
   /**
  @@ -305,10 +304,6 @@
   }
   
   child.handleChildren(realChild, childWrapper);
  -
  -//if (parent instanceof TaskContainer) {
  -//((Task) realChild).maybeConfigure();
  -//}
   }
   }
   
  
  
  
  1.11  +0 -15 
ant/src/main/org/apache/tools/ant/taskdefs/Sequential.java
  
  Index: Sequential.java
  ===
  RCS file: 
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Sequential.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -w -u -r1.10 -r1.11
  --- Sequential.java   10 Feb 2003 14:13:36 -  1.10
  +++ Sequential.java   2 Apr 2003 11:43:41 -   1.11
  @@ -83,21 +83,6 @@
   private Vector nestedTasks = new Vector();
   
   /**
  - * Override [EMAIL PROTECTED] org.apache.tools.ant.Task#maybeConfigure
  - * maybeConfigure} in a way that leaves the nested tasks
  - * unconfigured until they get executed.
  - *
  - * @since Ant 1.5
  - */
  -public void maybeConfigure() throws BuildException {
  -if (isInvalid()) {
  -super.maybeConfigure();
  -} else {
  -getRuntimeConfigurableWrapper().maybeConfigure(getProject(), 
false);
  -}
  -}
  -
  -/**
* Add a nested task to Sequential.
* p
* @param nestedTask  Nested task to execute Sequential
  
  
  


cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/jdepend JDependTask.java

2003-04-02 Thread bodewig
bodewig 2003/04/02 04:00:27

  Modified:.WHATSNEW
   docs/manual/OptionalTasks jdepend.html
   src/main/org/apache/tools/ant/taskdefs/optional/jdepend
JDependTask.java
  Log:
  Add classespath nested element to mirror sourcespath but point to
  compiled classes.
  
  Add exclude nested element to conditionally exclude packages from
  being parsed.
  
  PR: 17134
  Submitted by: Bob Hays electricbob at alephnaught dot com
  
  Revision  ChangesPath
  1.384 +6 -0  ant/WHATSNEW
  
  Index: WHATSNEW
  ===
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.383
  retrieving revision 1.384
  diff -u -r1.383 -r1.384
  --- WHATSNEW  1 Apr 2003 14:44:00 -   1.383
  +++ WHATSNEW  2 Apr 2003 12:00:27 -   1.384
  @@ -202,6 +202,12 @@
   * junit has a new attribute tempdir that controls the placement of
 temporary files.  Bugzilla Report 15454.
   
  +* jdepend now supports a new nested element classespath which is
  +  the same as sourcespath but point to compiled classes (the
  +  prefered mode of operation for JDepend  2.5).  Additionally, nested
  +  exclude elements can be used to exclude certain packages from
  +  being parsed.  Bugzilla Report 17134.
  +
   Changes from Ant 1.5.2 to Ant 1.5.3
   ===
   
  
  
  
  1.9   +44 -15ant/docs/manual/OptionalTasks/jdepend.html
  
  Index: jdepend.html
  ===
  RCS file: /home/cvs/ant/docs/manual/OptionalTasks/jdepend.html,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- jdepend.html  4 Sep 2002 11:05:18 -   1.8
  +++ jdepend.html  2 Apr 2003 12:00:27 -   1.9
  @@ -19,14 +19,15 @@
   It allows to quot;automatically measure the quality of a design in terms of 
its extensibility, reusability, and maintainability to
   effectively manage and control package dependencies.quot;/P
   
  -pSource file directories are defined by nested 
codelt;sourcespathgt;/code, see a href=#nestednested elements/a./p
  +pSource file directories are defined by nested
  +codelt;sourcespathgt;/code; Class file directories are defined
  +by nested codelt;classesespathgt;/code, see a
  +href=#nestednested elements/a./p
   
   pOptionally, you can also set the codeoutputfile/code name where the 
output is stored. By default the task writes its report to the standard 
output./P
   
   p The task requires at least the JDepend 1.2 version. /p
   
  -PNote: whereas the JDepend tool can be customized to exclude some 
packages, the current jdepend And Task does not have parameters to allow these 
exclusions. Read JDepend specific documentation for that purpose./P
  -
   h3Parameters/h3
   
   table BORDER=1 CELLSPACING=0 CELLPADDING=2 
  @@ -79,26 +80,37 @@
   
   h3a name=nestedNested Elements/a/h3
   
  -pcodejdepend/code supports two nested elements 
codelt;classpathgt;/code and codelt;sourcespathgt;/code,
  -that represent a href=../using.html#pathPATH like structures/a./p
  -
  -pcodelt;sourcespathgt;/code is used to define the paths of the 
source code to analyze./p
  +pcodejdepend/code supports four nested elements:
  +codelt;classpathgt;, lt;classespathgt; /code and
  +codelt;sourcespathgt;/code, that represent a
  +href=../using.html#pathPATH like structures/a, and
  +codelt;excludegt;/code./p
  +
  +pcodelt;sourcespathgt;/code is used to define the paths of the
  +source code to analyze, but it is deprecated. With version 2.5 of
  +JDepend, only class files are analyzed. The nested element
  +lt;classespathgt; replaces lt;sourcespathgt; and is used to define
  +the paths of compiled class code to analyze; the lt;sourcespathgt;
  +variable is still available in case you are using an earlier version
  +of JDepend.  The lt;excludegt; element can be used to set packages
  +to ignore./p
   
   h3Examples/h3
   
   blockquote
   pre
   lt;jdepend classpathref=base.pathgt;
  -nbsp;nbsp;nbsp; lt;sourcespathgt;
  -nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; lt;pathelement location=src/gt;
  -nbsp;nbsp;nbsp; lt;/sourcespathgt;
  +nbsp;nbsp;nbsp; lt;classespathgt;
  +nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; lt;pathelement location=build/gt;
  +nbsp;nbsp;nbsp; lt;/classespathgt;
   lt;/jdependgt;
   
   /pre
   /blockquote
   
  -This invokes JDepend on the codesrc/code directory, writing the output 
on the standard output.
  -The classpath is defined using a classpath reference.
  +pThis invokes JDepend on the codebuild/code directory, writing
  +the output on the standard output. The classpath is defined using a
  +classpath reference./p
   
   blockquote
   pre
  @@ -111,15 +123,32 @@
   nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; lt;pathelement 
location=lib/jdepend.jar/gt;
   nbsp;nbsp;nbsp; lt;/classpathgt;
   lt;/jdependgt;
  +/pre
  +/blockquote
  +
  +pThis invokes JDepend in a separate VM on the 

DO NOT REPLY [Bug 14849] - JProbe tasks: executables cannot be found with JProbe 4.0.1

2003-04-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14849.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14849

JProbe tasks: executables cannot be found with JProbe 4.0.1





--- Additional Comments From [EMAIL PROTECTED]  2003-04-02 12:46 ---
OK, I've started to refactor the code (you can see the new CovBase class in CVS)
to make it easier to deal with this.

Just to ensure that I've understood things correrectly (I'll need you as guinea 
pig
as I don't use JProbe myself):

The executables used to be jprobe.home/jplauncher, jprobe.home/jpcovmerge and
jprobe.home/jpcovreport and will now be jprobe.home/bin/jplauncher, 
jprobe.home/bin/jpcovmerge and jprobe.home/bin/jpcovreport respectively.

What used to be jprobe.home/coverage/coverage.jar is now 
jprobe.home/lib/coverage/coverage.jar

Right?


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

2003-04-02 Thread bodewig
bodewig 2003/04/02 06:26:43

  Modified:docs/manual/OptionalTasks Tag: ANT_15_BRANCH antlr.html
  Log:
  Improve antlr docs
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.6.2.5   +9 -2  ant/docs/manual/OptionalTasks/antlr.html
  
  Index: antlr.html
  ===
  RCS file: /home/cvs/ant/docs/manual/OptionalTasks/antlr.html,v
  retrieving revision 1.6.2.4
  retrieving revision 1.6.2.5
  diff -u -r1.6.2.4 -r1.6.2.5
  --- antlr.html4 Sep 2002 11:21:14 -   1.6.2.4
  +++ antlr.html2 Apr 2003 14:26:43 -   1.6.2.5
  @@ -24,7 +24,7 @@
 This task only invokes ANTLR if the grammar file is newer than the 
generated
 files.
   /p
  -p
  +pAntlr 2.7.1 Note:
   i
 To successfully run ANTLR, your best option is probably to build the whole
 jar with the provided script bmkalljar/b and drop the resulting jar 
(about 300KB)
  @@ -33,6 +33,13 @@
 to your classpath as described in ANTLR ttinstall.html/tt document.
   /i
   /p
  +pAntlr 2.7.2 Note:
  +i
  +  Instead of the above, you will need antlrall.jar that can be created
  +  by the bantlr-all.jar/b target of the Makefile provided with the
  +  download.
  +/i
  +/p
   
   h3Parameters/h3
   table border=1 cellpadding=2 cellspacing=0
  @@ -170,7 +177,7 @@
   /p
   hr
   
  -p align=centerCopyright copy; 2000-2002 Apache Software Foundation. All 
rights
  +p align=centerCopyright copy; 2000-2003 Apache Software Foundation. All 
rights
   Reserved./p
   
   /body
  
  
  


DO NOT REPLY [Bug 17807] - antlr test fails

2003-04-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17807.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17807

antlr test fails

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-04-02 14:30 ---
The manual for the task already contained information about antlrall.jar, I've
now updated it to talk about the difference between 2.7.1 and 2.7.2.

CVS HEAD (and thus Ant 1.6 and nightly build 2003-04-03) will use
antlr.ANTLRGrammarParseBehavior 

Thanks, I think we can close this report now.


DO NOT REPLY [Bug 10262] - Jar task with index and update produces multiple INDEX.LISTs

2003-04-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10262.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10262

Jar task with index and update produces multiple INDEX.LISTs

[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]
 AssignedTo|[EMAIL PROTECTED]  |[EMAIL PROTECTED]
   Target Milestone|--- |1.6


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

2003-04-02 Thread bodewig
bodewig 2003/04/02 06:53:23

  Modified:.WHATSNEW
   src/main/org/apache/tools/ant/taskdefs Execute.java
  Log:
  Don't hardcode /usr/bin/env for Unix.
  
  PR: 17642
  
  Revision  ChangesPath
  1.385 +4 -1  ant/WHATSNEW
  
  Index: WHATSNEW
  ===
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.384
  retrieving revision 1.385
  diff -u -r1.384 -r1.385
  --- WHATSNEW  2 Apr 2003 12:00:27 -   1.384
  +++ WHATSNEW  2 Apr 2003 14:53:20 -   1.385
  @@ -79,6 +79,9 @@
   * antlr will now recompile your grammar if the supergrammar has
 changed.  Bugzilla Report 12691.
   
  +* property env will now work on Unices with /bin/env instead of
  +  /usr/bin/env.  Bugzilla Report 17642.
  +
   Other changes:
   --
   * Shipped XML parser is now Xerces 2.4.0
  @@ -145,7 +148,7 @@
   * tarfileset has a new dirmode attribute to specify the permissions
 for directories.
   
  -* fixcrlf's eol attribute now also understand mac, unix and dos.
  +* fixcrlf's eol attribute now also understands mac, unix and dos.
   
   * classfileset now picks up dependencies of the form MyClass.class. This
 works for the code generated by the Sun java compiler. It may not work for
  
  
  
  1.53  +16 -12ant/src/main/org/apache/tools/ant/taskdefs/Execute.java
  
  Index: Execute.java
  ===
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Execute.java,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- Execute.java  14 Mar 2003 16:01:03 -  1.52
  +++ Execute.java  2 Apr 2003 14:53:22 -   1.53
  @@ -229,19 +229,23 @@
   String[] cmd = {command.com, /c, set };
   return cmd;
   }
  -} else if (Os.isFamily(z/os)) {
  -String[] cmd = {/bin/env};
  -return cmd;
  -} else if (Os.isFamily(tandem)) {
  -//String[] cmd = {/bin/sh -c env};
  -String[] cmd = {/bin/env};
  -return cmd;
  -} else if (Os.isFamily(unix)) {
  -// Generic UNIX
  -// Alternatively one could use: /bin/sh -c env
  -String[] cmd = {/usr/bin/env};
  +} else if (Os.isFamily(z/os) || Os.isFamily(tandem) 
  +   || Os.isFamily(unix)) {
  +// On most systems one could use: /bin/sh -c env
  +
  +// Some systems have /bin/env, others /usr/bin/env, just try
  +String[] cmd = new String[1];
  +if (new File(/bin/env).canRead()) {
  +cmd[0] = /bin/env;
  +} else if (new File(/usr/bin/env).canRead()) {
  +cmd[0] = /usr/bin/env;
  +} else {
  +// rely on PATH
  +cmd[0] = env;
  +}
   return cmd;
   } else if (Os.isFamily(netware) || Os.isFamily(os/400)) {
  +// rely on PATH
   String[] cmd = {env};
   return cmd;
   } else {
  
  
  


DO NOT REPLY [Bug 11044] - FTP chmod from Windows-UNIX: wrong separator

2003-04-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11044.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11044

FTP chmod from Windows-UNIX: wrong separator





--- Additional Comments From [EMAIL PROTECTED]  2003-04-02 15:01 ---
Andreas, your report is a duplicate of bug 17735 and is fixed in Ant 1.5.3beta1.


DO NOT REPLY [Bug 17807] - antlr test fails

2003-04-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17807.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17807

antlr test fails





--- Additional Comments From [EMAIL PROTECTED]  2003-04-02 15:03 ---
Unfortunatley not. Because test8 expects Invalid super grammar file, but antlr
2.7.2 actually returns file non-existant-file.g not found


DO NOT REPLY [Bug 12587] - jar update not working on solaris

2003-04-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12587.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12587

jar update not working on solaris

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WORKSFORME


RE: The JavaCC and JJTree tasks....

2003-04-02 Thread Tom Copeland

 Any suggestions for the attribute name: javaccversion 2.1 or 3.0 or
 package com or org ?
 

Looks like you and Stefan have already worked through this one; thanks for 
fixing this!

Yours,

tom



DO NOT REPLY [Bug 18613] - setproject not called for all created objects

2003-04-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18613.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18613

setproject not called for all created objects





--- Additional Comments From [EMAIL PROTECTED]  2003-04-02 15:19 ---
Created an attachment (id=5607)
cvs -u on the files modified


DO NOT REPLY [Bug 14925] - Skipping first sourcefile when a custom param with an empty value is added in a javadoc task

2003-04-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14925.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14925

Skipping first sourcefile when a custom param with an empty value is added in a 
javadoc task





--- Additional Comments From [EMAIL PROTECTED]  2003-04-02 15:24 ---
Can you please give the command line Ant executes?  If you run ant -verbose,
you'll receive output like the following

  [javadoc] Executing '/usr/local/java/jdk1.3.1_07/bin/javadoc' with arguments:
  [javadoc] '-d'
  [javadoc] '/home/bodewig/java/ccbase/build/apidocs'
  [javadoc] '-protected'

  [javadoc] 
  [javadoc] The ' characters around the executable and arguments are
  [javadoc] not part of the command.

I wonder what it looks like with empty params as I've serached the code and we
never seem to drop empty arguments.  I'm afraid the argument gets passed (and
then ignored) by javadoc itself.


Using files in classpath in task file=

2003-04-02 Thread Nicola Ken Barozzi
A common usage of xslt is to postprocess xml results for documentation, 
like in junit, jdepend, etc. The problem is that AFAIK the xslt task 
needs a file, not an URL, and hence not a jar resource.

All tasks that resolve files IIUC call
  public File resolveFile(File file, String filename)
in FileUtils.java [1]
Again IIUC and AFAIK it could be quite easy to extend this method to use 
a url to get the File. In this way we could use any file fotten from a 
URL, and still maintain backward compatibility.

In the future we could even make it optional to use COmmons VFS for it 
and have that resolve the URLs and give the streams.

Thoughts?
[1] 
http://cvs.apache.org/viewcvs/ant/src/main/org/apache/tools/ant/util/FileUtils.java?rev=HEADcontent-type=text/vnd.viewcvs-markup

--
Nicola Ken Barozzi   [EMAIL PROTECTED]
- verba volant, scripta manent -
   (discussions get forgotten, just code remains)
-


DO NOT REPLY [Bug 16972] - Jar task incorrectly builds INDEX.LIST entries.

2003-04-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16972.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16972

Jar task incorrectly builds INDEX.LIST entries.

[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]
 AssignedTo|[EMAIL PROTECTED]  |[EMAIL PROTECTED]
   Target Milestone|--- |1.6


Re: Using files in classpath in task file=

2003-04-02 Thread Stefan Bodewig
On Wed, 02 Apr 2003, Nicola Ken Barozzi [EMAIL PROTECTED] wrote:

 The problem is that AFAIK the xslt task needs a file, not an URL,
 and hence not a jar resource.

Errm, where does it need the file?

 All tasks that resolve files IIUC call
 
public File resolveFile(File file, String filename)
 
 in FileUtils.java [1]

Most of them implicitly by defining setXYZ(File) setters, yes.

 Again IIUC and AFAIK it could be quite easy to extend this method to
 use a url to get the File.

Return an URL?  Receive an URL?  I don't understand what you want.

Stefan


DO NOT REPLY [Bug 18563] - Inherited project field not initialised in custom implementations of FileSelector

2003-04-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18563.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18563

Inherited project field not initialised in custom implementations of 
FileSelector





--- Additional Comments From [EMAIL PROTECTED]  2003-04-02 15:36 ---
I made a generalization of this bug: 18613


DO NOT REPLY [Bug 17807] - antlr test fails

2003-04-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17807.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17807

antlr test fails





--- Additional Comments From [EMAIL PROTECTED]  2003-04-02 15:49 ---
Using CVS HEAD, I get the following:

Testcase: test1 took 0,725 sec
Testcase: test2 took 0,36 sec
Testcase: test3 took 14,605 sec
Testcase: test4 took 33,084 sec
Testcase: test5 took 7,85 sec
Testcase: test6 took 31,869 sec
Testcase: test7 took 0,188 sec
Testcase: test8 took 4,979 sec
FAILED
Should throw BuildException because: Invalid super grammar file
junit.framework.AssertionFailedError: Should throw BuildException because:
Invalid super grammar file
at junit.framework.Assert.fail(Assert.java:47)
at
org.apache.tools.ant.BuildFileTest.expectSpecificBuildException(BuildFileTest.java:310)
at 
org.apache.tools.ant.BuildFileTest.expectBuildException(BuildFileTest.java:99)
at 
org.apache.tools.ant.taskdefs.optional.ANTLRTest.test8(ANTLRTest.java:126)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:323)
at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeInVM(JUnitTask.java:861)
at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:552)
at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:528)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:227)
at org.apache.tools.ant.Task.perform(Task.java:388)
at org.apache.tools.ant.Target.execute(Target.java:309)
at org.apache.tools.ant.Target.performTasks(Target.java:336)
at org.apache.tools.ant.Project.executeTarget(Project.java:1394)
at org.apache.tools.ant.Project.executeTargets(Project.java:1268)
at org.apache.tools.ant.Main.runBuild(Main.java:611)
at org.apache.tools.ant.Main.start(Main.java:198)
at org.apache.tools.ant.Main.main(Main.java:245)

Testcase: test8


cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs JarTest.java

2003-04-02 Thread bodewig
bodewig 2003/04/02 07:53:38

  Modified:src/etc/testcases/taskdefs jar.xml
   src/testcases/org/apache/tools/ant/taskdefs JarTest.java
  Log:
  Demonstrate bug 10262
  
  Revision  ChangesPath
  1.11  +8 -0  ant/src/etc/testcases/taskdefs/jar.xml
  
  Index: jar.xml
  ===
  RCS file: /home/cvs/ant/src/etc/testcases/taskdefs/jar.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- jar.xml   12 Mar 2003 10:19:59 -  1.10
  +++ jar.xml   2 Apr 2003 15:53:37 -   1.11
  @@ -200,4 +200,12 @@
   mkdir dir=${tmp.dir}/
   unzip src=${tmp.jar} dest=${tmp.dir}/
 /target
  +
  +  !-- bug 10262 --
  +  target name=testNoDuplicateIndex
  +mkdir dir=${tmp.dir}/META-INF/
  +touch file=${tmp.dir}/META-INF/INDEX.LIST/
  +touch file=${tmp.dir}/foo/
  +jar destfile=${tmp.jar} index=yes basedir=${tmp.dir}/
  +  /target
   /project
  
  
  
  1.20  +17 -0 
ant/src/testcases/org/apache/tools/ant/taskdefs/JarTest.java
  
  Index: JarTest.java
  ===
  RCS file: 
/home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/JarTest.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- JarTest.java  12 Mar 2003 10:19:59 -  1.19
  +++ JarTest.java  2 Apr 2003 15:53:38 -   1.20
  @@ -59,6 +59,9 @@
   import java.io.IOException;
   import java.io.Reader;
   import java.util.Date;
  +import java.util.Enumeration;
  +import java.util.zip.ZipEntry;
  +import java.util.zip.ZipFile;
   import org.apache.tools.ant.BuildFileTest;
   
   /**
  @@ -225,5 +228,19 @@
   executeTarget(testUpdateIfOnlyManifestHasChanged);
   File jarXml = getProject().resolveFile(tempDir + jar.xml);
   assertTrue(jarXml.exists());
  +}
  +
  +public void testNoDuplicateIndex() throws IOException {
  +executeTarget(testNoDuplicateIndex);
  +ZipFile archive = new ZipFile(getProject().resolveFile(tempJar));
  +Enumeration enum = archive.entries();
  +int numberOfIndexLists = 0;
  +while (enum.hasMoreElements()) {
  +ZipEntry ze = (ZipEntry) enum.nextElement();
  +if (ze.getName().equals(META-INF/INDEX.LIST)) {
  +numberOfIndexLists++;
  +}
  +}
  +assertEquals(1, numberOfIndexLists);
   }
   }
  
  
  


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

2003-04-02 Thread bodewig
bodewig 2003/04/02 08:01:15

  Modified:.WHATSNEW
   src/main/org/apache/tools/ant/taskdefs Jar.java
  Log:
  Ignore index lists found when creating a jar with index=on.
  
  PR: 10262
  
  Revision  ChangesPath
  1.386 +2 -0  ant/WHATSNEW
  
  Index: WHATSNEW
  ===
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.385
  retrieving revision 1.386
  diff -u -r1.385 -r1.386
  --- WHATSNEW  2 Apr 2003 14:53:20 -   1.385
  +++ WHATSNEW  2 Apr 2003 16:01:15 -   1.386
  @@ -82,6 +82,8 @@
   * property env will now work on Unices with /bin/env instead of
 /usr/bin/env.  Bugzilla Report 17642.
   
  +* jar index=on could include multiple index lists.  Bugzilla 10262.
  +
   Other changes:
   --
   * Shipped XML parser is now Xerces 2.4.0
  
  
  
  1.73  +5 -1  ant/src/main/org/apache/tools/ant/taskdefs/Jar.java
  
  Index: Jar.java
  ===
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Jar.java,v
  retrieving revision 1.72
  retrieving revision 1.73
  diff -u -r1.72 -r1.73
  --- Jar.java  22 Mar 2003 09:39:46 -  1.72
  +++ Jar.java  2 Apr 2003 16:01:15 -   1.73
  @@ -466,7 +466,7 @@
   }
   
   /**
  - * Overriden from Zip class to deal with manifests
  + * Overriden from Zip class to deal with manifests and index lists.
*/
   protected void zipFile(InputStream is, ZipOutputStream zOut, String 
vPath,
  long lastModified, File fromArchive, int mode)
  @@ -475,6 +475,10 @@
   if (! doubleFilePass || (doubleFilePass  skipWriting)) {
   filesetManifest(fromArchive, is);
   }
  +} else if (INDEX_NAME.equalsIgnoreCase(vPath)  index) {
  +log(Warning: selected  + archiveType
  ++  files include a META-INF/INDEX.LIST which will
  ++  be replaced by a newly generated one., 
Project.MSG_WARN);
   } else {
   super.zipFile(is, zOut, vPath, lastModified, fromArchive, mode);
   }
  
  
  


DO NOT REPLY [Bug 10262] - Jar task with index and update produces multiple INDEX.LISTs

2003-04-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10262.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10262

Jar task with index and update produces multiple INDEX.LISTs

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-04-02 16:03 ---
Should be fixed with nightly build 2003-04-03.


cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs JarTest.java

2003-04-02 Thread bodewig
bodewig 2003/04/02 08:20:14

  Modified:src/etc/testcases/taskdefs jar.xml
   src/testcases/org/apache/tools/ant/taskdefs JarTest.java
  Log:
  Make sure that streams get closed
  
  Revision  ChangesPath
  1.12  +4 -2  ant/src/etc/testcases/taskdefs/jar.xml
  
  Index: jar.xml
  ===
  RCS file: /home/cvs/ant/src/etc/testcases/taskdefs/jar.xml,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- jar.xml   2 Apr 2003 15:53:37 -   1.11
  +++ jar.xml   2 Apr 2003 16:20:13 -   1.12
  @@ -201,11 +201,13 @@
   unzip src=${tmp.jar} dest=${tmp.dir}/
 /target
   
  -  !-- bug 10262 --
  -  target name=testNoDuplicateIndex
  +  !-- bugs 10262 and 16972 --
  +  target name=testIndexTests
   mkdir dir=${tmp.dir}/META-INF/
   touch file=${tmp.dir}/META-INF/INDEX.LIST/
   touch file=${tmp.dir}/foo/
  +mkdir dir=${tmp.dir}/sub/
  +touch file=${tmp.dir}/sub/foo/
   jar destfile=${tmp.jar} index=yes basedir=${tmp.dir}/
 /target
   /project
  
  
  
  1.21  +56 -9 
ant/src/testcases/org/apache/tools/ant/taskdefs/JarTest.java
  
  Index: JarTest.java
  ===
  RCS file: 
/home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/JarTest.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- JarTest.java  2 Apr 2003 15:53:38 -   1.20
  +++ JarTest.java  2 Apr 2003 16:20:13 -   1.21
  @@ -54,8 +54,11 @@
   
   package org.apache.tools.ant.taskdefs;
   
  +import java.io.BufferedReader;
   import java.io.File;
   import java.io.FileReader;
  +import java.io.InputStream;
  +import java.io.InputStreamReader;
   import java.io.IOException;
   import java.io.Reader;
   import java.util.Date;
  @@ -230,17 +233,61 @@
   assertTrue(jarXml.exists());
   }
   
  +// bugzilla report 10262
   public void testNoDuplicateIndex() throws IOException {
  -executeTarget(testNoDuplicateIndex);
  -ZipFile archive = new ZipFile(getProject().resolveFile(tempJar));
  -Enumeration enum = archive.entries();
  -int numberOfIndexLists = 0;
  -while (enum.hasMoreElements()) {
  -ZipEntry ze = (ZipEntry) enum.nextElement();
  -if (ze.getName().equals(META-INF/INDEX.LIST)) {
  -numberOfIndexLists++;
  +ZipFile archive = null;
  +try {
  +executeTarget(testIndexTests);
  +archive = new ZipFile(getProject().resolveFile(tempJar));
  +Enumeration enum = archive.entries();
  +int numberOfIndexLists = 0;
  +while (enum.hasMoreElements()) {
  +ZipEntry ze = (ZipEntry) enum.nextElement();
  +if (ze.getName().equals(META-INF/INDEX.LIST)) {
  +numberOfIndexLists++;
  +}
  +}
  +assertEquals(1, numberOfIndexLists);
  +} finally {
  +if (archive != null) {
  +archive.close();
  +}
  +}
  +}
  +
  +// bugzilla report 16972
  +public void XtestRootFilesInIndex() throws IOException {
  +ZipFile archive = null;
  +try {
  +executeTarget(testIndexTests);
  +archive = new ZipFile(getProject().resolveFile(tempJar));
  +ZipEntry ze = archive.getEntry(META-INF/INDEX.LIST);
  +InputStream is = archive.getInputStream(ze);
  +BufferedReader r = new BufferedReader(new InputStreamReader(is,
  +
UTF8));
  +boolean foundSub = false;
  +boolean foundSubFoo = false;
  +boolean foundFoo = false;
  +
  +String line = r.readLine();
  +while (line != null) {
  +if (line.equals(foo)) {
  +foundFoo = true;
  +} else if (line.equals(sub)) {
  +foundSub = true;
  +} else if (line.equals(sub/foo)) {
  +foundSubFoo = true;
  +}
  +line = r.readLine();
  +}
  +
  +assertTrue(foundSub);
  +assertTrue(!foundSubFoo);
  +assertTrue(foundFoo);
  +} finally {
  +if (archive != null) {
  +archive.close();
   }
   }
  -assertEquals(1, numberOfIndexLists);
   }
   }
  
  
  


DO NOT REPLY [Bug 18605] - XML parser factory nas not been configured correctly

2003-04-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18605.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18605

XML parser factory nas not been configured correctly





--- Additional Comments From [EMAIL PROTECTED]  2003-04-02 17:44 ---
My first suggestion would be to try using a later version of Java, if you can
manage it. Ant can still build java1.1 code while it itself runs on java1.3 or 
1.4


Re: Using files in classpath in task file=

2003-04-02 Thread Nicola Ken Barozzi

Stefan Bodewig wrote, On 02/04/2003 17.34:
On Wed, 02 Apr 2003, Nicola Ken Barozzi [EMAIL PROTECTED] wrote:
The problem is that AFAIK the xslt task needs a file, not an URL,
and hence not a jar resource.
Errm, where does it need the file?
Sorry, I'm not clear.
Code:
 xslt in=index.xml out=index.html style=style.xsl/
ATM IIUC I need style.xsl in the filesystem; I cannot directly use the 
one that's in the classpath directly.

If I had it in jars I could ship it automatically with the jar that has 
the task that generated index.xml, so I can easily do something like:

 xslt in=index.xml out=index.html style=resource:/a/style.xsl/

All tasks that resolve files IIUC call
  public File resolveFile(File file, String filename)
in FileUtils.java [1]
Most of them implicitly by defining setXYZ(File) setters, yes.
Again IIUC and AFAIK it could be quite easy to extend this method to
use a url to get the File.
Return an URL?  Receive an URL?  I don't understand what you want.
Be able to specify a URL for every task that needs a file, and that thus 
uses the above fileutils method.

In this way I could do for example:
 ant antfile=http://url/to/buildfile//
 xslt in=index.xml out=index.html style=jar:/style.xsl/
etc
Yes, I could simply add a getStyleResource(String styleResource) to the 
task, but it would not make this change available to all tasks that use 
the above method.

Or maybe KISS and just add a getStyleResource(String styleResource). It 
solves the immediate issue and doesn't open other potential problems.

What do you think? I hope I was clearer this time =8-)
--
Nicola Ken Barozzi   [EMAIL PROTECTED]
- verba volant, scripta manent -
   (discussions get forgotten, just code remains)
-


DO NOT REPLY [Bug 12024] - [PATCH] Enable junit to inherit Ant properties as system properties

2003-04-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12024.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12024

[PATCH] Enable junit to inherit Ant properties as system properties





--- Additional Comments From [EMAIL PROTECTED]  2003-04-02 17:46 ---
My own solution was to define a new PropertySet data type (called 
syspropertyset inside junit to be consistent) that allows you to easily 
pass down a bunch or a few Ant properties, possibly renaming them allow the 
way. To use it, I simply extended java and junit, and called my version 
javax and junitx. (No point for me in figthing for something to make it to 
Ant when I can use it myself, when the Ant community doesn't care that much 
about the feature I want).

Here's a snippet of one of my scripts. --DD

junitx ...
  ...
  syspropertyset
propertyref prefix=testall. /
propertyref prefix=runtime- /
mapper type=regexp from=runtime-(.*) to=\1 /
  /syspropertyset
/junitx


DO NOT REPLY [Bug 12024] - [PATCH] Enable junit to inherit Ant properties as system properties

2003-04-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12024.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12024

[PATCH] Enable junit to inherit Ant properties as system properties





--- Additional Comments From [EMAIL PROTECTED]  2003-04-02 17:50 ---
This is majorly important to anyone who uses junit.  I'd like to see it as part
of ant...


DO NOT REPLY [Bug 12024] - [PATCH] Enable junit to inherit Ant properties as system properties

2003-04-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12024.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12024

[PATCH] Enable junit to inherit Ant properties as system properties





--- Additional Comments From [EMAIL PROTECTED]  2003-04-02 18:11 ---
Actually, to be fair, I never proposed it. And like I said, last time I raised 
this, not much interest was generated. The main problem might be with me, as I 
tend not to submit tests and docs with my code... which always attempts to work 
around Ant, i.e. never need to modify the Ant code. --DD


DO NOT REPLY [Bug 18625] New: - replacetokens: token with empty value throws IndexOutOfBoundsException

2003-04-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18625.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18625

replacetokens: token with empty value throws IndexOutOfBoundsException

   Summary: replacetokens: token with empty value throws
IndexOutOfBoundsException
   Product: Ant
   Version: 1.5.2
  Platform: Other
OS/Version: Linux
Status: NEW
  Severity: Blocker
  Priority: Other
 Component: Core tasks
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Having a value= as a token value in the follwoing:

   loadproperties srcFile=build.properties
filterchain
replacetokens begintoken=( endtoken=)
token key=${env.LOGNAME} value=/
/replacetokens
/filterchain
/loadproperties

Throws this exception:

java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(String.java:460)
at 
org.apache.tools.ant.filters.ReplaceTokens.read(ReplaceTokens.java:160)
at 
org.apache.tools.ant.filters.ReplaceTokens.read(ReplaceTokens.java:196)
at
org.apache.tools.ant.filters.BaseFilterReader.read(BaseFilterReader.java:123)
at java.io.Reader.read(Reader.java:100)
at org.apache.tools.ant.util.FileUtils.readFully(FileUtils.java:793)
at
org.apache.tools.ant.filters.util.ChainReaderHelper.readFully(ChainReaderHelper.java:238)
at
org.apache.tools.ant.taskdefs.LoadProperties.execute(LoadProperties.java:139)
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.tools.ant.Target.execute(Target.java:309)
at org.apache.tools.ant.Target.performTasks(Target.java:336)
at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143)
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.tools.ant.Target.execute(Target.java:309)
at org.apache.tools.ant.Target.performTasks(Target.java:336)
at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
at org.apache.tools.ant.Main.runBuild(Main.java:609)
at org.apache.tools.ant.Main.start(Main.java:196)
at org.apache.tools.ant.Main.main(Main.java:235)

any other non-zero length string will replace fine. But as you can see from the
loadproperties task, I need an empty string.


[Patch] antlib proposal

2003-04-02 Thread Antoine Levy-Lambert



This patch corrects further the version of 
Project.java of the antlib proposal and adds needed types to the antlib.xml 
file, the equivalent of "defaults.properties" in the proposal.

Antoine
Index: proposal/sandbox/antlib/src/main/org/apache/tools/ant/Project.java
===
RCS file: 
/home/cvspublic/ant/proposal/sandbox/antlib/src/main/org/apache/tools/ant/Project.java,v
retrieving revision 1.5
diff -u -r1.5 Project.java
--- proposal/sandbox/antlib/src/main/org/apache/tools/ant/Project.java  1 Apr 
2003 11:35:06 -   1.5
+++ proposal/sandbox/antlib/src/main/org/apache/tools/ant/Project.java  2 Apr 
2003 20:14:01 -
@@ -70,6 +70,7 @@
 import org.apache.tools.ant.types.FilterSetCollection;
 import org.apache.tools.ant.util.FileUtils;
 import org.apache.tools.ant.util.LazyHashtable;
+import org.apache.tools.ant.util.JavaEnvUtils;
 import org.apache.tools.ant.types.Path;
 import org.apache.tools.ant.taskdefs.Antlib;
 import org.apache.tools.ant.input.InputHandler;
@@ -133,6 +134,13 @@
 private static String javaVersion;
 
 /**
+ * The class name of the Ant class loader to use for
+ * JDK 1.2 and above
+ */
+private static final String ANTCLASSLOADER_JDK12
+= org.apache.tools.ant.loader.AntClassLoader2;
+
+/**
  *  Description of the Field
  */
 public final static String JAVA_1_0 = 1.0;
@@ -462,6 +470,47 @@
 }
 }
 
+
+/**
+ * Factory method to create a class loader for loading classes
+ *
+ * @return an appropriate classloader
+ */
+private AntClassLoader createClassLoader() {
+AntClassLoader loader = null;
+if (!JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_1)) {
+try {
+// 1.2+ - create advanced helper dynamically
+Class loaderClass
+= Class.forName(ANTCLASSLOADER_JDK12);
+loader = (AntClassLoader) loaderClass.newInstance();
+} catch (Exception e) {
+log(Unable to create Class Loader: 
++ e.getMessage(), Project.MSG_DEBUG);
+}
+}
+
+if (loader == null) {
+loader = new AntClassLoader();
+}
+
+loader.setProject(this);
+return loader;
+}
+
+/**
+ * Factory method to create a class loader for loading classes from
+ * a given path
+ *
+ * @param path the path from whcih clases are to be loaded.
+ *
+ * @return an appropriate classloader
+ */
+public AntClassLoader createClassLoader(Path path) {
+AntClassLoader loader = createClassLoader();
+loader.setClassPath(path);
+return loader;
+}
 
 /**
  *  Sets the coreLoader attribute of the Project object
Index: proposal/sandbox/antlib/src/main/org/apache/tools/ant/antlib.xml
===
RCS file: 
/home/cvspublic/ant/proposal/sandbox/antlib/src/main/org/apache/tools/ant/antlib.xml,v
retrieving revision 1.1
diff -u -r1.1 antlib.xml
--- proposal/sandbox/antlib/src/main/org/apache/tools/ant/antlib.xml2 Mar 
2002 22:21:19 -   1.1
+++ proposal/sandbox/antlib/src/main/org/apache/tools/ant/antlib.xml2 Apr 
2003 20:14:04 -
@@ -122,9 +122,17 @@
   data-type name=patternset class=org.apache.tools.ant.types.PatternSet/
   data-type name=mapper class=org.apache.tools.ant.types.Mapper/
   data-type name=filterset class=org.apache.tools.ant.types.FilterSet/
+  data-type name=filterchain class=org.apache.tools.ant.types.FilterChain 
/
+  data-type name=filterreader 
class=org.apache.tools.ant.types.AntFilterReader /
   data-type name=description 
class=org.apache.tools.ant.types.Description/
   data-type name=substitution 
class=org.apache.tools.ant.types.Substitution/
   data-type name=regexp 
class=org.apache.tools.ant.types.RegularExpression/
+  data-type name=selector 
class=org.apache.tools.ant.types.selectors.SelectSelector/
+  data-type name=zipfileset class=org.apache.tools.ant.types.ZipFileSet/
+  data-type name=xmlcatalog class=org.apache.tools.ant.types.XMLCatalog /
+  data-type name=extensionSet 
class=org.apache.tools.ant.taskdefs.optional.extension.ExtensionSet /
+  data-type name=extension 
class=org.apache.tools.ant.taskdefs.optional.extension.ExtensionAdapter /
+  data-type name=libfileset 
class=org.apache.tools.ant.taskdefs.optional.extension.LibFileSet /
 
   !-- deprecated ant tasks (kept for back compatibility) --
 


DO NOT REPLY [Bug 18633] New: - starteam checkin task ignores the includes parameter for files not in repository

2003-04-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18633.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18633

starteam checkin task ignores the includes parameter for files not in repository

   Summary: starteam checkin task ignores the includes parameter for
files not in repository
   Product: Ant
   Version: 1.5.2
  Platform: Other
OS/Version: Other
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Optional Tasks
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


I have a directory of files (*.java and *.class) that I use ant to checkin.  I
dont want to checkin the *.class files, so I specify the includes=*.java as
part of the tag.

It still adds all the *.class files, I think its because they dont exist in
starteam.  So maybe the includes parameter isnt implemented for the add command,
just the checkin?