Thanks, this gives me something to consider. On Tue, Sep 28, 2010 at 1:22 PM, David Weintraub <qazw...@gmail.com> wrote: > Not 100% sure what you're asking. Let me get a synopsis: > > 1. You have two "source" folders: One contains "generated" *.java > files. (I'm assuming *.java). The other contains *.java that you've > coded. > 2. When you compile, you want the files in the "hand coded" *.java > files to be used instead of the ones in the "generated" sources file. > > My solution (since these are source files is to first copy the > "generated" *.java files into a third folder, then copy over the "hand > coded" *.java files with "overwrite". That'll overwrite any files with > the same name with the "generated" ones deleted and the "hand coded" > ones kept. > > Then, you compile the third source folder (the one you've copied all > the files to). This will save you from compiling source code that > isn't needed. > > Is this what you want? > > On Mon, Sep 27, 2010 at 4:32 PM, Michael Giroux <mlgir...@gmail.com> wrote: >> I have two source folders in my project. On folder contains files >> that are generated by the build, and a second folder contains our >> hand-coded sources. If cases where package and class names are the >> same, we only want to include the sources from the hand-coded src >> tree, so we need to delete corresponding files from the generated src >> folder. >> >> The script should >> 1. generate src >> 2. delete files from generated folder that have same package/class >> names as files in the src tree >> 3. compile >> >> I'm looking at the <delete> and <resources> descriptions, but so far, >> not able to build a delete task that does what I need. Reading the >> docs, it looks like I should be able to accomplish this: >> >> <delete dir="generated"> >> <restrict> >> <intersect> >> <fileset dir="generated/*.java"/> >> <fileset dir="src/*.java"/> >> </intersect> >> </restrict> >> </delete> >> >> {{ syntax incomplete }} >> >> Up to now, the delete is removing every file from the generated directory. >> >> Any pointers will be appreciated. >> >> Michael >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscr...@ant.apache.org >> For additional commands, e-mail: user-h...@ant.apache.org >> >> > > > > -- > David Weintraub > qazw...@gmail.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@ant.apache.org > For additional commands, e-mail: user-h...@ant.apache.org > >
--------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org