DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4372>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4372

Javac task always generates optional -sourcepath switch





------- Additional Comments From [EMAIL PROTECTED]  2001-12-20 08:46 -------
The problem isn't whether someone's pointing the "srcdir" attribute to the 
right directory (I'm not saying that isn't A problem -- just saying it's not 
really THIS problem). This problem is as described by Jason Winshell's first 
notes: Now that "srcdir" is translated to be an arg for the -sourcepath flag, 
no directories listed in "classpath" (or nested <classpath>) that point to dirs 
containing .java files will be recognized by the compiler as a place to look 
for source-files for class-files it can't find; before, you could put dirs that 
pointed to directories containing .java files in the classpath, but you can't 
do that if -sourcepath is always going to be on the command-line, because the 
way 'javac' works when -sourcepath is included is to ignore anything in the 
classpath that's not already a compiled object. So to do that now (ie., 
includes directories that contain .java files), you need to not 
specify "srcdir" at all, but instead specify a nested <src>. Barking "RTFM" 
doesn't address the problem, because the "FM" doesn't mention that. BTW: I know 
all this now, because of Judy Sowell's mail to ant-user, asking why her compile 
was failing EVEN THOUGH she was including the classpath the directory that 
included the referenced .java files -- see:
  http://marc.theaimsgroup.com/?l=ant-user&m=100800459902088&w=2
I helped her fix her problem (off-list) by having her get rid of "srcdir" and 
using a nested <src> instead -- but really, I don't think that's anything but a 
workaround for this bug.

The quick fix is to have the manual explain that you need to do that -- but I 
agree with Jason that the real fix would be to ONLY include the -sourcepath 
flag when someone has specifically used the nested <src> element, and NOT do it 
if they've used "srcdir".

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

Reply via email to