Take a look at this task: < http://ant.apache.org/manual/OptionalTasks/replaceregexp.html>
And, then take a look at this: < http://ant.apache.org/manual/CoreTypes/regexp.html> It appears that the two might be related. If that's the case, you might be able to use the <replaceregexp> somehow in the <regexp>. Also take a look at TokenFilters < http://ant.apache.org/manual/CoreTypes/filterchain.html#tokenfilter>. These also work in filter chains. I'll take a look at this, and see if I can figure out how to do a comparison. I suspect that you have to do two loadreferences to get the file contents into two properties and then do a compare among the properties. 2009/7/29 Júlio Cesar Bueno Cotta <[email protected]> > Hello good people > I am here again needing some help > now I need to do a I script to compare two ".properties"..like > > First file Name: dev.properties > @v...@=test1 > > @v...@=test2 > @v...@=test3 > > Secund fiel Name: prd.properties > # comment > @v...@=test1 > > @v...@=test1037 > > @v...@=test4 > > > I need to compare these two files and so fail the build if then have some > differences.. > The files need to have the same numer of lines and each line must to have > the same variable declared or to be a empty line or a comment. > The variables declared in dev.properties must by declared ( in the same > order ) in prd.properties and the variables in prd.properties must by in > dev.properties, but the values of these variables can be different. > So..the files should be like this to don't fail the build: > > dev.properties > # comment > @v...@=test1 > > @v...@=test2 > > @v...@=test3 > > @v...@=test4 > > prd.properties > # comment > @v...@=test1 > > @v...@=test1037 > > @v...@=test3 > > @v...@=test4123 > > That seens to be a idiot thing to do..but when I do a compare between these > files > I was trying to find something here > http://ant.apache.org/manual/CoreTypes/filterchain.html#linecontainsregexp > > but I didn't find I way to compare line by line and I way to get the piece > of each line before the "=" signal. > the linecontainsregexp return all the line ..is there a "split method" in > Ant ? > Thanks all! > > -- > Júlio Cesar Bueno Cotta > Graduando em ciência da computação > Universidade Federal de Viçosa > -- David Weintraub [email protected]
