ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph Shelby <>
Subject Re: javac task
Date Mon, 11 Mar 2002 17:45:17 GMT
Niall Smart wrote:
> >>>you could try :
> >>>
> >>><javac>
> >>>    <src path="."/>
> >>>    <include name="foo/"/>
> >>>    <include name="bar/"/>
> >>> </javac>
> >>>
> >>Romain - that would work.  However I should have explained that I have a
> >>large number of source files in both directories and there is only one
> >>duplicate, so it is impractical to list all the files to compile.
> >
> > while don't you use the <exclude ...> command  for the duplicate file
> > with its full path ?
> Because there are a large number of other directories and files under
> "." which I do not want to include :)  It would be nice if the javac
> task took a fileset under <src> which allowed you to specify files (and
> not just directories as does the current task).

that would GREATLY complicate the javac task to a form where it would
have to by necessity make multiple calls to the javac executable.

you're looking for something that would work as if javac supported this form:

javac -sourcepath foo -sourcepath bar

and that's not how it works.  by asking ant to support fileset, you're
asking ant's javac to eventually come up with

javac -sourcepath foo
javac -sourcepath bar

but if there are dependencies for to need and is also
in the bar path, in bar will still be compiled (yeilding unnecessary
multiple compilation which i imply you're trying to get rid of).

i still stand by my first answer -- the fact that the duplicate file
error is showing up is demonstrating that you are doing something wrong
by having the duplicate files in the system in the first place.  find some
way ditch the duplicates.

every other possible way of handling this is such a kluge and hack to my mind
as to make me almost feel disguisted.

Joseph Shelby                         
5809 Chase Commons Ct. #201      
Burke, VA  22015                             (703) 323-7121 | 247-7868
          Software Engineer, ISX Corporation, Arlington, VA
"The people of England will permit anything...except cruelty to horses
and a rise in the price of beer."  -- Return of the Musketteers (1989)

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message