You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by romain slootmaekers <ro...@ubizen.com> on 2000/07/07 16:16:08 UTC

1.0.8 bug in the javac task.

Yo,
the 1.0.8 version of ant has a bug in the javac task:
the classpath="...." attribute doesn't get interpreted at all.

Now, I mail it to the mailing list since the BugZilla thingy is down,
ant (oops typo ;))
I cannot see wether it was mentioned before, fixed, or whatever....

Anyway,
to fix it, you should modify the getCompileClasspath() method (in
Javac.java)  like this:

 private String getCompileClasspath() {
        StringBuffer classpath = new StringBuffer();

        classpath.append(destDir.getAbsolutePath());
        if (compileClasspath != null) {
            addExistingToClasspath(classpath,compileClasspath);
        }

        // add the classpath

       String toAdd=getProperty("classpath");
        addExistingToClasspath(classpath,toAdd);

        // add the system classpath

addExistingToClasspath(classpath,System.getProperty("java.class.path"));

        return classpath.toString();
    }


have fun,
sloot.


--
Romain "Bass is attitude" Slootmaekers

romain.slootmaekers@ubizen.com
http://www.ubizen.com
tel +32 (0)16 31 00 15 - fax +32 (0)16 31 00 12
Ubizen - Grensstraat 1b - B-3010 Leuven - Belgium


Re: 1.0.8 bug in the javac task.

Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "rs" == romain slootmaekers <ro...@ubizen.com> writes:

 rs> Yo,

Moin,

 rs> the 1.0.8 version of ant has a bug in the javac task: the
 rs> classpath="...." attribute doesn't get interpreted at all.

well, there have been a couple of bugfixes since whatever has been
called 1.0.8, you could have checked with the CVS version or the
nightly builds.

But you will find that this place hasn't changed because your
observation is wrong.

The member compileClasspath gets set by setClasspath - which is
invoked to set the value obtained from the classpath attribute. And
this one gets into it via

 rs>         if (compileClasspath != null) {
 rs>             addExistingToClasspath(classpath,compileClasspath); 
 rs>         }

which is there.

The change you propose would add a property set via

<property name="classpath" ...>

but this isn't supposed to happen - no magic property name here.

Stefan