Rename directories in Ant
Hi, I'm trying to rename every "search" directory in a tree to "search_", but I'm not able to find the right way to do it. For example, if I have the files: /tmp/myDir/test/hello/search/Hello.html /tmp/myDir/test/hello/search/nice/lists/search/Greetings.html /tmp/myDir/test/hello/searchstrings/Hello.html /tmp/myDir/search/Regards.html I want to rename them to: /tmp/myDir/test/hello/search_/Hello.html /tmp/myDir/test/hello/search_/nice/lists/search_/Greetings.html /tmp/myDir/test/hello/searchstrings/Hello.html /tmp/myDir/search_/Regards.html I've read the docs and searched in Google, but I didn't find the solution. I have tried the following: --- --- But I get the results: /tmp/myDir/test/hello/search_/Hello.html /tmp/myDir/test/hello/search_/nice/lists [empty dir] /tmp/myDir/test/hello/search/nice/lists/search_/Greetings.html /tmp/myDir/test/hello/search_strings/Hello.html /tmp/myDir/search/Regards.html which is not the result I expected. Is there a way to perform this task? If it's possible, it would be very useful to include it in the documentation, as I've found in Google several people trying to do it, but none of them found the solution. Regards, -- César Martínez Izquierdo Equipo de desarrollo gvSIG http://www.gvsig.gva.es IVER T.I. C/ Salamanca 50 46005 Valencia - Spain http://www.iver.es - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [solved] Re: Running .app on Mac OSX
happy to help! Regs, /t >-Original Message- >From: Paul Barnes-Hoggett [mailto:[EMAIL PROTECTED] >Sent: Tuesday, June 12, 2007 9:25 PM >To: Ant Users List >Subject: [solved] Re: Running .app on Mac OSX > >Hi there, > your solution worked great, thanks! I actually needed to add >a little extra >into it so that I waited until the right content had been >written into the >file: > > > > > > > > > > > > > > > > > > > > > > >Re the other responses I got - I tried reaching into the .app on the >terminal to launch the player, but unfortunately that didn't work. >Re thr other response, the only options for 'open' are -a to >specify the >app, and -e to open the file in textEdit > >Cheers all > >PBH > > >On 6/12/07 12:29 PM, "RADEMAKERS Tanguy" <[EMAIL PROTECTED]> >wrote: > >> Hello Paul, >> >> You should be able to get around this by using the "waitfor" >task with a >> nested "available" check on the output file. >> >> Regs, >> /t >> >> >>> -Original Message- >>> From: Paul Barnes-Hoggett [mailto:[EMAIL PROTECTED] >>> Sent: Tuesday, June 12, 2007 6:16 PM >>> To: user@ant.apache.org >>> Subject: Running .app on Mac OSX >>> >>> Hi all, >>> I have an ant script that's been working on Win XP, and I'm >>> trying to get >>> it working on a Mac. >>> >>> Basically, I want to run an app (its a swf player) that writes >>> contents out >>> to a file, then closes. Ant waits till the process has >>> finished, then reads >>> the file. So, on Win XP, this works: >>> >>> >> depends="compileTest"> >>> >>> >>> >>> >>> >>> But from what I have found on a mac, I have to use the 'open' >>> command like >>> this: >>> >>> >>> >>> >>> >>> >>> >>> >>> The problem is that the ant script continues when the 'open' command >>> completes, not when the app actually closes. >>> Does anyone have any suggestions for how I might attack this >>> problem? Quite >>> new to ANT, so any help would be much appreciated >>> >>> Thx >>> >>> PBH >>> >>> >>> >>> >- >>> 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]
Re: Mail failing in build.xml file
Hi, I just read this message. If you already have the solution, sorry. I think you need the (activation.jar) as well. rgds, --- David Weintraub <[EMAIL PROTECTED]> wrote: > I just tried that. I downloaded mail-1.4.jar from > Sun, put it in > ~ant/lib, created a symbolic link from mail.jar -> > mail-1.4.jar, and > still get the same message. Here's the message with > "debug". I do get > something else with "debug" -- a missing antlib.xml: > > $ ~ant/bin/ant -debug -f mail.xml > Apache Ant version 1.7.0 compiled on December 13 > 2006 > Buildfile: mail.xml > Adding reference: ant.PropertyHelper > Detected Java version: 1.4 in: > /usr/local/jdk1.4.2_06/jre > Detected OS: Linux > Adding reference: ant.ComponentHelper > Setting ro project property: ant.file -> > /home/build/bin/mail.xml > Adding reference: ant.projectHelper > Adding reference: ant.parsing.context > Adding reference: ant.targets > parsing buildfile /home/build/bin/mail.xml with URI > = > file:/home/build/bin/mail.xml > Setting ro project property: ant.project.name -> > test > Adding reference: test > Setting ro project property: ant.file.test -> > /home/build/bin/mail.xml > Project base dir set to: /home/build/bin > +Target: > +Target: test > Attempting to create object of type > org.apache.tools.ant.helper.DefaultExecutor > Adding reference: ant.executor > Build sequence for target(s) `test' is [test] > Complete build sequence is [test, ] > > test: > [antlib:org.apache.tools.ant] Could not load > definitions from resource > org/apache/tools/ant/antlib.xml. It could not be > found. > [mail] Failed to initialise MIME mail: > javax/activation/DataSource > > BUILD SUCCESSFUL > Total time: 0 seconds > [EMAIL PROTECTED]:~/bin > > On 6/12/07, Saurabh Dave <[EMAIL PROTECTED]> > wrote: > > Download the Activation.jar and mail.jar and copy > in ant Lib folder... > > > > -Original Message- > > From: David Weintraub [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, June 12, 2007 3:26 AM > > To: Ant Users List > > Subject: Mail failing in build.xml file > > > > I have a very straight forward build.xml file: > > > > > > > > > from="[EMAIL PROTECTED]" > > subject="Test Email" > > mailhost="192.168.128.100" > > user="dweintraub" > > password="" > > message="This is a test email" > > failonerror="true"> > > > > address="[EMAIL PROTECTED]"/> > > > > > > > > > > When I attempt to execute it, I get the following > error message: > > > > test: > > [mail] Failed to initialise MIME mail: > javax/mail/MessagingException > > > > BUILD SUCCESSFUL > > > > > > Which is strange because I set "failonerror" to > "true". > > > > Any ideas? I am currently sending mail via > CruiseControl and that > > works (and where I got the parameters from) so I > know that it is > > possible to send email from this machine. > > > > -- > > David Weintraub > > [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] > > > > > > > -- > -- > David Weintraub > [EMAIL PROTECTED] > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > Luggage? GPS? Comic books? Check out fitting gifts for grads at Yahoo! Search http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Rename directories in Ant
What version of Ant are you using? You seem to take the hard way: If you're using at least version 1.3, you can simply do this: If it's earlier than version 1.3: No need to use a mapper or anything: BTW, the problem you're running into is that regex is naturally greedy, so it always takes the biggest chunk it can to make the match. Since you can easily define the directory using simpler globbing expressions, you could have use that. Or, you can use the "Reluctant" qualifier which will only take the very first match it can find: This: Instead of: See: http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/ Pattern.html for more information. On Jun 13, 2007, at 3:31 AM, Cesar Martinez Izquierdo wrote: Hi, I'm trying to rename every "search" directory in a tree to "search_", but I'm not able to find the right way to do it. For example, if I have the files: /tmp/myDir/test/hello/search/Hello.html /tmp/myDir/test/hello/search/nice/lists/search/Greetings.html /tmp/myDir/test/hello/searchstrings/Hello.html /tmp/myDir/search/Regards.html I want to rename them to: /tmp/myDir/test/hello/search_/Hello.html /tmp/myDir/test/hello/search_/nice/lists/search_/Greetings.html /tmp/myDir/test/hello/searchstrings/Hello.html /tmp/myDir/search_/Regards.html I've read the docs and searched in Google, but I didn't find the solution. I have tried the following: --- --- But I get the results: /tmp/myDir/test/hello/search_/Hello.html /tmp/myDir/test/hello/search_/nice/lists [empty dir] /tmp/myDir/test/hello/search/nice/lists/search_/Greetings.html /tmp/myDir/test/hello/search_strings/Hello.html /tmp/myDir/search/Regards.html which is not the result I expected. Is there a way to perform this task? If it's possible, it would be very useful to include it in the documentation, as I've found in Google several people trying to do it, but none of them found the solution. Regards, -- César Martínez Izquierdo Equipo de desarrollo gvSIG http://www.gvsig.gva.es IVER T.I. C/ Salamanca 50 46005 Valencia - Spain http://www.iver.es - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] David Weintraub [EMAIL PROTECTED] [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Rename directories in Ant
Qazwart wrote: > What version of Ant are you using? You seem to take the hard way: > > If you're using at least version 1.3, you can simply do this: > > todir="/tmp/myDir/test/hello/search_"/> > > If it's earlier than version 1.3: > > > > > > No need to use a mapper or anything: > > BTW, the problem you're running into is that regex is naturally greedy, > so it always takes the biggest chunk it can to make the match. Since you > can easily define the directory using simpler globbing expressions, you > could have use that. Or, you can use the "Reluctant" qualifier which > will only take the very first match it can find: > > This: Instead of: Hi Qazwart, thanks for your reply. The problem is that I don't want to rename ONE directory, but ALL the "search" directories in a directory tree. And the "search" directory may be located inside another "search" directory, so getting the very first match is not enough... I need all of them to be replaced... I guess it needs to be performed using a totally different strategy. Any idea? -- César Martínez Izquierdo Equipo de desarrollo gvSIG http://www.gvsig.gva.es IVER T.I. C/ Salamanca 50 46005 Valencia - Spain http://www.iver.es - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Disabling Continnum URL
I'm using Ant with Continuum. I already have a CVS url specified in the Ant Build.xml, now I dont want to specify the url in Continuum. Can this be done? is there anyway to prevent this happenning? -- View this message in context: http://www.nabble.com/Disabling-Continnum-URL-tf3914110.html#a11097627 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 directories in Ant
Hi, -Original Message- From: Cesar Martinez Izquierdo [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 13, 2007 12:57 PM To: Ant Users List Subject: Re: Rename directories in Ant /* Hi Qazwart, thanks for your reply. The problem is that I don't want to rename ONE directory, but ALL the "search" directories in a directory tree. And the "search" directory may be located inside another "search" directory, so getting the very first match is not enough... I need all of them to be replaced... I guess it needs to be performed using a totally different strategy. Any idea? */ maybe something like = use on your own risk ;-) i didn't get it how to put those two copy steps in one step only, but it seems to work anyway !? Regards, Gilbert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Edit XML-Files with Ant
Hi, I'm using Ant to generate an update site from my RCP-project. In this project I have different XML-files with version numbers in it. My ant task asks the user to type in this version number so I have to update these files with the given version number. The file "site.xml" of an update site is an example for that. Any ideas how I can modify these files? Regards, C.P.
RE: Edit XML-Files with Ant
Use the task. -- Charles Knell [EMAIL PROTECTED] - email -Original Message- From: <[EMAIL PROTECTED]> Sent: Wed, 13 Jun 2007 15:08:15 +0200 To: Subject: Edit XML-Files with Ant Hi, I'm using Ant to generate an update site from my RCP-project. In this project I have different XML-files with version numbers in it. My ant task asks the user to type in this version number so I have to update these files with the given version number. The file "site.xml" of an update site is an example for that. Any ideas how I can modify these files? Regards, C.P. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Edit XML-Files with Ant
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 13, 2007 3:08 PM To: user@ant.apache.org Subject: Edit XML-Files with Ant Hi, /* Any ideas how I can modify these files? */ xml task recommended http://www.oopsconsultancy.com/software/xmltask/ Regards, Gilbert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Edit XML-Files with Ant
Thanks for your hints. I guess with your documentation I will handle it. Regards, C.P. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 13, 2007 3:08 PM To: user@ant.apache.org Subject: Edit XML-Files with Ant Hi, /* Any ideas how I can modify these files? */ xml task recommended http://www.oopsconsultancy.com/software/xmltask/ 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]
Re: Rename directories in Ant
There's a slight problem in that the java.util.regex.Pattern class used by Ant doesn't support what in Perl would be the "g" flag. That Java class is the java.util.regex.Matcher and I don't know how the regexmapper would call this particular class. You might have to run this multiple times until no more moves are done. If you use the antcontrib and set "failonerror" in the move, you could keep looping until the property is set on the catch. That's the only thing I can think of. On 6/13/07, Cesar Martinez Izquierdo <[EMAIL PROTECTED]> wrote: Qazwart wrote: > What version of Ant are you using? You seem to take the hard way: > > If you're using at least version 1.3, you can simply do this: > > todir="/tmp/myDir/test/hello/search_"/> > > If it's earlier than version 1.3: > > > > > > No need to use a mapper or anything: > > BTW, the problem you're running into is that regex is naturally greedy, > so it always takes the biggest chunk it can to make the match. Since you > can easily define the directory using simpler globbing expressions, you > could have use that. Or, you can use the "Reluctant" qualifier which > will only take the very first match it can find: > > This: Instead of: Hi Qazwart, thanks for your reply. The problem is that I don't want to rename ONE directory, but ALL the "search" directories in a directory tree. And the "search" directory may be located inside another "search" directory, so getting the very first match is not enough... I need all of them to be replaced... I guess it needs to be performed using a totally different strategy. Any idea? -- César Martínez Izquierdo Equipo de desarrollo gvSIG http://www.gvsig.gva.es IVER T.I. C/ Salamanca 50 46005 Valencia - Spain http://www.iver.es - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- David Weintraub [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Rename directories in Ant
Hi, sorry, the mapper is wrong = must be = the glob mapper seems to handle only single ' * ' Regards, Gilbert -Original Message- From: Rebhan, Gilbert [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 13, 2007 2:50 PM To: Ant Users List Subject: RE: Rename directories in Ant Hi, -Original Message- From: Cesar Martinez Izquierdo [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 13, 2007 12:57 PM To: Ant Users List Subject: Re: Rename directories in Ant /* Hi Qazwart, thanks for your reply. The problem is that I don't want to rename ONE directory, but ALL the "search" directories in a directory tree. And the "search" directory may be located inside another "search" directory, so getting the very first match is not enough... I need all of them to be replaced... I guess it needs to be performed using a totally different strategy. Any idea? */ maybe something like = use on your own risk ;-) i didn't get it how to put those two copy steps in one step only, but it seems to work anyway !? 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]
Re: flextasks anomalies
Good Morning Varun the only flex-config.xml I have is supplied from CFUSION ..23260 bytes dated 06/12/2007 ..I dont see any other copies Would you know where I can obtain the flex-config.xml which works with flextasks.jar mxlmc task? Thanks! M- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: "Varun Bhambri" <[EMAIL PROTECTED]> To: "Ant Users List" ; "Martin Gainty" <[EMAIL PROTECTED]> Sent: Wednesday, June 13, 2007 1:20 AM Subject: Re: flextasks anomalies Hello Martin, Is there anything that you've changed in the flexconfig.xml? I am also using the same Flex ANT Tasks and the latest Flex ANT Libraries. I haven't changed anything in the flexconfig file. I just copied the flexTasks.jar in my ANT_HOME/lib. So, I dont need to use a classpath to find the mxmlc task. Following is my build file to compile all the mxml files in a directory structure. It works for me. You may skip the ant-contrib part, i.e the for loops. /*** Start my build file / /*** End of mybuild file / All I need to do to run this is just say ant at the command prompt. I hope it helps. Varun Bhambri On 6/13/07, Martin Gainty <[EMAIL PROTECTED]> wrote: Good Evening All Just started to use this package and cant get FLEX_HOME to set or mxlmc to execute properly /attached mySimpleBuild.xml/ /**end mySimpleBuild.xml***/ /**START flex-config.xml*/ http://www.macromedia.com/2003/flex-config";> false true false false false false false true false true false false false false false true false /WEB-INF/cfform/global.css false true http://www.macromedia.com/2003/mxml";> /WEB-INF/cfform/mxml-manifest.xml /WEB-INF/cfform/system_classes /WEB-INF/cfform/frameworks /WEB-INF/cfform/frameworks_debug false true 500 500 1 1 true 7 0 14 true {context.root }/cfform-internal/detection-kit/upgrade_flash/upgrade_flash.html {context.root }/cfform-internal/secure/detection-kit/upgrade_flash/upgrade_flash.html http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab http://www.macromedia.com/go/getflashplayer https://www.macromedia.com/go/getflashplayer client {context.root}/flashproxy {context.root}/flashproxy false false
Re: flextasks anomalies
Hi Martin, it sounds like you need to get hold of the Flex SDK: http://www.adobe.com/products/flex/downloads/ Download this, and set FLEX_HOME to point to this folder and you should be good to go... Cheers PBH On 6/13/07 9:35 AM, "Martin Gainty" <[EMAIL PROTECTED]> wrote: > Good Morning Varun > > the only flex-config.xml I have is supplied from CFUSION ..23260 bytes dated > 06/12/2007 ..I dont see any other copies > Would you know where I can obtain the flex-config.xml which works with > flextasks.jar mxlmc task? > > Thanks! > M- > This email message and any files transmitted with it contain confidential > information intended only for the person(s) to whom this email message is > addressed. If you have received this email message in error, please notify > the sender immediately by telephone or email and destroy the original > message without making a copy. Thank you. > > - Original Message - > From: "Varun Bhambri" <[EMAIL PROTECTED]> > To: "Ant Users List" ; "Martin Gainty" > <[EMAIL PROTECTED]> > Sent: Wednesday, June 13, 2007 1:20 AM > Subject: Re: flextasks anomalies > > >> Hello Martin, >> >> Is there anything that you've changed in the flexconfig.xml? I am also >> using >> the same Flex ANT Tasks and the latest Flex ANT Libraries. I haven't >> changed >> anything in the flexconfig file. I just copied the flexTasks.jar in my >> ANT_HOME/lib. So, I dont need to use a classpath to find the mxmlc task. >> Following is my build file to compile all the mxml files in a directory >> structure. It works for me. You may skip the ant-contrib part, i.e the for >> loops. >> >> /*** Start my build file / >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >>> keep-generated-actionscript="false"> >> > filename="${FLEX_HOME}/frameworks/flex-config.xml"/> >>> path-element="${FLEX_HOME}/frameworks"/> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> /*** End of mybuild file / >> >> All I need to do to run this is just say ant at the command prompt. >> >> I hope it helps. >> >> Varun Bhambri >> >> >> On 6/13/07, Martin Gainty <[EMAIL PROTECTED]> wrote: >>> >>> Good Evening All >>> >>> Just started to use this package and cant get FLEX_HOME to set >>> or mxlmc to execute properly >>> /attached mySimpleBuild.xml/ >>> >>> >>> >>> >> classpath="C:/ANT/flexTasks/lib/flexTasks.jar" /> >>> >> value="C:/CFusion/CFUSIO~1/wwwroot/WEB-INF/cfform"/> >>> >>> >>> >> keep-generated-actionscript="true"> >>> >> filename="${FLEX_HOME}/frameworks/flex-config.xml"/> >>> >>> >>> >>> >>> /**end mySimpleBuild.xml***/ >>> >>> /**START flex-config.xml*/ >>> >>> http://www.macromedia.com/2003/flex-config";> >>> >>> >>> false >>> >>> >>> >>> >>> >>> true >>> >>> >>> >>> false >>> >>> >>> >>> false >>> >>> >>> >>> false >>> >>> >>> false >>> >>> >>> >>> false >>> >>> >>> true >>> >>> >>> false >>> >>> >>> >>> true >>> >>> >>> false >>> >>> >>> false >>> >>> >>> false >>> >>> >>> false >>> >>> >>> >>> >>> false >>> >>> >>> true >>> >>> >>> false >>> >>> >>> >>> >>> >>> >>> >>> /WEB-INF/cfform/global.css >>> >>> >>> >>> false >>> >>> >>> >>> >>> >>> >>> true >>> >>> >>> >>> http://www.macromedia.com/2003/mxml";> >>> /WEB-INF/cfform/mxml-manifest.xml >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> /WEB-INF/cfform/system_classes >>> >>> >>> >>> >>> >>> /WEB-INF/cfform/frameworks >>> >>> >>> >>> >>> >>> >>> /WEB-INF/cfform/frameworks_debug >>> >>> >>> >>> false >>> >>> >>> >>> >>> true >>> >>> 500 >>> >>> 500 >>> >>> 1 >>>
Re: Rename directories in Ant
Rebhan, Gilbert wrote: > > > > Hi, > > sorry, the mapper is wrong = > /> > > must be = > > > the glob mapper seems to handle only single ' * ' > > Regards, Gilbert > > > -Original Message- > From: Rebhan, Gilbert [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 13, 2007 2:50 PM > To: Ant Users List > Subject: RE: Rename directories in Ant > > > Hi, > > > -Original Message- > From: Cesar Martinez Izquierdo [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 13, 2007 12:57 PM > To: Ant Users List > Subject: Re: Rename directories in Ant > > /* > Hi Qazwart, thanks for your reply. > The problem is that I don't want to rename ONE directory, but ALL the > "search" directories in a directory tree. > And the "search" directory may be located inside another "search" > directory, so getting the very first match is not enough... I need all > of them to be replaced... > I guess it needs to be performed using a totally different strategy. Any > idea? > */ > > maybe something like = > > /> > > > > > > > > > > > > > > use on your own risk ;-) > > i didn't get it how to put those two copy steps in one step only, > but it seems to work anyway !? > > > Regards, Gilbert > Sorry, it doesn't seem to work. For the sample directory tree I provided, it just copies /tmp/myDir/test/hello/searchstrings/Hello.html to /tmp/myDir_/test/hello/searchstrings/Hello.html but nothing else gets copied or renamed... (For the record, the sample was: /tmp/myDir/test/hello/search/Hello.html /tmp/myDir/test/hello/search/nice/lists/search/Greetings.html /tmp/myDir/test/hello/searchstrings/Hello.html /tmp/myDir/search/Regards.html which has to be renamed to: /tmp/myDir/test/hello/search_/Hello.html /tmp/myDir/test/hello/search_/nice/lists/search_/Greetings.html /tmp/myDir/test/hello/searchstrings/Hello.html /tmp/myDir/search_/Regards.html ) Probably, something similar can be performed using the glob mapper as you suggested, but it will fail when there is a 'search' directory inside another 'search' directory (as far as I understand...). Regards, -- César Martínez Izquierdo Equipo de desarrollo gvSIG http://www.gvsig.gva.es IVER T.I. C/ Salamanca 50 46005 Valencia - Spain http://www.iver.es - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Malformed error
I am unable to detect why this code is throwing malformed exception. Error shown is > java.lang.IllegalArgumentException: Malformed \u encoding. any clue ? -- View this message in context: http://www.nabble.com/Malformed-error-tf3915115.html#a11100914 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: Malformed error
arijit wrote: > I am unable to detect why this code is throwing malformed exception. > > > > Error shown is > > java.lang.IllegalArgumentException: Malformed \u encoding. > > any clue ? I would say you have an strange hidden character in that line. Try deleting the whole line and writing it again (don't copy and paste). Good luck! -- César Martínez Izquierdo Equipo de desarrollo gvSIG http://www.gvsig.gva.es IVER T.I. C/ Salamanca 50 46005 Valencia - Spain http://www.iver.es - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Malformed error
i was hoping that would be the case.. :( but I wrote the code manually instead of copy-paste but still the same problem Cesar Martinez Izquierdo-3 wrote: > > arijit wrote: >> I am unable to detect why this code is throwing malformed exception. >> >> >> >> Error shown is > >> java.lang.IllegalArgumentException: Malformed \u encoding. >> >> any clue ? > > I would say you have an strange hidden character in that line. > Try deleting the whole line and writing it again (don't copy and paste). > > Good luck! > > -- > César Martínez Izquierdo > Equipo de desarrollo gvSIG > http://www.gvsig.gva.es > > IVER T.I. > C/ Salamanca 50 > 46005 Valencia - Spain > http://www.iver.es > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Malformed-error-tf3915115.html#a11101447 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: Malformed error
arijit wrote: > i was hoping that would be the case.. :( > > but I wrote the code manually instead of copy-paste but still the same > problem > > > Cesar Martinez Izquierdo-3 wrote: >> arijit wrote: >>> I am unable to detect why this code is throwing malformed exception. >>> >>> >>> >>> Error shown is > >>> java.lang.IllegalArgumentException: Malformed \u encoding. >>> >>> any clue ? >> I would say you have an strange hidden character in that line. >> Try deleting the whole line and writing it again (don't copy and paste). >> >> Good luck! Then maybe the problem is in the line where you declare the "property_files_location" variable (just an idea...). Regards, -- César Martínez Izquierdo Equipo de desarrollo gvSIG http://www.gvsig.gva.es IVER T.I. C/ Salamanca 50 46005 Valencia - Spain http://www.iver.es - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Malformed error
Can anyone see any problem with this line ? UDDI4j_WSIGCP=%LIB_WSIGCP%\uddi4j-2.0.5.jar This line is present in the test.properties file. Now when I remove this line, it works. I have written this line manually and not copy-paste arijit wrote: > > i was hoping that would be the case.. :( > > but I wrote the code manually instead of copy-paste but still the same > problem > > > Cesar Martinez Izquierdo-3 wrote: >> >> arijit wrote: >>> I am unable to detect why this code is throwing malformed exception. >>> >>> >>> >>> Error shown is > >>> java.lang.IllegalArgumentException: Malformed \u encoding. >>> >>> any clue ? >> >> I would say you have an strange hidden character in that line. >> Try deleting the whole line and writing it again (don't copy and paste). >> >> Good luck! >> >> -- >> César Martínez Izquierdo >> Equipo de desarrollo gvSIG >> http://www.gvsig.gva.es >> >> IVER T.I. >> C/ Salamanca 50 >> 46005 Valencia - Spain >> http://www.iver.es >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > > -- View this message in context: http://www.nabble.com/Malformed-error-tf3915115.html#a11101915 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: Malformed error
oops... got the problem... \u in the line mentioned below.. replaced it with \\u :) arijit wrote: > > Can anyone see any problem with this line ? > > UDDI4j_WSIGCP=%LIB_WSIGCP%\uddi4j-2.0.5.jar > > This line is present in the test.properties file. Now when I remove this > line, it works. I have written this line manually and not copy-paste > > > > arijit wrote: >> >> i was hoping that would be the case.. :( >> >> but I wrote the code manually instead of copy-paste but still the same >> problem >> >> >> Cesar Martinez Izquierdo-3 wrote: >>> >>> arijit wrote: I am unable to detect why this code is throwing malformed exception. Error shown is > java.lang.IllegalArgumentException: Malformed \u encoding. any clue ? >>> >>> I would say you have an strange hidden character in that line. >>> Try deleting the whole line and writing it again (don't copy and paste). >>> >>> Good luck! >>> >>> -- >>> César Martínez Izquierdo >>> Equipo de desarrollo gvSIG >>> http://www.gvsig.gva.es >>> >>> IVER T.I. >>> C/ Salamanca 50 >>> 46005 Valencia - Spain >>> http://www.iver.es >>> >>> >>> - >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >>> >> >> > > -- View this message in context: http://www.nabble.com/Malformed-error-tf3915115.html#a11102139 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: flextasks anomalies
yes.. works at command line (produces *.swf file) but doesnt as standalone Ant mxlmc task so for now Im going to use the with mxlmc classpath="C:/ANT/APACHE~1.5/lib/flexTasks.jar" /> value="C:/flexTasks/FlexBuilder2/frameworks"/> keep-generated-actionscript="true"> BUILD FAILED C:\flexTasks\VumarBuild.xml:12: Command not found: mxmlc at flex2.ant.FlexTask.execute(FlexTask.java:151) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) at org.apache.tools.ant.Task.perform(Task.java:364) at org.apache.tools.ant.Target.execute(Target.java:341) at org.apache.tools.ant.Target.performTasks(Target.java:369) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) at org.apache.tools.ant.Project.executeTarget(Project.java:1185) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe cutor.java:40) at org.apache.tools.ant.Project.executeTargets(Project.java:1068) at org.apache.tools.ant.Main.runBuild(Main.java:668) at org.apache.tools.ant.Main.startAnt(Main.java:187) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67) Total time: 1 second Thanks Paul! M-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: "Paul Barnes-Hoggett" <[EMAIL PROTECTED]> To: "Ant Users List" Sent: Wednesday, June 13, 2007 9:48 AM Subject: Re: flextasks anomalies Hi Martin, it sounds like you need to get hold of the Flex SDK: http://www.adobe.com/products/flex/downloads/ Download this, and set FLEX_HOME to point to this folder and you should be good to go... Cheers PBH On 6/13/07 9:35 AM, "Martin Gainty" <[EMAIL PROTECTED]> wrote: Good Morning Varun the only flex-config.xml I have is supplied from CFUSION ..23260 bytes dated 06/12/2007 ..I dont see any other copies Would you know where I can obtain the flex-config.xml which works with flextasks.jar mxlmc task? Thanks! M- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: "Varun Bhambri" <[EMAIL PROTECTED]> To: "Ant Users List" ; "Martin Gainty" <[EMAIL PROTECTED]> Sent: Wednesday, June 13, 2007 1:20 AM Subject: Re: flextasks anomalies Hello Martin, Is there anything that you've changed in the flexconfig.xml? I am also using the same Flex ANT Tasks and the latest Flex ANT Libraries. I haven't changed anything in the flexconfig file. I just copied the flexTasks.jar in my ANT_HOME/lib. So, I dont need to use a classpath to find the mxmlc task. Following is my build file to compile all the mxml files in a directory structure. It works for me. You may skip the ant-contrib part, i.e the for loops. /*** Start my build file / Builder 2\Flex SDK 2"/> /*** End of mybuild file / All I need to do to run this is just say ant at the command prompt. I hope it helps. Varun Bhambri On 6/13/07, Martin Gainty <[EMAIL PROTECTED]> wrote: Good Evening All Just started to use this package and cant get FLEX_HOME to set or mxlmc to execute properly /attached mySimpleBuild.xml/ /**end mySimpleBuild.xml***/ /**START flex-config.xml*/ http://www.macromedia.com/2003/flex-config";> false true false false false false false true false true false
RE: Malformed error
I suggest using only forward slashes for paths, to avoid things like this. Also, it looks like you are attempting to use an environment variable on Windows. I suggest you look at the property tasks' environment attribute. I hope this helps. -Rob Anderson > -Original Message- > From: arijit [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 13, 2007 8:32 AM > To: user@ant.apache.org > Subject: Re: Malformed error > > > oops... got the problem... \u in the line mentioned below.. > replaced it with \\u :) > > > arijit wrote: > > > > Can anyone see any problem with this line ? > > > > UDDI4j_WSIGCP=%LIB_WSIGCP%\uddi4j-2.0.5.jar > > > > This line is present in the test.properties file. Now when > I remove > > this line, it works. I have written this line manually and not > > copy-paste > > > > > > > > arijit wrote: > >> > >> i was hoping that would be the case.. :( > >> > >> but I wrote the code manually instead of copy-paste but still the > >> same problem > >> > >> > >> Cesar Martinez Izquierdo-3 wrote: > >>> > >>> arijit wrote: > I am unable to detect why this code is throwing > malformed exception. > > > > Error shown is > > java.lang.IllegalArgumentException: Malformed \u encoding. > > any clue ? > >>> > >>> I would say you have an strange hidden character in that line. > >>> Try deleting the whole line and writing it again (don't > copy and paste). > >>> > >>> Good luck! > >>> > >>> -- > >>> César Martínez Izquierdo > >>> Equipo de desarrollo gvSIG > >>> http://www.gvsig.gva.es > >>> > >>> IVER T.I. > >>> C/ Salamanca 50 > >>> 46005 Valencia - Spain > >>> http://www.iver.es > >>> > >>> > >>> > > >>> - To unsubscribe, e-mail: [EMAIL PROTECTED] For > >>> additional commands, e-mail: [EMAIL PROTECTED] > >>> > >>> > >>> > >> > >> > > > > > > -- > View this message in context: > http://www.nabble.com/Malformed-error-tf3915115.html#a11102139 > 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: AW: how to get a process id from a spawned task?
This snippet doesn't exactly give you the PID, but it gives something that's close enough for what I needed (and may be sufficient for the OP's use case, I'm not sure): import java.lang.management.ManagementFactory; ... ManagementFactory.getRuntimeMXBean().getName(); // gets PID of current process What this gives you is a string something like "[EMAIL PROTECTED]"; we've used it on Windows and on Linux. If all you want is the PID part, it's simple enough to parse it out. As far as killing a process (in Windows), XP's Task Manager can display PIDs as an additional column in the Processes tab... Kajsa Anderson -Original Message- From: Steve Loughran [mailto:[EMAIL PROTECTED] Sent: Monday, June 11, 2007 4:25 AM To: Ant Users List Subject: Re: AW: how to get a process id from a spawned task? arijit wrote: > I was hoping not to use any 3rd party tool but maybe something via ANT > tasks or Java calls. One of the similar threads mentioned about 'jps' > but could not get it working. Keeping it generic so that it can be > used not only for windows will be a good approach. > well, the fact that even in java5 there's nothing in the Java APIs to give you the process ID of a started process is going to make it hard. If someone knew how JPS worked (i.e. there was an official Java interfact to whatever native lib is doing the heavy lifting, life would be simpler - 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 directories in Ant
Cesar Martinez Izquierdo wrote: Sorry, it doesn't seem to work. [...] Probably, something similar can be performed using the glob mapper as you suggested, but it will fail when there is a 'search' directory inside another 'search' directory (as far as I understand...). you're right, /search/search doesn't work. Maybe there's another solution with regexp ? regexp="(\\)?(search)(.[^\.]+)?" replace="\1\2_\3" Finally
RE: ant regex
Hi Gilbert, thank you for the example. It works for me as well. I will use propertyregex in that case Stefan Rebhan, Gilbert wrote: > > > Hi, > > > -Original Message- > From: snenkov [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 13, 2007 12:01 AM > To: user@ant.apache.org > Subject: ant regex > > /* > I want to get back > > "C:\temp\dp\util\;C:\temp\dp\util\stack" > */ > > your regexp works for me with antcontrib , > using the default regexp engine from sun jdk1.4 > > > > > > value="C:\temp\dp\util\bin;C:\temp\dp\util\stack"/> > > > >input="${teststring}" > regexp="(.*)bin(.*)" > replace="\1\2" > casesensitive="false" /> > > > > $${newstring} == ${newstring} > > > > > > [echo] ${newstring} == C:\temp\dp\util\;C:\temp\dp\util\stack > > > when using > replace="\2" > > i get = > [echo] ${newstring} == ;C:\temp\dp\util\stack > > > Regards, Gilbert > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/ant-regex-tf3910621.html#a11109055 Sent from the Ant - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ANT - copy file to network drive
Hi I am trying to copy my war file from local drive[Windows] to network drive[Linux] using my ANT script. My network drive path is \\usr\\local\\java\\jboss-4.2.0-GA I got "the network path was not found" error. Please help on this. -- View this message in context: http://www.nabble.com/ANT---copy-file-to-network-drive-tf3919812.html#a4377 Sent from the Ant - Users mailing list archive at Nabble.com.
using '/' as the separator for the elements
Hi All, We had our product, whose one of command line tool is "mkranch", now if I use this command "mkbranch" it will create a branch for me on our server, its usage is like this Usage: mkbranch [flags] parent brname comment rooted [ownerid [groupid]] for example if I want to create a branch "foo/boo/goo3.1/goo3.1_SP1" and server name is "killme" than the usage will look like this mkbranch killme foo/boo/goo3.1/goo3.1_SP1 "Test branch" lilly but when I try to run this command it gives me error called "Bad name". Now the problem is that if I want to create branch "foo/boo/goo3.1/goo3.1_SP1" than I need to give each element separately like this: mkbranch killme foo "Test branch" lilly mkbranch killme/foo boo "Test branch" lilly mkbranch killme/foo/boo goo3.1 "Test branch" lilly mkbranch killme/foo/boo/goo3.1 goo3.1_SP1 "Test branch" lilly These will create the desired branch for me. So would like to know how can I do it using ANT, so that using '/' as separator and in loop I can create branch in one shot, instead writing 4 or 5 time the same command. Thanks in advance. Wishes, Pritesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to add a file to existing zip archive into a existing folder
Use and tasks. More here : http://ant.apache.org/manual/CoreTypes/zipfileset.html HTH -Prashant On Thu, 2007-06-14 at 11:26 +0530, Ravi Roy wrote: > Hi All, > > > > I have a zip archive, which I want to update with adding a new file to > specific folder in the zip archive. > > > > Example : > > > > I have abc.zip containing the directory structure : > > mainfolder\a.jar > > mainfolder\subfolder\b.jar > > > > > > My problem is I want to add a c.properties to mainfolder\subfolder. But I > did not find any such example in the documentation. > > Though files can be added, but not specified somewhere if somebody wants to > add to a particular directory in zip archive. > > > > The following example adds c.properties to the root of testfile.zip but for > me it is not possible to add this file to a specific folder in the said zip > archive. > > -- > > > > > > > > > > > > update="true"> > > > > > > > > > > > > > > Thanks for any pointers. > > Ravi. > > > > > > > > > > > > > > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]