DO NOT REPLY [Bug 30339] - Jar task can create mysteriously broken jar files in 1.5.1, 1.6.2

2004-08-20 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=30339.
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=30339

Jar task can create mysteriously broken jar files in 1.5.1, 1.6.2





--- Additional Comments From [EMAIL PROTECTED]  2004-08-20 01:32 ---
Is there anything else I can do to help with an appraisal of this bug?

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



DO NOT REPLY [Bug 30706] - Ftp task unable to get or list

2004-08-20 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=30706.
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=30706

Ftp task unable to get or list





--- Additional Comments From [EMAIL PROTECTED]  2004-08-20 01:33 ---
This is very interesting to me.  I've done a lot of the work on the ftp parsing
in jakarta-commons-net, which is at the root of ant's ftp task, as you probably
know.

I have never been happy about the way we handle dates.  I know that different
servers in different countries handle the dates differently.

We've never fixed it because, frankly, I've never been able to get any solid
info from developers on non-English systems to find out how prevalent the
problem is, and what is the best way to solve it.  Hopefully, you'll be willing
to share some information with me to help me understand the depth of the problem
and how we might solve it.

In your experience, in France, do ftp systems use French names for months
always, usually, sometimes, or rarely?  Are English month names ever, or
frequently seen?  Do you know much about the situation in other European
countries?  Do German servers use German names for months?  Etc.

The core of the problem is being able to tell, from an FTP server that the
client knows nothing about, what language to expect the months in.  FTP was not
originally designed as an automatable protocol and fixing this will not be easy.

But I am always eager to find people willing to help solve it from the countries
affected.

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



[GUMP@brutus]: ant/test-ant failed

2004-08-20 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 folk at [EMAIL PROTECTED]

Project test-ant has an issue affecting its community integration.
This issue affects 1 projects, and has been outstanding for 8L runs.
Project State : 'Failed', Reason 'Build Failed'
The following are affected:
- test-ant :  Java based build tool


Full details are available at:

http://brutus.apache.org/gump/public/ant/test-ant/index.html

That said, some snippets follow:


The following annotations were provided:
 -INFO- Optional dependency rhino prerequisite failed with reason build failed
 -INFO- Enable verbose output, due to 8 previous error(s).
 -INFO- Failed with reason build failed
 -INFO- Enable debug output, due to build failure.


The following work was performed:
http://brutus.apache.org/gump/public/ant/test-ant/gump_work/build_ant_test-ant.html
Work Name: build_ant_test-ant (Type: Build)
State: Failed
Elapsed: 6 mins 52 secs
Command Line: java -Djava.awt.headless=true 
-Xbootclasspath/p:/usr/local/gump/public/workspace/xml-xerces2/java/build/xercesImpl.jar:/usr/local/gump/public/workspace/xml-xerces2/java/build/xml-apis.jar:/usr/local/gump/public/workspace/xml-commons/java/external/build/xml-apis.jar:/usr/local/gump/public/workspace/xml-xalan/java/build/xalan-unbundled.jar
 org.apache.tools.ant.Main -verbose 
-Dgump.merge=/usr/local/gump/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 : 

cvs commit: ant/proposal/sandbox/dotnet/src/etc/testcases dotnetexec.xml

2004-08-20 Thread bodewig
bodewig 2004/08/20 03:53:18

  Modified:
proposal/sandbox/dotnet/src/main/org/apache/tools/ant/taskdefs/optional/dotnet
AbstractBuildTask.java DotNetExecTask.java
WixTask.java
   proposal/sandbox/dotnet build.xml
   proposal/sandbox/dotnet/src/etc/testcases dotnetexec.xml
  Log:
  small refactorings
  
  Revision  ChangesPath
  1.5   +2 -7  
ant/proposal/sandbox/dotnet/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/AbstractBuildTask.java
  
  Index: AbstractBuildTask.java
  ===
  RCS file: 
/home/cvs/ant/proposal/sandbox/dotnet/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/AbstractBuildTask.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AbstractBuildTask.java24 Mar 2004 15:04:19 -  1.4
  +++ AbstractBuildTask.java20 Aug 2004 10:53:17 -  1.5
  @@ -202,13 +202,8 @@
+  same time);
   }
   
  -DotNetExecTask exec = new DotNetExecTask();
  -if (vm != null) {
  -exec.setVm(vm);
  -}
  -exec.setProject(getProject());
  -exec.setExecutable(getExecutable());
  -exec.setTaskName(getTaskName());
  +DotNetExecTask exec = DotNetExecTask.getTask(this, vm, 
  + getExecutable(), null);
   String[] args = getPropertyArguments(properties);
   for (int i = 0; i  args.length; i++) {
   exec.createArg().setValue(args[i]);
  
  
  
  1.4   +32 -0 
ant/proposal/sandbox/dotnet/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotNetExecTask.java
  
  Index: DotNetExecTask.java
  ===
  RCS file: 
/home/cvs/ant/proposal/sandbox/dotnet/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotNetExecTask.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DotNetExecTask.java   24 Mar 2004 15:04:19 -  1.3
  +++ DotNetExecTask.java   20 Aug 2004 10:53:18 -  1.4
  @@ -18,8 +18,10 @@
   package org.apache.tools.ant.taskdefs.optional.dotnet;
   
   import org.apache.tools.ant.BuildException;
  +import org.apache.tools.ant.Task;
   import org.apache.tools.ant.taskdefs.ExecTask;
   import org.apache.tools.ant.taskdefs.condition.Os;
  +import org.apache.tools.ant.types.Environment;
   
   /**
* Specialized exec that knows how to deal with Mono vs. Microsoft's
  @@ -115,4 +117,34 @@
   protected final static boolean isMono(String vm) {
   return mono.equals(vm) || mint.equals(vm);
   }
  +
  +/**
  + * Creates an instance of this task based on a different tasks settings.
  + */
  +public static DotNetExecTask getTask(Task t, String vm, 
  + String executable,
  + Environment env) {
  +DotNetExecTask exec = new DotNetExecTask();
  +if (vm != null) {
  +exec.setVm(vm);
  +}
  +exec.setProject(t.getProject());
  +exec.setExecutable(executable);
  +exec.setTaskName(t.getTaskName());
  +if (env != null) {
  +String[] environment = env.getVariables();
  +if (environment != null) {
  +for (int i = 0; i  environment.length; i++) {
  +int idx = environment[i].indexOf(=);
  +Environment.Variable v = new Environment.Variable();
  +v.setKey(environment[i].substring(0, idx));
  +v.setValue(environment[i].substring(idx + 1));
  +exec.addEnv(v);
  +}
  +}
  +}
  +
  +return exec;
  +}
  +
   }
  
  
  
  1.2   +2 -7  
ant/proposal/sandbox/dotnet/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/WixTask.java
  
  Index: WixTask.java
  ===
  RCS file: 
/home/cvs/ant/proposal/sandbox/dotnet/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/WixTask.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WixTask.java  16 Apr 2004 14:17:58 -  1.1
  +++ WixTask.java  20 Aug 2004 10:53:18 -  1.2
  @@ -211,13 +211,8 @@
* potentially adding an /out parameter.
*/
   private void run(String executable, List s, File target) {
  -DotNetExecTask exec = new DotNetExecTask();
  -if (vm != null) {
  -exec.setVm(vm);
  -}
  -exec.setProject(getProject());
  -exec.setExecutable(executable);
  -exec.setTaskName(getTaskName());
  +DotNetExecTask exec = DotNetExecTask.getTask(this, vm, 
  +  

cvs commit: ant/proposal/sandbox/dotnet/src/testcases/org/apache/tools/ant/taskdefs/optional/dotnet NUnitTaskTest.java

2004-08-20 Thread bodewig
bodewig 2004/08/20 03:55:20

  Modified:proposal/sandbox/dotnet README
   proposal/sandbox/dotnet/docs index.html
   
proposal/sandbox/dotnet/src/main/org/apache/tools/ant/taskdefs/optional/dotnet
antlib.xml
  Added:   proposal/sandbox/dotnet/docs nunit.html
   proposal/sandbox/dotnet/src/etc/testcases nunit.xml
   proposal/sandbox/dotnet/src/etc/testcases/src fail.cs
pass.cs
   
proposal/sandbox/dotnet/src/main/org/apache/tools/ant/taskdefs/optional/dotnet
NUnitTask.java
   
proposal/sandbox/dotnet/src/testcases/org/apache/tools/ant/taskdefs/optional/dotnet
NUnitTaskTest.java
  Log:
  nunit
  
  Revision  ChangesPath
  1.3   +0 -2  ant/proposal/sandbox/dotnet/README
  
  Index: README
  ===
  RCS file: /home/cvs/ant/proposal/sandbox/dotnet/README,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- README16 Apr 2004 09:12:43 -  1.2
  +++ README20 Aug 2004 10:55:20 -  1.3
  @@ -32,8 +32,6 @@
   
   * A wix task.
   
  -Mid term goals:
  -
   * A nunit task.
   
   Those tasks should end up in an antlib of their own in order to be
  
  
  
  1.5   +4 -0  ant/proposal/sandbox/dotnet/docs/index.html
  
  Index: index.html
  ===
  RCS file: /home/cvs/ant/proposal/sandbox/dotnet/docs/index.html,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- index.html2 Jul 2004 11:46:09 -   1.4
  +++ index.html20 Aug 2004 10:55:20 -  1.5
  @@ -112,6 +112,10 @@
 tool, untested./li
   
 lia href=wix.htmlwix/a - execute the WiX toolset, 
untested./li
  +
  +  lia href=nunit.htmlnunit/a - execute the
  +  nunit-console.exe a href=http://www.nunit.org/;NUnit/a
  +  test runner./li
   /ul
   
   hr/
  
  
  
  1.1  ant/proposal/sandbox/dotnet/docs/nunit.html
  
  Index: nunit.html
  ===
  html
head
  meta http-equiv=Content-Language content=en-us/meta
  titleNUnit Task/title
/head
  
body
  h2a name=dotnetexecNUnit/a/h2
  
  h3Description/h3
  
  pRuns the a href=http://www.nunit.org/;NUnit/a console
  test runner./p
  
  h3Parameters/h3
  table border=1 cellpadding=2 cellspacing=0
tr
  td valign=topbAttribute/b/td
  td valign=topbDescription/b/td
  td align=center valign=topbRequired/b/td
/tr
tr
  td valign=topvm/td
  td valign=topSame as a
  href=dotnetexec.htmldotnetexec/a's vm attribute.
Specify the framework to use./td
  td align=centerNo./td
/tr
tr
  td valign=topconfig/td
  td valign=topConfig file to use/td
  td align=centerNo./td
/tr
tr
  td valign=topoutput/td
  td valign=topWhere test output should go./td
  td align=centerNo./td
/tr
tr
  td valign=toperror/td
  td valign=topWhere test error output should go./td
  td align=centerNo./td
/tr
tr
  td valign=topxmlout/td
  td valign=topWhere NUnit's XML output should go./td
  td align=centerNo./td
/tr
tr
  td valign=toptransform/td
  td valign=topThe transformation to apply./td
  td align=centerNo./td
/tr
tr
  td valign=topthread/td
  td valign=topCauses a separate thread to be created for
  running the tests - see the NUnit documentation for
  details./td
  td align=centerNo - defaults to false./td
/tr
tr
  td valign=topnoshadow/td
  td valign=topDisables shadow copying of the assembly in
  order to provide improved performance../td
  td align=centerNo - defaults to false./td
/tr
tr
  td valign=topfixture/td
  td valign=topTest fixture to run./td
  td align=centerNo./td
/tr
tr
  td valign=toplabels/td
  td valign=topCauses an identifying label to be displayed
  at the start of each test case./td
  td align=centerNo - defaults to false./td
/tr
tr
  td valign=topfailOnError/td
  td valign=topStops the build if NUnit returns with a code
  indicating an error or failure./td
  td align=centerNo - defaults to false./td
/tr
  /table
  
  h3Parameters specified as nested elements/h3
  h4testassembly/h4
  
  pcodetestassembly/code has a single required attribute name -
  specifies an assembly or a project file holding tests./p
  
  

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

2004-08-20 Thread bodewig
bodewig 2004/08/20 03:56:52

  Modified:src/main/org/apache/tools/ant/taskdefs ExecTask.java
  Log:
  When searching 
/usr/local/java/jdk1.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/bodewig/bin:/home/bodewig/dev/xml-forrest/build/dist/shbat//bin,
 look into user supplied environment first
  
  Revision  ChangesPath
  1.71  +19 -2 ant/src/main/org/apache/tools/ant/taskdefs/ExecTask.java
  
  Index: ExecTask.java
  ===
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/ExecTask.java,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- ExecTask.java 23 Apr 2004 07:33:51 -  1.70
  +++ ExecTask.java 20 Aug 2004 10:56:52 -  1.71
  @@ -391,16 +391,29 @@
   
   // couldn't find it - must be on path
   if (searchPath) {
  +Path p = null;
  +String[] environment = env.getVariables();
  +if (environment != null) {
  +for (int i = 0; i  environment.length; i++) {
  +if (isPath(environment[i])) {
  +p = new Path(getProject(), 
  + environment[i].substring(5));
  +break;
  +}
  +}
  +}
  +
  +if (p == null) {
   Vector env = Execute.getProcEnvironment();
   Enumeration e = env.elements();
  -Path p = null;
   while (e.hasMoreElements()) {
   String line = (String) e.nextElement();
  -if (line.startsWith(PATH=) || line.startsWith(Path=)) {
  +if (isPath(line)) {
   p = new Path(getProject(), line.substring(5));
   break;
   }
   }
  +}
   
   if (p != null) {
   String[] dirs = p.list();
  @@ -645,6 +658,10 @@
* Flush the output stream - if there is one.
*/
   protected void logFlush() {
  +}
  +
  +private boolean isPath(String line) {
  +return line.startsWith(PATH=) || line.startsWith(Path=);
   }
   
   }
  
  
  

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



DO NOT REPLY [Bug 30339] - Jar task can create mysteriously broken jar files in 1.5.1, 1.6.2

2004-08-20 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=30339.
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=30339

Jar task can create mysteriously broken jar files in 1.5.1, 1.6.2





--- Additional Comments From [EMAIL PROTECTED]  2004-08-20 14:48 ---
Just out of curiosity, are you running this only on a company webserver or have 
you tried running it against a local webserver?

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



Unhelpful message with combining import and subant

2004-08-20 Thread Dominique Devienne
I'm using Ant to build large C/C++/Java applications composed of many
libraries, binaries, and JARs. I factor out my common things in a few
build files in a config directory, and use one build file per
library/binary/jar that imports a common build file. This works great,
and import and subant are invaluable new Ant 1.6 tools to design
such large builds.

To get to each of the library/binary/jar build file, I have a very
simple and generic recurse.xml (shown below) build file that one
imports, just defining the buildpath to recurse into. In a typical
layout, the top-level build.xml (which imports recurse.xml) delegates to
src/lib/build.xml and src/bin/build.xml, and src/java/build.xml. These
build files then in turn delegate to their own sub-builds
(src/lib/build.xml recurses into dbtools/build.xml and utils/build.xml).
The find command below shows the test layout I setup for demoing my pb.

Before showing my pb, I've output a successful traversal of all the
build files. Then I edited src/java/build.xml to reference a directory
that does not exist in the build path: the build failed, as expected,
but where I'm getting at is that the failure stack trace just shows the
error from originating from recurse.xml with no mention of which build
files imported recurse.xml. The error message is explicit enough though
to find out what's wrong, and where.

I then added the missing directory, but not the build.xml file. The
failed again of course, and the error message is still helpful enough to
figure it out.

But now I touched the missing build.xml, which is thus empty, and this
time the error message is not helpful, and it's really hard to figure
out where the problem lies. Here is the error message and trace from the
bottom of this email:

BUILD FAILED
C:\oss\org_apache\antx\recurse\config\recurse.xml:15:
   The following error occurred while executing this line:
C:\oss\org_apache\antx\recurse\config\recurse.xml:15:
   The following error occurred while executing this line: Premature end
of file.

So basically what I requesting is that Ant outputs an error like this:

BUILD FAILED
C:\oss\org_apache\antx\recurse\config\recurse.xml:15:
   The following error occurred while executing this line:
imported from C:\oss\org_apache\antx\recurse\build.xml:5
C:\oss\org_apache\antx\recurse\config\recurse.xml:15:
   The following error occurred while executing this line: Premature end
of file.
imported from C:\oss\org_apache\antx\recurse\src\lib\build.xml:5

So that troubleshooting the issue becomes much easier.

If additionally the Premature end of file could mention which file
prematurely ended, that would be even better ;-)

Thanks, --DD

PS: FWIW, someone added a file in ClearCase, and checked in the
directory
containing the file without checking in the file itself, resulting
in
the empty build file. So this is a real world failure ;-)


C:\oss\org_apache\antx\recursedir /S /B
C:\oss\org_apache\antx\recurse\build.xml
C:\oss\org_apache\antx\recurse\config
C:\oss\org_apache\antx\recurse\src
C:\oss\org_apache\antx\recurse\config\common.xml
C:\oss\org_apache\antx\recurse\config\recurse.xml
C:\oss\org_apache\antx\recurse\src\bin
C:\oss\org_apache\antx\recurse\src\java
C:\oss\org_apache\antx\recurse\src\lib
C:\oss\org_apache\antx\recurse\src\bin\build.xml
C:\oss\org_apache\antx\recurse\src\bin\dbserver
C:\oss\org_apache\antx\recurse\src\bin\plot
C:\oss\org_apache\antx\recurse\src\bin\dbserver\build.xml
C:\oss\org_apache\antx\recurse\src\bin\plot\build.xml
C:\oss\org_apache\antx\recurse\src\java\build.xml
C:\oss\org_apache\antx\recurse\src\java\jdbserver
C:\oss\org_apache\antx\recurse\src\java\missing
C:\oss\org_apache\antx\recurse\src\java\jdbserver\build.xml
C:\oss\org_apache\antx\recurse\src\java\missing\build.xml
C:\oss\org_apache\antx\recurse\src\lib\build.xml
C:\oss\org_apache\antx\recurse\src\lib\dbtools
C:\oss\org_apache\antx\recurse\src\lib\utils
C:\oss\org_apache\antx\recurse\src\lib\dbtools\build.xml
C:\oss\org_apache\antx\recurse\src\lib\utils\build.xml

C:\oss\org_apache\antx\recursetype src\java\build.xml
?xml version=1.0?

project name=src/java default=build

  import file=../../config/recurse.xml /

  path id=buildpath
pathelement location=jdbserver /
pathelement location=missing /
  /path

/project

C:\oss\org_apache\antx\recursetype config\recurse.xml
?xml version=1.0?

project name=recurse

  target name=clean
subant buildpathref=buildpath target=clean /
  /target

  target name=build
subant buildpathref=buildpath target=build /
  /target

  target name=trace
echoRecursing from ${ant.project.name}: ${ant.file}/echo
subant buildpathref=buildpath target=trace /
  /target

/project

C:\oss\org_apache\antx\recurse
C:\oss\org_apache\antx\recursedir src\java\missing
 Volume in drive C has no label.
 Volume Serial Number is 6051-15B3

 Directory of C:\oss\org_apache\antx\recurse\src\java\missing

08/20/2004  10:14a  DIR  .
08/20/2004  10:14a  DIR  ..
08/20/2004