ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph Shelby <acroy...@io.com>
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/a.java"/>
> >>>    <include name="bar/b.java"/>
> >>> </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 a.java c.java -sourcepath bar b.java

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 a.java c.java
javac -sourcepath bar b.java

but if there are dependencies for b.java to need a.java and a.java is also
in the bar path, a.java 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.

Joe
-- 
----------------------------------------------------------------------
Joseph Shelby                                   mailto:acroyear@io.com
5809 Chase Commons Ct. #201                http://www.io.com/~acroyear
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:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message