Well I thought of another way : I could load my dependencies file list in a <patternset> using includesFile attribute. Then I could use this <patternset> with <pathconvert> to generate a comma-separated string that I could pass to the <filelist> files attribute.
Problem is: How can I set <pathconvert> to work with a <patternset> ? Thanks, Jeremie > -----Original Message----- > From: BOUSQUET Jeremie [mailto:[EMAIL PROTECTED] > Sent: lundi 22 août 2005 09:05 > To: Ant Users List > Subject: Match list of files agains fileset > > I reply to this message because my problem is quite similar > in reverse... > > I use the following to check that some dependencies listed in > a file (relative paths) really exist in a real fileset. > > [ANT SCRIPT] > <pathconvert property="unknown.dependencies" setonempty="false"> > <path> > <fileset dir="${real.fileset}" > includesfile="${dependencies.list.filename}"> > <different targetdir="${real.fileset}" > ignoreFileTimes="true"/> > </fileset> > </path> > </pathconvert> > [ANT SCRIPT] > > This, of course, does not do what was expected : all files > included in <fileset> are by construction existing files, and > so <different> does not match anything ... > > Well to make it work I would love just to replace <fileset> > by <filelist>, because in filelist files don't need to really > exist ... > But it's not possible because <filelist> don't know about > <includesfile> attribute, so I'm ... A bit disappointed. > > Do you think my analysis is correct ? > And how to resolve this issue ? (without coding a new <filelist> ...) > > Regards, > Jeremie > > > > -----Original Message----- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > > Sent: jeudi 18 août 2005 07:50 > > To: [email protected] > > Subject: AW: Ensure Build Failed if fileset contains no jars > > > > <pathconvert property="files" setonempty="false"> > > <fileset dir="." includes="check.txt"/> > > </pathconvert> > > <fail message="no files" unless="files"/> > > > > Just set up the fileset ... > > > > > > Jan > > > > >-----Ursprüngliche Nachricht----- > > >Von: Rebhan, Gilbert [mailto:[EMAIL PROTECTED] > > >Gesendet: Mittwoch, 17. August 2005 16:20 > > >An: [email protected] > > >Betreff: Ensure Build Failed if fileset contains no jars > > > > > > > > >Hi, > > > > > >Problem = > > > > > >my script contains a target with two filesets. > > >If the compile -done in another script- fails, there are > only empty > > >folders, but no jars in it. > > > > > >If compile successful it looks like = > > > > > >dist/lib > > > /Toplevel > > > /project1 > > > /project2 > > > > > >if compile failed it looks like that = > > > > > >dist/lib > > > /Toplevel > > > > > ><target name="publish"> > > > > > > <fileset id="jarsfolder" dir="./temp/dist/lib/Toplevel" > > >includes="**/*"/> > > > <fileset id="jarsonly" dir="./temp/dist/lib/Toplevel" > > >includes="**/*.jar"/> > > > > > > <copy todir="${safir.jar.deploy}safir" overwrite="true"> > > > <fileset refid="jarsfolder"/> > > > </copy> > > > > > > > > > <move todir="./jars" flatten="true"> > > > <fileset refid="jarsonly"/> > > > </move> > > > > > > <!-- Move von Auftrag.txt und *.doc --> > > > <move file="${safir.txtquelle}${wordfile_move}" > > >todir="${safir.txtziel}/temp"/> > > > <move file="${auftragtxt}" todir="${safir.txtziel}"/> > > > > > ><target name="clean" depends="publish"> > > ><delete includeemptydirs="yes"> > > > <fileset dir="C:/cc_safir_workdir/checkout" > > >defaultexcludes="no"> > > > <include name ="**/*"/> > > > <exclude name="**/jars/*"/> > > > <exclude name="**/SAFIR Build/**"/> > > > </fileset> > > > </delete> > > > > > > > > >the filesets jarsfolder and jarsonly exist but only as empty > > >directories, containing no jars as compile in another > script failed. > > > > > >The script runs successful = > > > > > >Buildfile: publisher.xml > > > > > >publish: > > > > > > *** those are the txt and doc files that shouldnt be moved, > > > when compile in other script failed and no jars > available *** > > > > > > [move] Moving 1 file to C:\deployserver\liefern\prod\temp > > > [move] Moving 1 file to C:\deployserver\liefern\prod > > > > > >clean: > > > [delete] Deleting 1831 files from C:\cc_safir_workdir\checkout > > > [delete] Deleted 175 directories from > C:\cc_safir_workdir\checkout > > > > > >BUILD SUCCESSFUL > > > > > >Question : The script should fail, if there are no jars beyond the > > >toplevel directory. > > > > > >How to get a Build Failed when there are only empty folders ? > > > > > > > > >Regards, Gilbert > > > > > > >--------------------------------------------------------------------- > > >To unsubscribe, e-mail: [EMAIL PROTECTED] For > > additional > > >commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] For > additional > > commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] For > additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
