You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Max Stempfhuber <st...@bonn.iz-soz.de> on 2000/09/16 23:28:20 UTC

Ant bug-report #126: addition

hi,

don't know if my workaround made it to the bug tracking system (didn't
show up on bug #126), so here it is just in case:

1) in Exec.java (run() method) add the lines marked with *
        if (myos.toLowerCase().indexOf("windows") >= 0) {
            if (!dir.equals(project.resolveFile("."))) {
                if (myos.toLowerCase().indexOf("nt") >= 0) {
                    command = "cmd /c cd " + dir + " && " + command;
                }
                else {
                    String ant = project.getProperty("ant.home");
                    if (ant == null) {
                        throw new BuildException("Property 'ant.home'
not found", location);
                    }
                
                    String antRun = project.resolveFile(ant +
"/bin/antRun.bat").toString();
                    command = antRun + " " + dir + " " + command;
                }
            }
*        } else if (myos.toLowerCase().indexOf("os/2") >= 0) {
*            command = "cmd /c cd " + dir + " && " + command;
        } else {
            String ant = project.getProperty("ant.home");
            if (ant == null) throw new BuildException("Property
'ant.home' not found", location);
            String antRun = project.resolveFile(ant +
"/bin/antRun").toString();

            command = antRun + " " + dir + " " + command;
        }

2) as a workaround for the %classpath% problem I added the system
classpath in the buildfile:
   <target name="idl" >
      <java classname="jacorb.idl.parser" 
       args="${idlflags} ${dirs.base}/demo/${name}/server.idl"
       jvmargs="-classpath %classpath%;${lib}/idl.jar"
       fork="yes"
 />
   </target>

Don't know, where to put it in the Ant source so it is used on 1.1.x
JVMs

Regards


Maximilian Stempfhuber
German Social Science Information Centre
___________________________________________________________________
Maximilian Stempfhuber
Informationszentrum  Sozialwissenschaften (IZ)
Abteilungsleiter Forschung und Entwicklung
Lennestr. 30, 53113 Bonn, GERMANY
Tel.: (++49) (0)228 - 2281 139     Fax:  (++49) (0)228 - 2281 120
___________________________________________________________________
The box said "Requires Windows 95 or better." So I bought OS/2 Warp



Re: Ant bug-report #126: addition

Posted by Stefan Bodewig <bo...@bost.de>.
Hi Max,

the first part has been fixed in CVS, while I don't really understand
the second one. In your bug report you are talking about <javac> while
your example uses <java> - which one is causing problems for you?

I've been using <javac> as well as <java> with JDK 1.1 on Linux
without problems - although I add the system classpath to the <java>
task explicitly, like this (taken from Ant's own build.xml in current
CVS):

    <java fork="yes"
          classname="junit.textui.TestRunner"
          taskname="junit">
      <classpath>
        ...
        <pathelement path="${java.class.path}" />
      </classpath>


Stefan