Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multiple dist directories in "javac" tasks in Ant

 
Cris Smith
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18009
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic