ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael van Leeuwen" <lem...@dsdelft.nl>
Subject [Bug?] Was: Re: Ant Configure Task v0.93
Date Wed, 20 Dec 2000 10:37:54 GMT
I noticed that Ant is responsible for the following invocation of javac:
(note: it works correctly for java1.1.7)

javac -classpath <mypath> -sourcepath <sourcedir> 

I've tried to not set the src= in the java task, but that's not allowed.

Problem is that the -sourcepath overwrites the current classpath.
That seems to be an ANT bug.

As long as the build is done on the highest level, there will be no
problem (which is the default behavior of Ant without this task).

A workaround is by setting the src directive to a set of paths:
<javac src="dir1;dir2;dir3" ....>, but then the classpath directive
is of no use...

Anybody ?

Regards,
Michael.

Ant version 1.3alpha compiled on November 20 2000 
Buildfile: build.xml
Detected Java Version: 1.2
Detected OS: Windows NT

From: Dean Holdren 
  To: ant-user@jakarta.apache.org 
  Sent: Tuesday 19 December 2000 21:37
  Subject: RE: Ant Configure Task v0.93 : recursive builds; separate objecttree; generation
of child build files


  OK, I have tried this, and I successfully set up everything. but there is
  one problem: dependencies.
  if my directory is completely clean of .class files and I try to build, it
  fails because a file depends on another class that has not been compiled
  yet.  If I tried to compile this file from the command line directly, javac
  would correctly compile the  files it is dependent on first and cause no
  errors, but ant is not doing that now that I have set up recursive compiling
  using Ant Configure Task.

  Can somebody pleas help me? here is a printout of the problem:


  compile:
      [javac] Compiling 1 source file to D:\StealthCruiser3\WebMan\account
      [javac] D:\MyProj\WebMan\account\AccountManager.java:24: Class Web
  an.timecruiser.Name not found in import.
      [javac] import WebMan.timecruiser.Name;  // unfortunately
      [javac]        ^
      [javac] D:\MyProj\WebMan\account\AccountManager.java:25: Class Web
  an.timecruiser.UserAccount not found in import.
      [javac] import WebMan.timecruiser.UserAccount;  // unfortunately
      [javac]        ^
      [javac] 2 errors

  BUILD FAILED

  D:\MyProj\WebMan\account\build.xml:50: Compile failed, messages should
  have been provided.


  Here is the top build.xml file:


  -----Original Message-----
  From: Michael van Leeuwen [mailto:michael@hotobjects.nl]
  Sent: Tuesday, December 12, 2000 10:44 AM
  To: ant-user@jakarta.apache.org; ant-dev@jakarta.apache.org
  Subject: Ant Configure Task v0.93 : recursive builds; separate
  objecttree; generation of child build files


  I have created a configure task which allows the generation & use
  of build files on any level. Just copy the build.xml from the support
  directory to the highest package, modify it to your whishes and run
  target setup.

   The task modifies the current build file to call the target (except for
   the predefined and excluded targets) via adding or replacing an task
   for ant to call the target in any subdirectory. When there is no build
   file in this subdirectory, it will be created using the current build
   file. This will also be processes, unless the recursive parameter is
   set to no.

  Any comments or improvements are welcome.

  Known issues can be found in the TODO file. Note that the java exe
  in window/system32 should be renamed, otherwise the build will fail
  when using Java 1.3.

  The files can be downloaded from <http://www.dsdelft.nl/~lemval/ant/>
  The tgz and zip package hold the same content. Just put the anttc.jar
  file in the classpath.

  Please read the README before use.

  Regards,
  Michael van Leeuwen
  [ michael@hotcompany.nl ] http://www.hotobjects.com



Mime
View raw message