ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Schildbach" <andreas.schildb...@bch-fms.de>
Subject directory problem with ant
Date Thu, 12 Oct 2000 14:42:42 GMT
Hello there,

I've got a problem with the javac-Task of Ant. Please look at the following
example:

File d:\classes\test\Hello.java:

package test;
public class Hello
{
 public static void main(String[] args)
 {
  System.out.println("Hello world!");
 }
}

File d:\classes\test\build.xml

<project name="test" default="compile" basedir=".">
 <target name="compile">
  <javac
   srcdir="."
   destdir="."
   includes="*.java"
  />
 </target>
</project>

I want the .class files to be created in the same directories as the .java
files. To do this, I cd to d:\classes\test and execute "ant". The following
output is generated.

compile:
    [javac] Compiling 1 source files to D:\classes\test

MY PROBLEM:

ant generates a "test"-subdirectory for the .class-files ==>
d:\classes\test\test\Hello.class

I tried to use destdir="d:\classes", but in this case ant decides to _not_
use that "test"-directory ==> d:\classes\Hello.class

In each case, the Hello.class is generated in the wrong directory.

Can anyone tell me how to produce the wanted result? Thanks!


Environment: Windows 2000 Professional, JDK 1.3, Ant 1.1

Gruss,

  Andreas Schildbach
  financial media service



Mime
View raw message