ested filesets - how to do it?
I've inherited this Ant build file, and am trying to clean it up a bit! I have this bit of code... (somewhat abridged!) and I'd like to rewrite so as to remove the redundant repetition of common/decoder, something like... only of course you can't do that, 'cos doesn't understand about directories, only aboout patterns. I thought maybe I shold nest filesets, but I couldn't do that either, tho' maybe my syntax was wrong. I thought of splitting it to several filesets, but I need to tag the whole with an id - maybe I should be using some other container and tag that? Any thoughts? Thanks in Advance, Rob. -- ACCU - Professionalism in programming - http://www.accu.org
AW: ested filesets - how to do it?
a) use a with several s b) dont use common|decoder in the pattern. But in that way you also include decoder/AutoProfile.c ... (if present) ! Jan > -Ursprüngliche Nachricht- > Von: Robert Jones [mailto:[EMAIL PROTECTED] > Gesendet: Mittwoch, 6. August 2008 10:43 > An: user@ant.apache.org > Betreff: ested filesets - how to do it? > > I've inherited this Ant build file, and am trying to clean it > up a bit! > > I have this bit of code... (somewhat abridged!) > > > > > > > > > > > > > > > and I'd like to rewrite so as to remove the redundant repetition of > common/decoder, > something like... > > dir="${wma.sourcefiles.root}/audio/wmaudio/v10"> > > > > > > > > > > > > > only of course you can't do that, 'cos doesn't understand > about directories, only aboout patterns. > > I thought maybe I shold nest filesets, but I couldn't do that > either, tho' > maybe > my syntax was wrong. > > I thought of splitting it to several filesets, but I need to > tag the whole > with > an id - maybe I should be using some other container and tag that? > > Any thoughts? > > Thanks in Advance, Rob. > > > > -- > ACCU - Professionalism in programming - http://www.accu.org > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
fileset manipulation
If I have fileset A: Is it possible to get the following fileset by a command that takes fileset A as an argument in ? Best regards Ivar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem with revConstraint
Many thanks for this. I've been having trouble building the trunk for some reason. Is there any chance we can have the latest snapshot in jar form like last time? Also is there a snapshot IvyDE available anywhere nightly build or somesuch. If I can get this ill let you know if all is working. Thanks, Alex Foreman Morgan Stanley | Technology 20 Cabot Square | Canary Wharf | Floor 06 London, E14 4QW Phone: +44 20 7677-5732 [EMAIL PROTECTED] -Original Message- From: Xavier Hanin [mailto:[EMAIL PROTECTED] Sent: 04 August 2008 18:58 To: [EMAIL PROTECTED] Subject: Re: Problem with revConstraint On Wed, Jul 30, 2008 at 3:34 PM, Foreman, Alex (IT) < [EMAIL PROTECTED]> wrote: > Hi, > > We use a custom version matcher that loads in default values from a > property file and when rev="default" we look for a property called > 'org.module.default' and use that value. > > E.g. > Apache.ivy.default=1.3 > > Would match org="apache" name="ivy" rev="default" to rev="1.3" in the > delivered ivy file and also place revConstraint="default" into that > dependency. > > If we have someone that consumes this ivy that does not load up the > properties file we fail even tho we are using resolveMode="default". > IE it shuld not take into account the revConstraint. It is however > trying to work this out anyway and causing the cachepath to fail as > our default version matcher cannot find the property. > > Eg I ask for Apache#ivy!1.3 > > The ivy file has a revConstraint="default" in its dependeny and we > crash out even tho I specifed an exact value and did not want to use the > default. > > My question is: > Why does the resolve/cachepath look at the revConstraint when we are > not interested in it in resolveMode="true". In default resolveMode, the revConstraint should be ignored except for reporting. After checking the code it seems that there's one place where it's used whatever the setting is: in ModuleInSort class. I see no reason why this is used, I guess it's due to the initial way of dealing with resolveMode, but now we use a mediation mechanism, so now using the dependency revision id seems to be better. I've just committed this change in Ivy, could you try out the trunk version and tell if it works better. Xavier > > > Can we : > a) not try to resolve the revConstraint if it is not needed? > B) strip revConstraint out on a deliver so its not there? > C) tell ivy to always ignore the revConstraint. > > Can we currently do any of the above 3? > > If not do people consider this a bug and should it be fixed? > > Many thanks, > > Alex Foreman > Morgan Stanley | Technology > 20 Cabot Square | Canary Wharf | Floor 06 London, E14 4QW > Phone: +44 20 7677-5732 > [EMAIL PROTECTED] > > > NOTICE: If received in error, please destroy and notify sender. Sender > does not intend to waive confidentiality or privilege. Use of this > email is prohibited when received in error. > -- Xavier Hanin - Independent Java Consultant http://xhab.blogspot.com/ http://ant.apache.org/ivy/ http://www.xoocode.org/ NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.
Support mutliple if and unless
Hi, Can ant support multiple if and unless. I would rather not need to use ant-contrib for this. These will infact look for a property called "x,y": Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Support mutliple if and unless
> Can ant support multiple if and unless. I would rather not need to use > ant-contrib for this. > > These will infact look for a property called "x,y": > Not directly. You would calculate a new property for that: <.../> Jan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Uptodate working one way only
Hi Ant users, I wish there was a way to use the uptodate task in the other direction, not check source against target but check target against source. Since my list of files in source comes from a list in a text file, and it's easy to use a mapping to map them to the place where they are copied to (aggregated). But I want to have a way to use antcall or something similar if there is anything needs to be copied, and it's almost impossible with the current uptodate task. Regards, Evgeny - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: fileset manipulation
Ivar, I think your problem is similar to the one I described a few days ago in: http://mail-archives.apache.org/mod_mbox/ant-user/200808.mbox/% [EMAIL PROTECTED] So far I have not been able to solve it, nor received any answers. I guess that the answer is that it can not be done using standard ant stuff, that we may need to write custom tasks to do this work. F On Aug 06, 2008, at 05:37, Ivar Bratberg wrote: If I have fileset A: Is it possible to get the following fileset by a command that takes fileset A as an argument in ? Best regards Ivar - 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]
AW: For loop
Use s begin and end attributes: ... Jan > -Ursprüngliche Nachricht- > Von: Diana Huang (AU) [mailto:[EMAIL PROTECTED] > Gesendet: Dienstag, 22. Juli 2008 07:05 > An: user@ant.apache.org > Betreff: For loop > > Hi, > > I am using the below codes to get for loop working > > > >classname="net.sf.antcontrib.logic.ForTask" > classpath="lib/ant-contrib-1.0b3.jar" /> > > > > > > > > Letter @{test} > > > > > > However, if I want to iterate 60 times, how can I do it? (I > don't want to put 60 characters in the list) > > Thanks, > > Diana Huang > > > Diana Huang > > CIS-DIDATA > P: 0396264247 > M: 0417468079 > E: [EMAIL PROTECTED] > > > > > ** > > - NOTICE FROM DIMENSION DATA AUSTRALIA > This message is confidential, and may contain proprietary or > legally privileged information. If you have received this > email in error, please notify the sender and delete it immediately. > > Internet communications are not secure. You should scan this > message and any attachments for viruses. Under no > circumstances do we accept liability for any loss or damage > which may result from your receipt of this message or any attachments. > ** > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
javac .. java added as class does not exist
Hi everybody, I have a build logfile, which contains a lot of these messages: [javac] HelloWorld.java added as HelloWorld.class doesn't exist. The files are definitely there, but somehow ant does not find them. I've set a correct JAVA_HOME and ANT_HOME and unset CLASSPATH (i'm using windows xp sp2) at the end the build is successful, but the files with ".. doesn't exist" are missing, so that the jar I created does not work at all. I googled for a solution, but I didn't find any, so I hope this mailinglist can help me. regards matthias - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
rename files in directory and subdirectory
Hello, I have a directory with some subdirectories (and they have also subdirectories). They contain about 260 files. I need to rename some of the files. I don't want to rename every file separate. Is there a ant way to do this? I looked up at ant move, but I think its not possible with the move task. Could you please help me? regards Isaac -- View this message in context: http://www.nabble.com/rename-files-in-directory-and-subdirectory-tp18853422p18853422.html Sent from the Ant - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Not able to call build.xml from another file build-testjava.xml - Getting error: java.io.FileNotFoundException
Hi, I have a file called build-testjava.xml which checksout the latest code from the code repository and then calls a file called build.xml (this file is also present in the checked out code). The file build.xml compiles the .java files and makes .jar out of it. My problem is that whenever I try running the file build-testjava.xml, I get the following error. Although it says that it could not find the file build.xml, it’s very much present at the specified location. Error Description: -- F:\buildtestjava>ant -f build-testjava.xml Buildfile: build-testjava.xml build: [delete] Deleting directory F:\buildtestjava\checkout\Test_Code [cvs] cvs checkout: Updating Test_Code/Test_Java [cvs] U Test_Code/Test_Java/build.xml.xml [cvs] cvs checkout: Updating Test_Code/Test_Java/Database [cvs] cvs checkout: Updating Test_Code/Test_Java/Database/Doc [cvs] U Test_Code/Test_Java/Database/Doc/.htaccess [cvs] cvs checkout: Updating Test_Code/Test_Java/Database/Schema [cvs] cvs checkout: Updating Test_Code/Test_Java/Database/Schema/appusers [cvs] cvs checkout: Updating Test_Code/Test_Java/Database/Schema/appusers/grants [cvs] U Test_Code/Test_Java/Database/Schema/appusers/grants/.htaccess [cvs] cvs checkout: Updating Test_Code/Test_Java/Database/Schema/appusers/source [cvs] cvs checkout: Updating Test_Code/Test_Java/Database/Schema/tc_project [cvs] U Test_Code/Test_Java/Database/Schema/tc_project/.htaccess [cvs] cvs checkout: Updating Test_Code/Test_Java/src [cvs] U Test_Code/Test_Java/src/Ample.java [cvs] U Test_Code/Test_Java/src/Sample.java [cvs] U Test_Code/Test_Java/src/testOne.java [cvs] U Test_Code/Test_Java/src/testfile.java BUILD FAILED F:\buildtestjava\build-testjava.xml:7: The following error occurred while executing this line: java.io.FileNotFoundException: F:\buildtestjava\checkout\Test_Code\Test_Java\build.xml (The system cannot find the file specified) Total time: 1 second F:\buildtestjava> -- Contents of build-testjava.xml: -- -- Contents of build.xml: -- -- Can anyone please help me out? Thanks & Regards, Gaurav Chhabra -- View this message in context: http://www.nabble.com/Not-able-to-call-build.xml-from-another-file-build-testjava.xml---Getting-error%3A-java.io.FileNotFoundException-tp18853666p18853666.html Sent from the Ant - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: rename files in directory and subdirectory
--- IsaakTaylor <[EMAIL PROTECTED]> wrote: > > Hello, > > I have a directory with some subdirectories (and > they have also > subdirectories). They contain about 260 files. I > need to rename some of the > files. I don't want to rename every file separate. > Is there a ant way to do > this? > > I looked up at ant move, but I think its not > possible with the move task. > Could you please help me? may/should do what you want, but I'd need more detail before I could tell you anything more than that. -Matt > > regards Isaac > -- > View this message in context: > http://www.nabble.com/rename-files-in-directory-and-subdirectory-tp18853422p18853422.html > Sent from the Ant - Users mailing list archive at > Nabble.com. > > > - > 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]
Re: fileset manipulation
--- Florijan Stamenkovic <[EMAIL PROTECTED]> wrote: > Ivar, > > > I think your problem is similar to the one I > described a few days ago > in: > > http://mail-archives.apache.org/mod_mbox/ant-user/200808.mbox/% > > [EMAIL PROTECTED] Maybe so; I honestly can't tell what Ivar is after. > > So far I have not been able to solve it, nor > received any answers. I > guess that the answer is that it can not be done > using standard ant > stuff, that we may need to write custom tasks to do > this work. > To answer your original query, F, for the time being I would probably load your includesfile using with a nested filterchain and thereby customize your basic includesfile for each occasion. I'm assuming that you've already determined that the subdirectories enumerated in that basic file follow no generalizable pattern. HTH, Matt > F > > On Aug 06, 2008, at 05:37, Ivar Bratberg wrote: > > > If I have fileset A: > > > > > > > > > > > > Is it possible to get the following fileset by a > command that takes > > fileset A as an argument in ? > > > > > > > > > > > > Best regards > > Ivar > > > > > - > > 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]
Re: rename files in directory and subdirectory
If move does not do it, copy in combination with a (regex) mapper should. Maybe something like this would do: 1. Copy all your files from the source dir to the temp dir, apply a regex mapper. 2. Delete the source dir 3. Copy the temp stuff back to the source dir. Like Matt said, more information is needed be able to figure out exactly what should work. F On Aug 06, 2008, at 11:15, IsaakTaylor wrote: Hello, I have a directory with some subdirectories (and they have also subdirectories). They contain about 260 files. I need to rename some of the files. I don't want to rename every file separate. Is there a ant way to do this? I looked up at ant move, but I think its not possible with the move task. Could you please help me? regards Isaac -- View this message in context: http://www.nabble.com/rename-files-in- directory-and-subdirectory-tp18853422p18853422.html Sent from the Ant - Users mailing list archive at Nabble.com. - 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]
Re: fileset manipulation
On Aug 06, 2008, at 11:35, Matt Benson wrote: To answer your original query, F, for the time being I would probably load your includesfile using with a nested filterchain and thereby customize your basic includesfile for each occasion. Huh, I can't find something to append text at the end of a line (the opposite of PrefixLines) in the documentation (link below). Am I missing something obvious? I guess that token filter + ReplaceRegex should do the trick though. http://ant.apache.org/manual/CoreTypes/filterchain.html Thanks for pointing it out though, I missed this as an option. I'm assuming that you've already determined that the subdirectories enumerated in that basic file follow no generalizable pattern. I am not sure that I understand your point. The structure of the subdirectories declared in the includes file is predictable. It is just that I require different things from it, at different times. For example, for a given Foo folder, at one point I need to get Foo/dist/ Foo.framework/**/*.* and at other times I need Foo/build.xml Is that what you're asking? F - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: fileset manipulation
Are you talking about referencing the first file set? Why not have two path refids? Can I have a little more context to go with this question? Where is this fileset getting used? -Original Message- From: Ivar Bratberg [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2008 5:37 AM To: user@ant.apache.org Subject: fileset manipulation If I have fileset A: Is it possible to get the following fileset by a command that takes fileset A as an argument in ? Best regards Ivar - 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]
RE: Not able to call build.xml from another file build-testjava.xml - Getting error: java.io.FileNotFoundException
[cvs] U Test_Code/Test_Java/build.xml.xml < that could be your problem ;-) -Original Message- From: Gaurav Chhabra [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2008 11:27 AM To: user@ant.apache.org Subject: Not able to call build.xml from another file build-testjava.xml - Getting error: java.io.FileNotFoundException Hi, I have a file called build-testjava.xml which checksout the latest code from the code repository and then calls a file called build.xml (this file is also present in the checked out code). The file build.xml compiles the .java files and makes .jar out of it. My problem is that whenever I try running the file build-testjava.xml, I get the following error. Although it says that it could not find the file build.xml, it's very much present at the specified location. Error Description: -- F:\buildtestjava>ant -f build-testjava.xml Buildfile: build-testjava.xml build: [delete] Deleting directory F:\buildtestjava\checkout\Test_Code [cvs] cvs checkout: Updating Test_Code/Test_Java [cvs] U Test_Code/Test_Java/build.xml.xml [cvs] cvs checkout: Updating Test_Code/Test_Java/Database [cvs] cvs checkout: Updating Test_Code/Test_Java/Database/Doc [cvs] U Test_Code/Test_Java/Database/Doc/.htaccess [cvs] cvs checkout: Updating Test_Code/Test_Java/Database/Schema [cvs] cvs checkout: Updating Test_Code/Test_Java/Database/Schema/appusers [cvs] cvs checkout: Updating Test_Code/Test_Java/Database/Schema/appusers/grants [cvs] U Test_Code/Test_Java/Database/Schema/appusers/grants/.htaccess [cvs] cvs checkout: Updating Test_Code/Test_Java/Database/Schema/appusers/source [cvs] cvs checkout: Updating Test_Code/Test_Java/Database/Schema/tc_project [cvs] U Test_Code/Test_Java/Database/Schema/tc_project/.htaccess [cvs] cvs checkout: Updating Test_Code/Test_Java/src [cvs] U Test_Code/Test_Java/src/Ample.java [cvs] U Test_Code/Test_Java/src/Sample.java [cvs] U Test_Code/Test_Java/src/testOne.java [cvs] U Test_Code/Test_Java/src/testfile.java BUILD FAILED F:\buildtestjava\build-testjava.xml:7: The following error occurred while executing this line: java.io.FileNotFoundException: F:\buildtestjava\checkout\Test_Code\Test_Java\build.xml (The system cannot find the file specified) Total time: 1 second F:\buildtestjava> -- Contents of build-testjava.xml: -- -- Contents of build.xml: -- -- Can anyone please help me out? Thanks & Regards, Gaurav Chhabra -- View this message in context: http://www.nabble.com/Not-able-to-call-build.xml-from-another-file-build -testjava.xml---Getting-error%3A-java.io.FileNotFoundException-tp1885366 6p18853666.html Sent from the Ant - Users mailing list archive at Nabble.com. - 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]
CPD using Java Call
We tried the CPD (from PMD) ant call, but because we have so many classes, we get an outofmemory exception. We can do the java command-line which works fine and dumps the output to the command-line: java -Xmx384m -classpath ../../.ant/lib/pmd-4.2.2.jar net.sourceforge.pmd.cpd.CPD --minimum-tokens 100 --files ./src --format net.sourceforge.pmd.cpd.XMLRenderer --output ./buildreports/report.cpd.xml So, what I want to do is use the ant "java" task as listed below so that the CPD runs in it's own JVM with a different heap space size. location="${user.home}/.ant/lib/pmd-4.2.2.jar"/> But, in doing this I am getting the error: NoClassDefFoundError: org/apache/tools/ant/Task I didn't think I had to, or needed to, include the jars from ant. Can anyone give me a quick solution ... I feel that I am almost there. Thanks! Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Copying everything except one file
Hi, I'm using this command to copy a directory but what I would like to copy all files in that directory except the one named "mine.properties". What is the quickest way to do this? - Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Copying everything except one file
On Wed, Aug 6, 2008 at 8:28 PM, <[EMAIL PROTECTED]> wrote: > Hi, > > I'm using this command to copy a directory > > depends="dev-create-log-dir,dev-create-conf-dir"> > > > > > > > > > > > > > but what I would like to copy all files in that directory except the one > named "mine.properties". What is the quickest way to do this? > > - Dave > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > After the line use . -- ACCU - Professionalism in programming - http://www.accu.org
Re: CPD using Java Call
On 06/08/2008, Tom Holmes Jr. <[EMAIL PROTECTED]> wrote: > > We tried the CPD (from PMD) ant call, but because we have so many classes, > we get an outofmemory exception. The PMD documentation suggests increasing Ants memory, have a look at the end of following page for examples http://pmd.sourceforge.net/ant-task.html Rod We can do the java command-line which works fine and dumps the output to the > command-line: > java -Xmx384m -classpath ../../.ant/lib/pmd-4.2.2.jar > net.sourceforge.pmd.cpd.CPD --minimum-tokens 100 --files ./src --format > net.sourceforge.pmd.cpd.XMLRenderer --output ./buildreports/report.cpd.xml > > So, what I want to do is use the ant "java" task as listed below so that > the CPD runs in it's own JVM with a different heap space size. > > > > > > > > > > > > > > > But, in doing this I am getting the error: NoClassDefFoundError: > org/apache/tools/ant/Task > I didn't think I had to, or needed to, include the jars from ant. > > Can anyone give me a quick solution ... I feel that I am almost there. > Thanks! > Tom > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >