I have been able to successfully compile the application as you specified below - The reason i want a manually-maintained file containing a list of files to compile Is for the developers - As i said in a prior email - We are currently going through a pretty heavy devlopment cycle at the moment - And new java files are being ccreated regularly - I am the release engineer - And am going on Vacation (Jamaica) next week - I would like for the developers to be able to run their own builds without touching the actual build scripts - Again the reason the file is needed - There are many dependencies with between each of the units (db, mail, servlet etc...) and each of the java files within a unit - db: java1 needs java2 etc...
For a deveoper that does not know much about ant - It can be time consuming to learn - I know - Cause i had to learn on my own. Thanks, VA -----Original Message----- From: Jeffrey Jensen [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 28, 2002 2:45 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: ANT Capability Is there a reason for supplying a manually-maintained file containing a list of files to compile? If not, perhaps there is a misunderstanding of one of the powers of Ant. That file is not required for Ant to compile the files. Ant automatically works on sets of files in a file set or directory structure. A <javac> task can be very simple. For example, this <javac> task: <javac destdir="${build.dev.class.dir}" debug="true" deprecation="true"> <src path="${src.code.src.dir}" /> <src path="${src.code.test.dir}" /> </javac> compiles all code in the directory (and subdirectories) specified by each <src>. Unless I misinterpret your emails, that is the feature you are looking for, but just don't know it is built in. May I suggest reviewing the Ant docs more, particularly the <javac> task and the examples in the "Using Ant" topic. If I misunderstand, apologies in advance, and I suggest to get something compiling first and then work on excluding any files from compiling if necessary. >>> [EMAIL PROTECTED] 02/28/02 12:57PM >>> Diane, So - All i have to is Define a property for bean.txt <property name="JList" value="${cfnDir}\bean.txt" /> I guess it my lack of unserstanding of how javac works - Doesnt it expect java file to be in the 'srcdir' rather than a txt file - Or does it know that it should read from the txt Currently i specify javac srcdir=\cfn\sicav\citco\java\com\citco\cfn\sicav\bean - Is this what i would do ? <target name="compile" depends="init"> <!-- Compile the java code from ${src} into ${build} --> <javac srcdir="${JList}" destdir="${buildCfn}" </target> As for the below - How would this work - Again - javac would expect java files. Correct ? <target name="compile" depends="init"> <!-- Compile the java code from ${src} into ${build} --> <javac srcdir="${srcDir}" destdir="${buildCfn}" includesfile name="d:\scripts\cfn\bean.txt" /> </target> -----Original Message----- From: Diane Holt [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 28, 2002 1:10 PM To: Ant Users List Subject: RE: ANT Capability --- "Atluri, Vamsi NYC" <[EMAIL PROTECTED]> wrote: > I am having a bit of trouble understanding how to put the code together > for javac to read in > > I have not tried the below yet - Obviously it wont work - But i dont > understand how to parse the file into - or how to let javac know that it > should compile from the bean.txt > > <target name="compile" depends="init"> > <!-- Compile the java code from ${src} into ${build} --> > <javac srcdir="${cfnCoreDB}" destdir="${buildCfn}" > <patternset> > <includesfile name="d:\scripts\cfn\bean.txt" /> > <patternset/> > </target> Get rid of the <patternset> -- <includesfile> nests under <javac> (or just use the simple 'includesfile' attribute). > Also - What should my bean.txt look like - At the moment i have each > java file listed on every line You can do that, or you can use wildcards, or a combination of both. The filenames should start with the next directory down from your 'srcdir'. For example: com/atluri/io/Input.java com/atluri/tools/parser/*.java com/atluri/utils/**/*.java > Even this example - Looks closer to what i want but - when you tell > javac src path - Would it compile everything in src and src2 then > > <javac destdir="${buildcfn}" > debug="on"> > <src path="${src}"/> > <src path="${src2}"/> > <includesfile name="d:\scripts\cfn\bean.txt"/> > </javac> No -- it'll compile (when necessary) all the files specified in the bean.txt file, looking for them relative to ${src} or ${src2} (if not found in ${src}). (Just as a side note: You might want to reconsider that hard-coded full-path for the includes file -- better to define the directory in a property, along with the other directory properties you're defining.) Diane ===== ([EMAIL PROTECTED]) __________________________________________________ Do You Yahoo!? Yahoo! Greetings - Send FREE e-cards for every occasion! http://greetings.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
