Meaningless Drivel is fun!*
The moose likes Ant, Maven and Other Build Tools and the fly likes Multiple dist directories in Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Multiple dist directories in "javac" tasks in Ant" Watch "Multiple dist directories in "javac" tasks in Ant" New topic
Author

Multiple dist directories in "javac" tasks in Ant

Cris Smith
Greenhorn

Joined: Jul 24, 2013
Posts: 1
Hi, I have simple question, if is possible use multiple directories in "javac" Ant task, something like this:


I'd avoid create unnecessary temporary directories and copy files.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16019
    
  20

That wouldn't make sense. The java compiler takes source files and produces class files on a 1-to-1 basis. What would you expect a multi-targeted compile to do? Replicate all of the outputs in all of the directories? Or randomly scatter classes among them?

If you just want to make multiple copies of a set of classes, just run a copy after the compile. That's the Unix approach - don't make 1 complex specialized program when you can make 2 simple general ones do the job.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
Don't get me started about those stupid light bulbs.
 
subject: Multiple dist directories in "javac" tasks in Ant