Re: Problems creating my own ant task
With scriptdef it is now rare that you need to write a task in Java. Have you tried it? Maybe also in conjunction with macrodef. - Alexey. On 11/4/2010 12:53 PM, abridgel wrote: I'm desperate can anybody help? === Notice: This e-mail message, together with any attachments, contains information of Symyx Technologies, Inc. or any of its affiliates or subsidiaries that may be confidential, proprietary, copyrighted, privileged and/or protected work product, and is meant solely for the intended recipient. If you are not the intended recipient, and have received this message in error, please contact the sender immediately, permanently delete the original and any copies of this email and any attachments thereto. - To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org
Re: Problems creating my own ant task
Well, I am still adding custom tasks the old way: taskdef resource=net/sf/antcontrib/antcontrib.properties classpath pathelement location=lib/build/antcontrib/ant-contrib.jar/ /classpath /taskdef - Alexey. On 11/4/2010 1:09 PM, abridgel wrote: We need to write our own tasks because of portability issues. So I need to be able to source in the task somehow I created the jar and put the classes and antlib.xml in the same directory however when I try to pull it in it is complainning with the above error - here is my code (for the task)- its very simple. import java.io.*; import java.util.*; import org.apache.tools.ant.Task; public class Diff extends Task{ public void execute() { System.out.println(Hello); } } === Notice: This e-mail message, together with any attachments, contains information of Symyx Technologies, Inc. or any of its affiliates or subsidiaries that may be confidential, proprietary, copyrighted, privileged and/or protected work product, and is meant solely for the intended recipient. If you are not the intended recipient, and have received this message in error, please contact the sender immediately, permanently delete the original and any copies of this email and any attachments thereto. - To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org
Re: AppendToProperty MacroDef
Why not to use scriptdef instead? With scriptdef you can pragmatically access parameters instead of macro substitution. - Alexey. On 20.01.2010 12:10, Eric Fetzer wrote: Hi all. I wrote a MacroDef to append a string to a property. All works as planned until you slip a \ in there and then it gets jacked up. My javascripting has MUCH to be desired. Any help? macrodef name=md.AppendProperty attribute name=var.propertyName/ attribute name=var.stringAppend/ sequential script language=javascript ![CDATA[ curVal=project.getProperty(@{var.propertyName}); project.setProperty(@{var.propertyName},curVal+@{var.stringAppend}); ]] /script /sequential /macrodef Thanks, Eric smime.p7s Description: S/MIME Cryptographic Signature
Re: Problem with zip task
Oh, ClearCase. Each time we had similar problems we contacted our IT and they did some magic to fix it. I am happy to be [almost] Clear Case free now - there were so many things to go wrong and you cannot blame Rational/IBM for most of them, besides their architecture choices. If you need a quick solution, maybe a sleep before zipping will help. - Alexey. Cole, Derek E wrote: I don't think this will be possible really. The filesystem is actually a clearcase snapshot view on that NAS...it gets a set of default permissions when the view is created/updated. -Original Message- From: Alexey N. Solofnenko [mailto:alexey.solofne...@symyx.com] Sent: Tuesday, July 28, 2009 2:02 PM To: Ant Users List Subject: Re: Problem with zip task I recently investigated a problem with NAS with a similar error - the folder creation silently failed and then file creation failed with no such file error. To fix it you will need to recursively set 777 file permission and correct owner user and group. - Alexey. Cole, Derek E wrote: Has anyone encountered a problem when running a zip task, the log will say something like [zip] Building zip: /path-to/some.war [zip] adding directory Then getting an exception that says Problem creating zip: /path-to/someotherdir/.nfs0001a121a0003ae (No such file or directory) The way the problem is listed..doesnt that seem like a problem with a network storage access? /path-to/ is a mount to a NAS === Notice: This e-mail message, together with any attachments, contains information of Symyx Technologies, Inc. or any of its affiliates or subsidiaries that may be confidential, proprietary, copyrighted, privileged and/or protected work product, and is meant solely for the intended recipient. If you are not the intended recipient, and have received this message in error, please contact the sender immediately, permanently delete the original and any copies of this email and any attachments thereto. - To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org - To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org smime.p7s Description: S/MIME Cryptographic Signature
Re: Waiting for exec task to succeed
There is socket to check for ports, but no while. I would suggest using scriptdef and write it in a code. - Alexey. Krish wrote: Hi I have a requirement wherein I need to make sure the process doesnt exist. So I need to do something like this - `netstat -tln | grep 8080 | cut -f1 -d'. If the return value of the above is tcp, then i know that a process is running . I need to run this command in a loop until the process dies out. Right now, there is no way of knowing how long it takes for the process to die (1 min or 2 min etc)Also i looked at exec task, but there is no way of placing this task in a conditional loop. Or if there is way, I am not sure how to proceed. I also looked at waitFor but I cannot use waitFor and exec together. Let me know how to proceed with this. Thanks K _ *Half of being smart is knowing what you're dumb at *To err is human--and to blame it on a computer is even more so *Gravity is not responsible for people falling in love Did you know? You can CHAT without downloading messenger. Click here http://in.messenger.yahoo.com/webmessengerpromo.php - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Alexey N. Solofnenko http://trelony.cjb.net/ Pleasant Hill, CA (GMT-8 usually) smime.p7s Description: S/MIME Cryptographic Signature
Re: Waiting for exec task to succeed
Please also look for retry task in this mailing list. - Alexey. Alexey N. Solofnenko wrote: There is socket to check for ports, but no while. I would suggest using scriptdef and write it in a code. - Alexey. Krish wrote: Hi I have a requirement wherein I need to make sure the process doesnt exist. So I need to do something like this - `netstat -tln | grep 8080 | cut -f1 -d'. If the return value of the above is tcp, then i know that a process is running . I need to run this command in a loop until the process dies out. Right now, there is no way of knowing how long it takes for the process to die (1 min or 2 min etc)Also i looked at exec task, but there is no way of placing this task in a conditional loop. Or if there is way, I am not sure how to proceed. I also looked at waitFor but I cannot use waitFor and exec together. Let me know how to proceed with this. Thanks K _ *Half of being smart is knowing what you're dumb at *To err is human--and to blame it on a computer is even more so *Gravity is not responsible for people falling in love Did you know? You can CHAT without downloading messenger. Click here http://in.messenger.yahoo.com/webmessengerpromo.php - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Alexey N. Solofnenko http://trelony.cjb.net/ Pleasant Hill, CA (GMT-8 usually) smime.p7s Description: S/MIME Cryptographic Signature
Re: creating clearcase view
Something like that: cleartool mkview -tag build-view \\%COMPUTERNAME%\ccshare$\build-view.vws cleartool mount -all cd z:\build-view\SOME-VOB cleartool setcs c:\path\toconfigspec call ant build-target set RC=%errorlevel% cd %~dp0 cleartool endview build-view cleartool rmview -force build-view exit /b %RC% - Alexey. mmanir wrote: Hi, Can any one please give me some ideas how to create clearcase dynamic view for build and after the build this view will get deleted. This way I will have a clean build. This view is tranparent to the user and only will get created when invoke the ant build script. I was trying to put everything like creating this view, seting config spec, set the view in the ant script. I would really apreciate any suggestions. Thanks -- Alexey N. Solofnenko http://trelony.cjb.net/ Pleasant Hill, CA (GMT-8 usually) smime.p7s Description: S/MIME Cryptographic Signature
Re: creating clearcase view
Last two commands should be cleartool endview -server build-view cleartool rmview -force -tag build-view - Alexey. Alexey N. Solofnenko wrote: Something like that: cleartool mkview -tag build-view \\%COMPUTERNAME%\ccshare$\build-view.vws cleartool mount -all cd z:\build-view\SOME-VOB cleartool setcs c:\path\toconfigspec call ant build-target set RC=%errorlevel% cd %~dp0 cleartool endview build-view cleartool rmview -force build-view exit /b %RC% - Alexey. mmanir wrote: Hi, Can any one please give me some ideas how to create clearcase dynamic view for build and after the build this view will get deleted. This way I will have a clean build. This view is tranparent to the user and only will get created when invoke the ant build script. I was trying to put everything like creating this view, seting config spec, set the view in the ant script. I would really apreciate any suggestions. Thanks -- Alexey N. Solofnenko http://trelony.cjb.net/ Pleasant Hill, CA (GMT-8 usually) smime.p7s Description: S/MIME Cryptographic Signature
Re: ANT task to process properties-files into static class
It seems a trivial task to generate a Java source file from a property with scripdef. - Alexey. Rapthor wrote: Sorry, having confused you. I have a file named global.properties. This file is edited manually by me. The webapplication loads this file into a java.util.Properties-instance at start. Everywhere I use this Properties instance like props.getProperty(myProp) I have to check whether a null is returned or not. This check is at runtime! I wanted to see these at compile time. And that would be possible with a static class with attributes. -- Alexey N. Solofnenko http://trelony.cjb.net/ Pleasant Hill, CA (GMT-8 usually) smime.p7s Description: S/MIME Cryptographic Signature
Re: Odd Behavior
I concur. I had to run my .profile script manually, because it did not seem to run for cron jobs. - Alexey. Res Pons wrote: I think I emailed Scott prematurely yesterday and it appears that both of you may be right. I'm seeing a different java compiler kicking in at night when the cronjob starts. I see gnu's being invoked by the cronjob and sun jdk when I login and my .bash_profile is sourced. Thanks, I'll play around to see if I can fix it. -- Alexey N. Solofnenko http://trelony.cjb.net/ Pleasant Hill, CA (GMT-8 usually) smime.p7s Description: S/MIME Cryptographic Signature
Re: Odd Behavior
Yes, a simple command in front . /home/user/.profile; worked great. - Alexey. Res Pons wrote: Is it working for you now? I got it to work for me. Original Message Follows From: Alexey N. Solofnenko [EMAIL PROTECTED] Reply-To: Ant Users List user@ant.apache.org To: Ant Users List user@ant.apache.org Subject: Re: Odd Behavior Date: Thu, 28 Dec 2006 13:32:04 -0800 I concur. I had to run my .profile script manually, because it did not seem to run for cron jobs. - Alexey. Res Pons wrote: I think I emailed Scott prematurely yesterday and it appears that both of you may be right. I'm seeing a different java compiler kicking in at night when the cronjob starts. I see gnu's being invoked by the cronjob and sun jdk when I login and my .bash_profile is sourced. Thanks, I'll play around to see if I can fix it. -- Alexey N. Solofnenko http://trelony.cjb.net/ Pleasant Hill, CA (GMT-8 usually) smime.p7s _ The MSN Entertainment Guide to Golden Globes is here. Get all the scoop. http://tv.msn.com/tv/globes2007/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Alexey N. Solofnenko http://trelony.cjb.net/ Pleasant Hill, CA (GMT-8 usually) smime.p7s Description: S/MIME Cryptographic Signature
Re: script language must be specified
It looks like it was an unlucky day. Peter fixed it yesterday. - Alexey. Jack J. Woehr wrote: /macros.xml:39: script language must be specified This for a macro that contains script language=javascript ... Does this mean: a) javascript has a new name? b) you need a later version of BSF c) I'm broken in 1.7.0RC1 d) This is YOUR UNLUCKY DAY!!! e) ? ... -- Alexey N. Solofnenko http://trelony.cjb.net/ Pleasant Hill, CA (GMT-8 usually) smime.p7s Description: S/MIME Cryptographic Signature
Re: Checkout more than one File with Clearcase
Why not to use simple exec for it? - Alexey. Waldmann, Jörg GKL wrote: Hi, I try to checkout more than one file with the cccheckout task: target name=checkout cccheckout reserved=true viewpath=${src}/de/gerling/vws/gui/dialoge/*.java /cccheckout /target It doesn't work. It only works, when i use only one file. How can i checkout more than on file? Greetings Jörg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Alexey N. Solofnenko http://trelony.cjb.net/ Pleasant Hill, CA (GMT-8 usually) smime.p7s Description: S/MIME Cryptographic Signature
Re: Ant does not read -D properties same way as Java
Please file a bug. I think the current logic was created to work around problems on some weird platforms (VMS?) and it does not work reasonable on normal systems. - Alexey. Vladimir Egorov wrote: Hi Ant Users, I have the following trivial build.xml. project name=test echo message=param is ${param}/ /project I am trying to pass foo=bar as param value ant -Dparam=foo=bar Unexpectedly, I get: Buildfile: build.xml [echo] param is foo BUILD FAILED Target `bar' does not exist in this project. The same happens if I try to pass param=foo;bar. I tried the same with a trivial java program, and it works as expected. Thank you, Vladimir Egorov Register now for BEA World 2006 --- See http://www.bea.com/beaworld ___ Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it. -- Alexey N. Solofnenko http://trelony.cjb.net/ Pleasant Hill, CA (GMT-8 usually) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to call the export command in LINUX using Ant exec element.
If you really need it, specify it in env inside exec. I myself prefer to set all environment variables before starting ANT - in that case all child processes will get them automatically. - Alexey. Nagender Malik wrote: Hi, How to call the export command in LINUX using Ant exec element. Regards, Nagender -- Alexey N. Solofnenko cid:part1.03070608.04070305@mdl.com Pleasant Hill, CA (GMT-8 usually) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dealing with failed target
You can use try/catch from Ant-Contribs or -keep-going option. The later will still fail the build, but it will execute as much targets as possible. - Alexey. Daniel Winterstein wrote: How can I recover when an ant target fails? I have several ant targets, and I want the top-level target to keep running even if some of the sub-targets fail. Is this possible? Thanks, - Daniel - There are 3 types of mathematician: those who can count, and those who can't. Dr Daniel Winterstein ThinkTank Mathematics Ltd http://thinktankmaths.co.uk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Alexey N. Solofnenko http://trelony.cjb.net/ Pleasant Hill, CA (GMT-8 usually) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jar Locking
For the same reason, I switched to use generated classes in my IDE (JBuilder). JAR files are only generated for full builds. As a side effect, development builds are now much faster. - Alexey. Marc Farrow wrote: Everytime I run an ant task (either in NetBeans or from within Java Code), the executing jar gets locked and I cannot delete the jar. I am copying the ant script and the dependent jar that it needs to run and then executing the ant tasks. Then I wish to delete the new copy I just created to run, but a jar I am using is locked and will not allow me. This in on a Windows 2000 machine. Steps to recreate problem in NetBeans: 1) Create a new Java Application that extends Ant and creates a Jar or even uses an existing one such as ant-contrib.jar. 2) Run an the new ant task from within the build script of another project (via import command). 3) Delete project created in step 1). 4) Go to windows explorer and try to remove rest of sources, etc from the folder that the project in step 1) was created in. Steps to recreate similar problem using Ant Programmatically. (All actions happen within same instance of a java class). 1) Check out favorite project from your favorite source control (programmatically). 2) Programmatically call the Ant script and build the project you just checked out. 3) Once build has completed (and with no errors) try to delete the project you just checked out. Anyone have any suggestions to keep the jars from being locked after execution of the Ant script? Thank you, Marc -- Alexey N. Solofnenko http://trelony.cjb.net/ Pleasant Hill, CA (GMT-8 usually) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ant and C++ compiler
I am using Ant-Contrib extension for C++ support. It works fine. - Alexey. Kirkpatrick, Kevin wrote: Hi all, This might seem like a silly question. All the info I gathered was mostly java based and I didn't see any tasks related to C++. Can another neat tool facilitate compilations in C++? Or is this a job for NANT? Does anyone have any insight? Thank you. Kevin Confidentiality Notice: The information contained in this transmission is legally privileged and confidential, intended only for the use of the individual(s) or entities named above. This email and any files transmitted with it are the property of Pelco. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any review, disclosure, copying, distribution, retention, or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. If you receive this communication in error, please notify us immediately by telephone call to +1-559-292-1981 or forward the e-mail to [EMAIL PROTECTED] and then permanently delete the e-mail and destroy all soft and hard copies of the message and any attachments. Thank you for your cooperation. -- Alexey N. Solofnenko http://trelony.cjb.net/ Pleasant Hill, CA (GMT-8 usually) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unwanted behavior - fixcrlf changes files to un-executable
Usually when a file is overwritten, its permissions are not changed. Executable permission can be lost when the file first deleted, then created again. Carlton, if you have a special file extension or folder, you can run chmod task after newlines are fixed. - Alexey. Dominique Devienne wrote: I'm afraid there's no fix, as Java is not permission-aware. fixcrlf probably creates a new file when it does something, and there's no way in Java to preserve the permissions. You could 'fix' the permissions after the fact, using chmod which simply forks to the command line chmod executable, assuming you know beforehand which files need fixing potentially. JDK 6 or later may add support for permissions, by right now there are no good work-around that I know of. --DD On 8/14/06, Brown, Carlton [EMAIL PROTECTED] wrote: Recently I started observing some very undesirable behavior in my Ant scripts. Specifically, when fixcrlf does its fixing, it also changes the file permissions to be non-executable. Now, I recognize this might be a very Clever Thing because binaries could be corruped by fixcrlf. But with regard to shell scripts, this is undesired behavior. How do I override/work around this? The reason I run fixcrlf on shell scripts is because sometimes boneheads edit them in Windows and then check them. I could run around and tell everybody not to do that, but I choose to make my process self-correcting. Except it doesn't work because Ant is trying to give me help that I don't need.What can I do here? * The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. 162 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Alexey N. Solofnenko http://trelony.cjb.net/ Pleasant Hill, CA (GMT-8 usually) smime.p7s Description: S/MIME Cryptographic Signature
Re: Unwanted behavior - fixcrlf changes files to un-executable
Usually when a file is overwritten, its permissions are not changed. Executable permission can be lost when the file first deleted, then created again. Carlton, if you have a special file extension or folder, you can run chmod task after newlines are fixed. - Alexey. Dominique Devienne wrote: I'm afraid there's no fix, as Java is not permission-aware. fixcrlf probably creates a new file when it does something, and there's no way in Java to preserve the permissions. You could 'fix' the permissions after the fact, using chmod which simply forks to the command line chmod executable, assuming you know beforehand which files need fixing potentially. JDK 6 or later may add support for permissions, by right now there are no good work-around that I know of. --DD On 8/14/06, Brown, Carlton [EMAIL PROTECTED] wrote: Recently I started observing some very undesirable behavior in my Ant scripts. Specifically, when fixcrlf does its fixing, it also changes the file permissions to be non-executable. Now, I recognize this might be a very Clever Thing because binaries could be corruped by fixcrlf. But with regard to shell scripts, this is undesired behavior. How do I override/work around this? The reason I run fixcrlf on shell scripts is because sometimes boneheads edit them in Windows and then check them. I could run around and tell everybody not to do that, but I choose to make my process self-correcting. Except it doesn't work because Ant is trying to give me help that I don't need.What can I do here? * The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. 162 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Alexey N. Solofnenko http://trelony.cjb.net/ Pleasant Hill, CA (GMT-8 usually) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Javac or Ant issue ?
smime.p7s Description: S/MIME Cryptographic Signature
Re: Javac or Ant issue ?
ANT compares timestamps of class files with Java source files and passes the list to JavaC command. So, if C and D files are not specified as source files for compilation and selected by JavaC on its own, ANT would not know about them. The situation can happen, if all selected files compiled fine, but additional files (chosen for compilation by JavaC itself) did not. - Alexey. Chun Ji wrote: I have noticed some very strange behaviour when I try to compile my java code. Say I have some java files to be filed, A,B,C,D,E,F,G... When I was doing a clean compiling, it gives me error that File C, D failed because some errors, which is true. But when I do the compile(not a clean compile) for the second time, it tells me all the files are compiled successfully and no error is given. Can someone tell me why this happen ? I am using ant1.6.2, jdk1.5.0_01 to do the compile on linux box. -cji - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Alexey N. Solofnenko http://trelony.cjb.net/ Pleasant Hill, CA (GMT-8 usually) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Directly extract tar.gz or bz2 package
Yes: http://ant.apache.org/manual/CoreTasks/unpack.html and http://ant.apache.org/manual/CoreTasks/unzip.html . Please note that bzip2 handling is very slow. It is much faster to run bunzip2. - Alexey. Vincent wrote: Hi , I am wondering is it possible to directly get the content of tar.gz or bz2 package? Currently we have to use gunzip and untar to do this. best regards, Vincent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] smime.p7s Description: S/MIME Cryptographic Signature
Re: force execution of a target???
I deal with similar problems by creating an external shell script that first runs normal targets, remembers return code, then runs post targets, and returns the remembered return code. - Alexey. [EMAIL PROTECTED] wrote: I've got a simple ant file that I'm running from CruiseControl. Basically, it has these elements in it: project name=needHelp default=runTests basedir=checkout/projedt property name=shutdown value=true/ target name=startAS exec dir=C:/oc4j/j2ee/home executable=C:/work/cruise/webServerStart.bat os=Windows XP spawn=true/ /target target name=runTests depends=startAS ant antfile=regressionTest_build.xml target=testManager/ /target target name=shutdownAS if=shutdown exec dir=C:/oc4j/j2ee/home executable=C:/j2sdk1.4.2_07/bin/java.exe os=Windows XP failifexecutionfails=false arg line=-jar admin.jar ormi://localhost:23791 un pw -shutdown/ /exec /target /project All of my tests are in regressionTest_build.xml under the testManager target So the issue is this: I need to force the shutdownAS target to run regardless of whether the tests passed or not. What's happening right now is that one of my tests is failing in the runTests target and so ant doesn't proceed any further in the needHelp project despite the presence of the if clause in the shutdownAS target. Note too that in my CruiseControl configuration script I specify that both runTests and shutdownAS targets are to be run by CruiseControl but it seems to be ignoring me. Sure would appreciate knowing how I can make that shutdownAS target execute no matter what. Thanks, Scott smime.p7s Description: S/MIME Cryptographic Signature
Re: trouble passing args to apply
Can you try putting both mappers inline? - Alexey. Rich Goldman wrote: Hello, I'm really stuck here, would be very very grateful for some help. I'm using the ant core task apply successfully to process all the files in a directory, like this: target name=compress-css depends=clean-css echo message=Compressing CSS files / mapper id=css_dir type=glob from=*.css to=${deploy.css}/*.css/ apply executable=${tools.bin}/csstidy-1.2 failonerror=yes dest=${deploy.css} verbose=yes fileset dir=${web.css.home} includes=*.css/ mapper refid=css_dir/ redirector outputmapper refid=css_dir/ /redirector /apply antcall target=rename-css / /target However, I've realized that I now need to pass an argument along to 'csstidy'. So instead of this: bash$ csstidy infile.js outfile.js ...it needs to look like this: bash$ csstidy infile.js --silent=true outfile.js I thought the following would work, but it doesn't: apply executable=${tools.bin}/csstidy-1.2 failonerror=yes dest=${deploy.css} verbose=yes srcfile/ arg value=-silent=true/ targetfile/ fileset dir=${web.css.home} includes=*.css/ mapper refid=css_dir/ redirector outputmapper refid=css_dir/ /redirector /apply My output files are empty when I run this. Does anyone know what I'm doing wrong? Muchas gracias!! rich - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] smime.p7s Description: S/MIME Cryptographic Signature
Re: How to handle RAR in Ant
You need to run unrar with exec (maybe with uptodate condition). ZIP and RAR are different archive formats. - Alexey. Leon Pu wrote: Here are the error messages when I try to extract a RAR file which created by WinRAR. == D:\ant test Buildfile: build.xml test: [untar] Expanding: D:\test.rar into D: [untar] Unable to expand to file D:\Rar! BUILD SUCCESSFUL Total time: 1 second == == D:\ant test Buildfile: build.xml test: [untar] Expanding: D:\test.rar into D:\ [untar] Unable to expand to file D:\Rar! BUILD SUCCESSFUL Total time: 0 seconds == == D:\ant test Buildfile: build.xml test: [unjar] Expanding: D:\test.rar into D:\ BUILD FAILED D:\build.xml:3: Error while expanding D:\test.rar Total time: 0 seconds == == D:\ant test Buildfile: build.xml test: [unzip] Expanding: D:\test.rar into D:\ BUILD FAILED D:\build.xml:3: Error while expanding D:\test.rar Total time: 0 seconds == == D:\ant test Buildfile: build.xml test: [unwar] Expanding: D:\test.rar into D:\ BUILD FAILED D:\build.xml:3: Error while expanding D:\test.rar Total time: 0 seconds == Best regards, Leon --- Keith Hatton [EMAIL PROTECTED] wrote: RAR as in J2EE Resource ARchive file? Just use jar with fileset and zipfileset, and unjar. Hope this helps Keith -Original Message- From: Leon Pu [mailto:[EMAIL PROTECTED] Sent: 27 June 2006 04:42 To: Ant Users List Subject: How to handle RAR in Ant Hi all, how to create and extract RAR file in Ant build script? Thanks. Best regards, Leon __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.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] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] smime.p7s Description: S/MIME Cryptographic Signature
Re: NEWBIE: Dir-attribute/script problem
I got that problem too, but my solution maybe too low level. In Jython import folders are hard coded and read only, so I wrote my own launcher that understood -M option and a special Java property and put them into PySystemState.path list (for example, state.path.append(new PyString(path));). I needed extra path directories to be specified on command line. I [currently] have no idea whether it is possible to access the state from the script itself. - Alexey. Sol Kindle wrote: Hey now, This is my first Ant project (so please bear with me). My goal here is to have a single Ant file to build all of my sub-projects. I am having some trouble getting a third party Ant project (call it foo) to run as a subproject to my top-level build project. The Foo build runs just fine when Ant is run directly on it (in it's sub-dir), but fails to run a jython script when called from my top-level build file. Here's the failure output... Buildfile: build.xml foo: bar: [script] Traceback (innermost last): [script] File string, line 9, in ? [script] ImportError: no module named buildUtil BUILD FAILED It fails because the script in the bar target cannot find cannot find the buildUtil.py file. But the buildUtil.py file is located in the same directory as the Foo build.xml file (see Directory Layout below) I had thought that dir attribute of the ant task would change the current directory context for scripts as well as the build.txt file. It seems to me as if the dir attribute of the ant task in my top-level build file does not change the working dir for the jyhon script. Does this make sense? Any suggestions? Thank you in advance. -Sol My build.xml target to build 3rd party project === target name=foo description=builds the foo project ant dir=./foo/buildscripts target=bar/ant /target Directory Layout === ./build.xml #my top-level build file ./foo/buildscripts/build.xml #3rd party build file ./foo/buildscripts/buildUtil.py #jython script ./foo/buildscripts/lib/pyLib.zip#jython library 3rd Party Target (from ./foo/buildscripts/build.xml) === target name=bar description=Does something script language=jython![CDATA[ import sys # make the python standard library avialable sys.path.append(lib/pyLib.zip) sys.path.append(.) # import re import os from buildUtil import * 3rdPartyFunction() ]]/script /target - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] smime.p7s Description: S/MIME Cryptographic Signature
Re: Ant tasks to encrypt or decrypt passwords from property files
This can be done by requiring a key store in user home. Only people that have some special certificates, can encrypt/decrypt date (SSH style security). The decryption can be easily done with scriptdef. This is a corresponding Java code: SecretKeySpec skeySpec=new SecretKeySpec(readAll(key), AES); Cipher cipher=Cipher.getInstance(AES); cipher.init(Cipher.DECRYPT_MODE, skeySpec); String value=new String(cipher.doFinal(buffer), UTF-8) It would be trivial to write a wrapper code for ANT. buffer has to be a byte array. I would suggest using binhex conversion. - Alexey. Dominique Devienne wrote: we would be interested in encrypting. But then it's a chicken-and-egg problem, no? Where are you going to store the passwords to decrypt the passwords read from properties files? --DD - 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: cvs add
I do not know why people are so fond of cvsCo tasks. They are [usually] just wrappers over native command executors. In most cases a simple exec should be sufficient. I think your case qualifies as one. Do not forget to set correct execution directory. For example: exec executable=cvs directory=branches failonerror=true arg value=add/ arg value=${version.name}/ /exec - Alexey. Asensio, Rodrigo wrote: Nobody works with ant cvs ? I just want to add a fresh project to cvs. Tks -Original Message- From: Asensio, Rodrigo [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 9:34 AM To: Ant Users List Subject: RE: cvs add Ok. Now I tried cvs dest=${branch.path} command=import -m 'Initial Commit' branches/${version.name} myuser start/ It start adding creating a branch ( I don't want that.. But..) And blowup [cvs] cvs import: Importing /usr/repository/branches/R20060613-MCS/webapp/MCS/update/images [cvs] cvs: import.c:595: process_import_file: Assertion `entdata-options[0] == '-' entdata-options[1] == 'k'' failed. [cvs] cvs [import aborted]: received abort signal Images folder has binary files , and seems that do not recognize them and throws this error. Thanks for help -Original Message- From: Asensio, Rodrigo [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 8:22 AM To: Ant Users List Subject: RE: cvs add Rob, my linux has this sctructure /usr/repository/branches/R1 /R2 /Rx Branches alredy exists If I try to add branches cvs command=add branches/ cvs [add aborted]: there is a version in branches already And if I try to add my subdirectory cvs command=add branches/R4/ [cvs] cvs add: nothing known about branches/R4 If I try cvs package=branches command=add R4/ or cvs package=branches command=add branches/R4/ [cvs] cvs [add aborted]: there is a version in branches already Im trying to follow what eclipse does. First thing that he do is add folders, as Im doing.. Other alternative that I have is create a branch is import, but it create a CVS branch and I don't want that. Any clue ? thanks -Original Message- From: Anderson, Rob (Global Trade) [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 13, 2006 5:23 PM To: Ant Users List Subject: RE: cvs add It looks like you need to run cvs add branches first. -Rob A -Original Message- From: Asensio, Rodrigo [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 13, 2006 11:56 AM To: user@ant.apache.org Subject: cvs add Ant 1.6, eclipse, wXP Hi guys, here is my task cvs command=add /usr/repository/branches/${version.name}/ cvs [add aborted]: Absolute pathname not allowed Or cvs command=add branches/${version.name}/ cvs [add aborted]: directory branches not found I want to create a folder in the cvs, any clue ??? Thanks! --- Rodrigo Asensio Fuel Management Services Gilbarco Veeder Root phone: +1 336 547 5023 email: [EMAIL PROTECTED] This message (including any attachments) contains confidential and/or proprietary information intended only for the addressee. Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law. If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete the message from your system. If you have any questions about this e-mail please notify the sender immediately. - 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] This message (including any attachments) contains confidential and/or proprietary information intended only for the addressee. Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law. If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete the message from your system. If you have any questions about this e-mail please notify the sender immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message (including any attachments) contains confidential and/or proprietary information intended only for the addressee. Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law. If you are
Re: cvs add
You can put CVSROOT as -d option instead of using environment variable. - Alexey. Asensio, Rodrigo wrote: Here is the code to import into a custom module into cvs with a ANT task. Thanks You have to have CVSROOT into your env variables before this. target name=commit exec executable=cvs dir=${branch.path} failonerror=true arg line=import -m 'initial add' branches/R20060613-MCS rasensio start/ !-- cvs import -m initial add branches/R20060613 rasensio start cvs co -d R20060613-MCS -P -A branches/R20060613 // if you want checkout into the same local because import does not do checkout -- /exec /target -Original Message- From: Asensio, Rodrigo [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 12:05 PM To: Ant Users List Subject: RE: cvs add Thanks guys. Very useful I will post here my complete code when I finish. -Original Message- From: Dominique Devienne [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 12:02 PM To: Ant Users List Subject: Re: cvs add On 6/14/06, Alexey N. Solofnenko [EMAIL PROTECTED] wrote: I do not know why people are so fond of cvsCo tasks. They are [usually] just wrappers over native command executors. In most cases a simple exec should be sufficient. Yep, I agree with Alexey. I was doing an exec failonerror=true for my cvs update. --DD - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message (including any attachments) contains confidential and/or proprietary information intended only for the addressee. Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law. If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete the message from your system. If you have any questions about this e-mail please notify the sender immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message (including any attachments) contains confidential and/or proprietary information intended only for the addressee. Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law. If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete the message from your system. If you have any questions about this e-mail please notify the sender immediately. - 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: Cannot delete directories using wildcards
It should be: delete failonerror=false includeEmptyDirs=true fileset dir=${basedir} includes=test*// /delete - Alexey. [EMAIL PROTECTED] wrote: I'm probably missing something obvious, but I've been unable to figure out how to delete directories using a wildcard. So instead of this (test1/2/3 are directories): delete failonerror=false includeEmptyDirs=true fileset dir=${basedir}/test1/ fileset dir=${basedir}/test2/ fileset dir=${basedir}/test3/ /delete I want to do this (which currently does nothing by design): delete failonerror=false includeEmptyDirs=true fileset dir=${basedir}/test*/ /delete So how can I implement something like the above? -Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Failed to execute task move in Windows
I think there was a bug with move that just changes character case on a case-insensitive file systems. move thought that the destination file already exists, so it deleted it, but instead the original file was deleted. I think it was fixed in 1.7. - Alexey. Leon Pu wrote: Hi all, my build file with task move failed in Windows, but the same build file works in Linux. Could anybody tell me why? [build-script] project default=test target name=test move file=bi.jar tofile=Bi.jar / /target /project [build-script] [error-message] Apache Ant version 1.6.5 compiled on June 2 2005 Buildfile: build.xml Detected Java version: 1.4 in: C:\java\jdk\j2sdk1.4.2_09\jre Detected OS: Windows 2000 parsing buildfile C:\Documents and Settings\Administrator\Desktop\build.xml with URI = file:///C:/Documents%20and%20Settings/Administrator/Desktop/build.xml Project base dir set to: C:\Documents and Settings\Administrator\Desktop Build sequence for target(s) `test' is [test] Complete build sequence is [test, ] test: [move] Moving 1 file to C:\Documents and Settings\Administrator\Desktop [move] Attempting to rename: C:\Documents and Settings\Administrator\Deskto p\bi.jar to C:\Documents and Settings\Administrator\Desktop\Bi.jar [move] Copying C:\Documents and Settings\Administrator\Desktop\bi.jar to C: \Documents and Settings\Administrator\Desktop\Bi.jar BUILD FAILED C:\Documents and Settings\Administrator\Desktop\build.xml:3: Failed to copy C:\D ocuments and Settings\Administrator\Desktop\bi.jar to C:\Documents and Settings\ Administrator\Desktop\Bi.jar due to C:\Documents and Settings\Administrator\Desk top\bi.jar (The system cannot find the file specified) at org.apache.tools.ant.taskdefs.Move.copyFile(Move.java:274) at org.apache.tools.ant.taskdefs.Move.moveFile(Move.java:226) at org.apache.tools.ant.taskdefs.Move.doFileOperations(Move.java:153) at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:430) 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) Caused by: java.io.FileNotFoundException: C:\Documents and Settings\Administrato r\Desktop\bi.jar (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.init(FileInputStream.java:106) at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:630) at org.apache.tools.ant.taskdefs.Move.copyFile(Move.java:262) ... 15 more --- Nested Exception --- java.io.FileNotFoundException: C:\Documents and Settings\Administrator\Desktop\b i.jar (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.init(FileInputStream.java:106) at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:630) at org.apache.tools.ant.taskdefs.Move.copyFile(Move.java:262) at org.apache.tools.ant.taskdefs.Move.moveFile(Move.java:226) at org.apache.tools.ant.taskdefs.Move.doFileOperations(Move.java:153) at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:430) 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 [error-message] Best regards, Leon __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Failed to execute task move in Windows
No, it is not. - Alexey. Rhino wrote: Do we know _for sure_ that this bug is fixed in 1.7? -- Rhino - Original Message - From: Scot P. Floess [EMAIL PROTECTED] To: Ant Users List user@ant.apache.org Sent: Wednesday, May 10, 2006 3:16 PM Subject: Re: Failed to execute task move in Windows When is 1.7 coming out? Anthony Goubard wrote: Hi, Yes, I filled a bug about it 6 months ago. And then a few weeks later I fixed the bug. I've submitted the patch with the bug but the patch is not applied yet to the source code. http://issues.apache.org/bugzilla/show_bug.cgi?id=37701 Hope this help for the patch to be in 1.7. Anthony Alexey N. Solofnenko wrote: I think there was a bug with move that just changes character case on a case-insensitive file systems. move thought that the destination file already exists, so it deleted it, but instead the original file was deleted. I think it was fixed in 1.7. - Alexey. Leon Pu wrote: Hi all, my build file with task move failed in Windows, but the same build file works in Linux. Could anybody tell me why? [build-script] project default=test target name=test move file=bi.jar tofile=Bi.jar / /target /project [build-script] [error-message] Apache Ant version 1.6.5 compiled on June 2 2005 Buildfile: build.xml Detected Java version: 1.4 in: C:\java\jdk\j2sdk1.4.2_09\jre Detected OS: Windows 2000 parsing buildfile C:\Documents and Settings\Administrator\Desktop\build.xml with URI = file:///C:/Documents%20and%20Settings/Administrator/Desktop/build.xml Project base dir set to: C:\Documents and Settings\Administrator\Desktop Build sequence for target(s) `test' is [test] Complete build sequence is [test, ] test: [move] Moving 1 file to C:\Documents and Settings\Administrator\Desktop [move] Attempting to rename: C:\Documents and Settings\Administrator\Deskto p\bi.jar to C:\Documents and Settings\Administrator\Desktop\Bi.jar [move] Copying C:\Documents and Settings\Administrator\Desktop\bi.jar to C: \Documents and Settings\Administrator\Desktop\Bi.jar BUILD FAILED C:\Documents and Settings\Administrator\Desktop\build.xml:3: Failed to copy C:\D ocuments and Settings\Administrator\Desktop\bi.jar to C:\Documents and Settings\ Administrator\Desktop\Bi.jar due to C:\Documents and Settings\Administrator\Desk top\bi.jar (The system cannot find the file specified) at org.apache.tools.ant.taskdefs.Move.copyFile(Move.java:274) at org.apache.tools.ant.taskdefs.Move.moveFile(Move.java:226) at org.apache.tools.ant.taskdefs.Move.doFileOperations(Move.java:153) at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:430) 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) Caused by: java.io.FileNotFoundException: C:\Documents and Settings\Administrato r\Desktop\bi.jar (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.init(FileInputStream.java:106) at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:630) at org.apache.tools.ant.taskdefs.Move.copyFile(Move.java:262) ... 15 more --- Nested Exception --- java.io.FileNotFoundException: C:\Documents and Settings\Administrator\Desktop\b i.jar (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.init(FileInputStream.java:106) at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:630) at org.apache.tools.ant.taskdefs.Move.copyFile(Move.java:262) at org.apache.tools.ant.taskdefs.Move.moveFile(Move.java:226) at org.apache.tools.ant.taskdefs.Move.doFileOperations(Move.java:153) at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:430) 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
Re: Failed to execute task move in Windows
Yes, I noticed that too... - Alexey. Matt Benson wrote: duh... make that I'm about to commit it as soon as minotaur comes back up. -Matt --- Matt Benson [EMAIL PROTECTED] wrote: I'm about to commit it. File.equals() should be fine in this case. -Matt --- Alexey N. Solofnenko [EMAIL PROTECTED] wrote: No, it is not. - Alexey. Rhino wrote: Do we know _for sure_ that this bug is fixed in 1.7? -- Rhino - Original Message - From: Scot P. Floess [EMAIL PROTECTED] To: Ant Users List user@ant.apache.org Sent: Wednesday, May 10, 2006 3:16 PM Subject: Re: Failed to execute task move in Windows When is 1.7 coming out? Anthony Goubard wrote: Hi, Yes, I filled a bug about it 6 months ago. And then a few weeks later I fixed the bug. I've submitted the patch with the bug but the patch is not applied yet to the source code. http://issues.apache.org/bugzilla/show_bug.cgi?id=37701 Hope this help for the patch to be in 1.7. Anthony Alexey N. Solofnenko wrote: I think there was a bug with move that just changes character case on a case-insensitive file systems. move thought that the destination file already exists, so it deleted it, but instead the original file was deleted. I think it was fixed in 1.7. - Alexey. Leon Pu wrote: Hi all, my build file with task move failed in Windows, but the same build file works in Linux. Could anybody tell me why? [build-script] project default=test target name=test move file=bi.jar tofile=Bi.jar / /target /project [build-script] [error-message] Apache Ant version 1.6.5 compiled on June 2 2005 Buildfile: build.xml Detected Java version: 1.4 in: C:\java\jdk\j2sdk1.4.2_09\jre Detected OS: Windows 2000 parsing buildfile C:\Documents and Settings\Administrator\Desktop\build.xml with URI = file:///C:/Documents%20and%20Settings/Administrator/Desktop/build.xml Project base dir set to: C:\Documents and Settings\Administrator\Desktop Build sequence for target(s) `test' is [test] Complete build sequence is [test, ] test: [move] Moving 1 file to C:\Documents and Settings\Administrator\Desktop [move] Attempting to rename: C:\Documents and Settings\Administrator\Deskto p\bi.jar to C:\Documents and Settings\Administrator\Desktop\Bi.jar [move] Copying C:\Documents and Settings\Administrator\Desktop\bi.jar to C: \Documents and Settings\Administrator\Desktop\Bi.jar BUILD FAILED C:\Documents and Settings\Administrator\Desktop\build.xml:3: Failed to copy C:\D ocuments and Settings\Administrator\Desktop\bi.jar to C:\Documents and Settings\ Administrator\Desktop\Bi.jar due to C:\Documents and Settings\Administrator\Desk top\bi.jar (The system cannot find the file specified) at org.apache.tools.ant.taskdefs.Move.copyFile(Move.java:274) at org.apache.tools.ant.taskdefs.Move.moveFile(Move.java:226) at org.apache.tools.ant.taskdefs.Move.doFileOperations(Move.java:153) at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:430) 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) Caused by: java.io.FileNotFoundException: C:\Documents and Settings\Administrato r\Desktop\bi.jar (The system
Re: Failed to execute task move in Windows
You can do it now [after Apache servers are working again]: svn co http://svn.apache.org/repos/asf/ant/core/trunk ant But you will have to build it yourself. There is fetch.xml build file to load external dependencies (set JAVA_HOME and launch build -f fetch.xml) or load necessary dependencies yourself and put the jars into lib/optional folder. To build, execute build dist. - Alexey. Rhino wrote: How soon are we likely to be able to download 1.7? I'm not asking because of the renaming bug in the move task; I'm just curious about when we'll see 1.7. -- Rhino - Original Message - From: Matt Benson [EMAIL PROTECTED] To: Ant Users List user@ant.apache.org Sent: Wednesday, May 10, 2006 3:50 PM Subject: Re: Failed to execute task move in Windows duh... make that I'm about to commit it as soon as minotaur comes back up. -Matt --- Matt Benson [EMAIL PROTECTED] wrote: I'm about to commit it. File.equals() should be fine in this case. -Matt --- Alexey N. Solofnenko [EMAIL PROTECTED] wrote: No, it is not. - Alexey. Rhino wrote: Do we know _for sure_ that this bug is fixed in 1.7? -- Rhino - Original Message - From: Scot P. Floess [EMAIL PROTECTED] To: Ant Users List user@ant.apache.org Sent: Wednesday, May 10, 2006 3:16 PM Subject: Re: Failed to execute task move in Windows When is 1.7 coming out? Anthony Goubard wrote: Hi, Yes, I filled a bug about it 6 months ago. And then a few weeks later I fixed the bug. I've submitted the patch with the bug but the patch is not applied yet to the source code. http://issues.apache.org/bugzilla/show_bug.cgi?id=37701 Hope this help for the patch to be in 1.7. Anthony Alexey N. Solofnenko wrote: I think there was a bug with move that just changes character case on a case-insensitive file systems. move thought that the destination file already exists, so it deleted it, but instead the original file was deleted. I think it was fixed in 1.7. - Alexey. Leon Pu wrote: Hi all, my build file with task move failed in Windows, but the same build file works in Linux. Could anybody tell me why? [build-script] project default=test target name=test move file=bi.jar tofile=Bi.jar / /target /project [build-script] [error-message] Apache Ant version 1.6.5 compiled on June 2 2005 Buildfile: build.xml Detected Java version: 1.4 in: C:\java\jdk\j2sdk1.4.2_09\jre Detected OS: Windows 2000 parsing buildfile C:\Documents and Settings\Administrator\Desktop\build.xml with URI = file:///C:/Documents%20and%20Settings/Administrator/Desktop/build.xml Project base dir set to: C:\Documents and Settings\Administrator\Desktop Build sequence for target(s) `test' is [test] Complete build sequence is [test, ] test: [move] Moving 1 file to C:\Documents and Settings\Administrator\Desktop [move] Attempting to rename: C:\Documents and Settings\Administrator\Deskto p\bi.jar to C:\Documents and Settings\Administrator\Desktop\Bi.jar [move] Copying C:\Documents and Settings\Administrator\Desktop\bi.jar to C: \Documents and Settings\Administrator\Desktop\Bi.jar BUILD FAILED C:\Documents and Settings\Administrator\Desktop\build.xml:3: Failed to copy C:\D ocuments and Settings\Administrator\Desktop\bi.jar to C:\Documents and Settings\ Administrator\Desktop\Bi.jar due to C:\Documents and Settings\Administrator\Desk top\bi.jar (The system cannot find the file specified) at org.apache.tools.ant.taskdefs.Move.copyFile(Move.java:274) at org.apache.tools.ant.taskdefs.Move.moveFile(Move.java:226) at org.apache.tools.ant.taskdefs.Move.doFileOperations(Move.java:153) at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:430) 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) Caused by: java.io.FileNotFoundException: C:\Documents and Settings\Administrato r\Desktop\bi.jar (The system cannot find the file specified
Re: Unix commads behaving different in Ant task
There are many ways to do that. I like this: ?xml version=1.0 encoding=UTF-8? project name=Test default=all basedir=. scriptdef name=file-list language=jython element name=fileset type=fileset/ attribute name=name/ ![CDATA[ #file-list property=str(attributes.get(name)) fs=elements.get(fileset).get(0) items=[] iter=fs.iterator() while iter.hasNext(): items.append(iter.next().name) project.setProperty(property, \n.join(items)) ]] /scriptdef target name=all file-list name=fs fileset dir=. includes=**/*.jar/ /file-list echoFile list:${fs}/echo /target /project - Alexey. Venkat Kotu wrote: Hi, I have a situation where in I need to find all the .jar files in a directory and write it to a temp file. The command from the prompt is : find myDir/*.jar and it lists all the .jar files from myDir directory. The ant target defined for the purpose is: target name=list.jars exec os=unix executable=find outputproperty=temp.txt arg line=$basedir}/myDir/*.jar/ /exec /target This does not return any thing. What I am doing wrong? Thanks Venkat Kotu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unix commads behaving different in Ant task
At least on Cygwin, Bash does not expand asterisk, if there are no matching files. I thought this is a new standard behaviour. - Alexey. Scot P. Floess wrote: No, bash is the same way... You have to really do a find dir \*.jar I was sorta wrong in what I was saying...find in this case is doing the expansion (in the case where one escapes the asterisk)... Dominique Devienne wrote: $ rm *.txt # be carefull to run this in some temp dir $ mkdir newdir $ touch newdir/something.txt newdir/anotherthing.txt newdir/yetanother.txt $ find ./ -name *.txt ./newdir/something.txt ./newdir/anotherthing.txt ./newdir/yetanother.txt It works as expected because the shell does not expand the asterisk. This is not true for me, at least on Solaris with tcsh (and I suspect traditional shells behave the same). The shell always expands the asterisk, and reports an error (find: no match) when the asterisk doesn't match any file in the current dir. The same with ls, etc... --DD - 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: Problem with ant 1.6
Alpha? 1.6 was released and there is now 1.6.5. Please do not forget to make a clean install and unset CLASSPATH environment variable. - Alexey. Susheel Raina wrote: Hi, We are using ant 1.6 alpha for building and deploying our Web application. We are facing a problem with this version. While trying to compile our webervices using jwsdp-1_0_01/bin/xrpcc.sh, it is unable to compile from the build file. However If I run the same command from shell, it works fine. On changing to ant 1.5 it start working fine. Just wanna know If there is something I am missing??? Waiting for your response Thanks, Susheel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: sshexec hangs after remote script exits
Try first with a simple command (like ls). Check if your command requests for input or output. Does your command spawns background processes (for example, starting a web server)? If so, does it redirect stdin, -out, -err streams (for example, nohup does not always do that)? Can you try to execute the same command directly with ssh? - Alexey. Brown, Carlton wrote: I've got an sshexec command that calls a remote script. The remote script can take something like 5-15 minutes to run. Trouble is, the sshexec never detects that the script exists. What have I done wrong? Carlton Brown http://web.snt.bst.bls.com/db/emp/bwwhbhp BellSouth Science Technology [EMAIL PROTECTED] 404-986-0894 * The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. 118 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RMIC Unable to Verify Classes
This is what I do, and it works fine with ANT nightly (but 1.6.5 should be fine too): rmic classpath=${javac-classpath} debug=true includes=${rmic-sources} base=${classes-output} stubversion=1.2 / ${rmic-sources} - a list of all .class files that need stubs. - Alexey. Aaron Davies wrote: I'm not having any luck. I recall from the message referenced below that at the time, the verify stage read CLASSPATH, not the classpath attribute of the rmic task. Is that still true? On 4/27/06, Alexey N. Solofnenko [EMAIL PROTECTED] wrote: rmic's classpath should be the whole classpath from javac and javac output directory. - Alexey. Aaron Davies wrote: Hi, I'm having trouble getting the rmic messages about Unable to verify class It is not defined. to go away. My problem is almost exactly like the one described in http://marc.theaimsgroup.com/?l=ant-userm=97069041417063w=2, except that adding . to CLASSPATH (the shell path defined when I call ant) doesn't help. I'm running ant under Win2k and have tried this from both CMD and ZSH under cygwin. Any ideas? -- Aaron Davies [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] -- Aaron Davies [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: RMIC Unable to Verify Classes
Hmm... How did they build it before? Maybe there is a list somewhere in IDE project files. - Alexey. Aaron Davies wrote: Well sure, if you know ahead of time what needs stubs it's going to work! :-) I'm trying to fix the build file for a large team project where I have no idea what's implementing Remote and what isn't. Isn't this what the verify attribute is *for*? On 5/2/06, Alexey N. Solofnenko [EMAIL PROTECTED] wrote: This is what I do, and it works fine with ANT nightly (but 1.6.5 should be fine too): rmic classpath=${javac-classpath} debug=true includes=${rmic-sources} base=${classes-output} stubversion=1.2 / ${rmic-sources} - a list of all .class files that need stubs. - Alexey. Aaron Davies wrote: I'm not having any luck. I recall from the message referenced below that at the time, the verify stage read CLASSPATH, not the classpath attribute of the rmic task. Is that still true? On 4/27/06, Alexey N. Solofnenko [EMAIL PROTECTED] wrote: rmic's classpath should be the whole classpath from javac and javac output directory. - Alexey. Aaron Davies wrote: Hi, I'm having trouble getting the rmic messages about Unable to verify class It is not defined. to go away. My problem is almost exactly like the one described in http://marc.theaimsgroup.com/?l=ant-userm=97069041417063w=2, except that adding . to CLASSPATH (the shell path defined when I call ant) doesn't help. I'm running ant under Win2k and have tried this from both CMD and ZSH under cygwin. Any ideas? -- Aaron Davies [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] -- Aaron Davies [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] -- Aaron Davies [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: Compiling error
So this is a precompiled binary executable (see ELF)... That explains a lot. Can you download and run normal ANT from Apache (do not forget to set correct ANT_HOME)? - Alexey. Sanae Benchaaboun wrote: Are you sure you want me to edit the ant?? It's not readble!! Look what I got: [EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@°86[EMAIL PROTECTED]@[EMAIL PROTECTED] [EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@4^@ [EMAIL PROTECTED]@([EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]80^D^H480^D^Hà [EMAIL PROTECTED]@[EMAIL PROTECTED] [EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@^T81^D^H^T1[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@80^D^H^@80[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]98^D^Hd98[EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]98^D^Hx98[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@^@([EMAIL PROTECTED]@(81^^H(81^D^H [EMAIL PROTECTED]@^@ [EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@^@/lib/[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@^@ [EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@ [EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]98[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED],[EMAIL PROTECTED]@[EMAIL PROTECTED]86[EMAIL PROTECTED]@[EMAIL PROTECTED]@^R^@ [EMAIL PROTECTED]@^@8086[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@^X9a[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]9a[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@ 9a[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@^@9086[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@d98[EMAIL PROTECTED]@[EMAIL PROTECTED]@ [EMAIL PROTECTED]@[EMAIL PROTECTED]@^@(88[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@^X9a[EMAIL PROTECTED]@^@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@ü99[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]|[EMAIL PROTECTED]@¤9a[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]88[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]98[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED] 86[EMAIL PROTECTED]@^@[EMAIL PROTECTED]@^@88[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@^@ [EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@/lib/[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL
Re: Problems with exec
* is understood only by shell. I guess you would want to add -u option (and maybe -p) in addition to -R. Also it maybe better to run rsync (or unison) - they can delete obsolete files. - Alexey. Tommy Nordgren wrote: On 1 maj 2006, at 20.22, Eric Wood wrote: As the on-line documentation suggests, I am using exec to copy some files on UNIX to preserve permissions, but exec is taking my wildcard as translating it as a literial. I'm attemping to copy all files in a subdirectory to another directory using: cp -R * destinationDir But the exec command seems to be quoting my * (wildcard) and returning the following error: [exec] cp: *: A file or directory in the path name does not exist. [exec] Result: 1 Here is my exec command: exec executable=/usr/bin/cp arg line=-R * ${dir.deploy.tgt}/ /exec How can I get around this? Eric By execing a shell, (shell dependent) , passing a string to be evaluated by the shell. With bash, the syntax is: exec executable=/bin/bash arg value=-c/ arg value=/usr/bin/cp * ${dir.deploy.tgt}/ /exec -- Home is not where you are born, but where your heart finds peace - Tommy Nordgren, The dying old crone [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: Scope of scripts - workaround
Can you use scriptdef instead? See: http://ant.apache.org/manual/OptionalTasks/scriptdef.html . - Alexey. Marcel Ruff wrote: After fiddling further i have found this workaround: - target name=pre script language=javascript var expr = 'function doPrecond() { project.log(HELLO PRECOND); }' project.setProperty(expr, expr); /script /target target name=t depends=pre script language=javascript eval(+project.getProperty(expr)); doPrecond(); /script /target - 1) Setting a property expr to transport the script 2) Executing the script in the calling task t Note that without the + at the beginning of eval() it does not work I hope this helps others, like this it is possible to collect precondition code at a single place. But still I'm wondering about the scope of scripts ... thanks Marcel http://www.xmlBlaster.org Marcel Ruff wrote: Hi, i have defined a javascript function in a pre task, but when i want to call it later i get: ReferenceError: doPrecond is not defined Here is the xml, i call it with 'ant y': - target name=pre script language=javascriptfunction doPrecond() { project.log(HELLO PRECOND); }/script /target target name=y depends=pre script language=javascriptdoPrecond();/script /target - Any ideas? Thanks Marcel http://www.xmlBlaster.org Note: This works fine: target name=z script language=javascript function doPrecond() { project.log(HELLO PRECOND); } doPrecond(); /script /target This fails as well: target name=r script language=javascript function doPrecond() { project.log(HELLO PRECOND); } /script script language=javascript doPrecond(); /script /target - 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: Scope of scripts - workaround
With scriptdef you can define the same task differently in different targets or you can provide the expression as a parameter into that scriptdef. macrodef with script even allows text substitution inside the script text - parameters will be inlined by using @{} notation. - Alexey. Marcel Ruff wrote: Alexey N. Solofnenko wrote: Can you use scriptdef instead? See: http://ant.apache.org/manual/OptionalTasks/scriptdef.html . i have tried already with no success (probably not hard enough :-), thanks, Marcel - Alexey. Marcel Ruff wrote: After fiddling further i have found this workaround: - target name=pre script language=javascript var expr = 'function doPrecond() { project.log(HELLO PRECOND); }' project.setProperty(expr, expr); /script /target target name=t depends=pre script language=javascript eval(+project.getProperty(expr)); doPrecond(); /script /target - 1) Setting a property expr to transport the script 2) Executing the script in the calling task t Note that without the + at the beginning of eval() it does not work I hope this helps others, like this it is possible to collect precondition code at a single place. But still I'm wondering about the scope of scripts ... thanks Marcel http://www.xmlBlaster.org Marcel Ruff wrote: Hi, i have defined a javascript function in a pre task, but when i want to call it later i get: ReferenceError: doPrecond is not defined Here is the xml, i call it with 'ant y': - target name=pre script language=javascriptfunction doPrecond() { project.log(HELLO PRECOND); }/script /target target name=y depends=pre script language=javascriptdoPrecond();/script /target - Any ideas? Thanks Marcel http://www.xmlBlaster.org Note: This works fine: target name=z script language=javascript function doPrecond() { project.log(HELLO PRECOND); } doPrecond(); /script /target This fails as well: target name=r script language=javascript function doPrecond() { project.log(HELLO PRECOND); } /script script language=javascript doPrecond(); /script /target - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RMIC Unable to Verify Classes
rmic's classpath should be the whole classpath from javac and javac output directory. - Alexey. Aaron Davies wrote: Hi, I'm having trouble getting the rmic messages about Unable to verify class It is not defined. to go away. My problem is almost exactly like the one described in http://marc.theaimsgroup.com/?l=ant-userm=97069041417063w=2, except that adding . to CLASSPATH (the shell path defined when I call ant) doesn't help. I'm running ant under Win2k and have tried this from both CMD and ZSH under cygwin. Any ideas? -- Aaron Davies [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: update from CVS
Alan, Please first make sure that the commands are working fine from command line. Cannot find error can indicate that the folder was deleted in the repository (CVS does not support directory versioning, so people change the repository directly). If this is the case, just remove that directory (or even its parent directory) and update your sand box. - Alexey. Alan Andrade wrote: Hi I am trying to update the sourcecode from cvs using the ant script before a build Here is my task: target name=label.build depends= description=update src with tagged code property name=complete.label.rrc value=${RRCRel}/ property name=complete.label.rr7 value=${RR7Rel}/ cvs cvsroot=${cvs.root} command=update -P -A -d -C -r ${complete.label.rrc} ${cvs.mod.common}/ cvs cvsroot=${cvs.root} command=update -P -A -d -C -r ${complete.label.rrc} ${cvs.mod.renderer}/ cvs cvsroot=${cvs.root} command=update -P -A -d -C -r ${complete.label.rrc} ${cvs.mod.rrc}/ cvs cvsroot=${cvs.root} command=update -P -A -d -C -r ${complete.label.rr7} ${cvs.mod.rr7}/ /target It fails saying cvs [update aborted]: cannot find RR/Development/common: No such file or directory But in the same build I could label the files in the cvs target name=labelling description =tags modules in cvs cvs cvsroot=${cvs.root} command=rtag -F ${complete.label} ${cvs.mod.renderer}/ cvs cvsroot=${cvs.root} command=rtag -F ${complete.label} ${cvs.mod.rrc}/ cvs cvsroot=${cvs.root} command=rtag -F ${complete.label} ${cvs.mod.rr7}/ /target Thanks Alan - 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: Ant script with clearcase
I would use ClearCase outside of the main build file. For example, CruiseControl supports ClearCase: http://cruisecontrol.sourceforge.net/main/configxml.html#clearcase . - Alexey. Irfan J Sayed wrote: Hi, We are using clearcase as version control system . I need to write a Ant script to take the updated code from clearcase repository and then start build. Can anybody please tell me how to write a script to achieve the same.? Regards Irfan Sayed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Weird compilation problems
It is not ANT problem - you have an anonymous inner class. Look for new AAA() { somewhere in your code. - Alexey. Milen Dzhumerov wrote: Hi there, I've been trying to compile a few simple classes with Ant and everything is fine except that it produces a class twice with the name: SqlErrorCond$1.class SqlErrorCond.class The files have different sizes. Here's the ant file: ?xml version=1.0? project name=SWT Desk default=compile basedir=. !-- Project-wide settings. All directories are relative to the -- !-- project root directory -- !-- Project directories -- property name=src.dir value=src/ property name=build.dir value=build/ !-- Build the application -- target name=compile javac destdir=${build.dir} debug=off deprecation=off !-- We could have used javac's srcdir attribute -- src path=${src.dir}/ /javac /target /project And the verbose output: G:\swtdeskant -v Apache Ant version 1.6.5 compiled on June 2 2005 Buildfile: build.xml Detected Java version: 1.5 in: C:\Program Files\Java\jdk1.5.0_06\jre Detected OS: Windows XP parsing buildfile G:\swtdesk\build.xml with URI = file:///G:/swtdesk/build.xml Project base dir set to: G:\swtdesk Build sequence for target(s) `compile' is [compile] Complete build sequence is [compile, ] compile: [javac] InstallTableException.java added as InstallTableException.class doesn't exist. [javac] NoDatabaseConnectionException.java added as NoDatabaseConnectionException.class doesn't exist. [javac] PgDb.java added as PgDb.class doesn't exist. [javac] PgSqlException.java added as PgSqlException.class doesn't exist. [javac] SInstallTables.java added as SInstallTables.class doesn't exist. [javac] SObject.java added as SObject.class doesn't exist. [javac] SqlError.java added as SqlError.class doesn't exist. [javac] SqlErrorCond.java added as SqlErrorCond.class doesn't exist. [javac] SqlNames.java added as SqlNames.class doesn't exist. [javac] SqlUtils.java added as SqlUtils.class doesn't exist. [javac] Compiling 10 source files to G:\swtdesk\build [javac] Using modern compiler [javac] Compilation arguments: [javac] '-d' [javac] 'G:\swtdesk\build' [javac] '-classpath' [javac] 'G:\swtdesk\build;C:\ant\lib\ant-launcher.jar;C:\ant\lib\ant-antlr.jar;C:\ant\lib\ant-apache-bcel.jar;C:\ant\lib\ant-apache -bsf.jar;C:\ant\lib\ant-apache-log4j.jar;C:\ant\lib\ant-apache-oro.jar;C:\ant\lib\ant-apache-regexp.jar;C:\ant\lib\ant-apache-resolver. jar;C:\ant\lib\ant-commons-logging.jar;C:\ant\lib\ant-commons-net.jar;C:\ant\lib\ant-icontract.jar;C:\ant\lib\ant-jai.jar;C:\ant\lib\an t-javamail.jar;C:\ant\lib\ant-jdepend.jar;C:\ant\lib\ant-jmf.jar;C:\ant\lib\ant-jsch.jar;C:\ant\lib\ant-junit.jar;C:\ant\lib\ant-netrex x.jar;C:\ant\lib\ant-nodeps.jar;C:\ant\lib\ant-starteam.jar;C:\ant\lib\ant-stylebook.jar;C:\ant\lib\ant-swing.jar;C:\ant\lib\ant-trax.j ar;C:\ant\lib\ant-vaj.jar;C:\ant\lib\ant-weblogic.jar;C:\ant\lib\ant-xalan1.jar;C:\ant\lib\ant-xslp.jar;C:\ant\lib\ant.jar;C:\ant\lib\x ercesImpl.jar;C:\ant\lib\xml-apis.jar;C:\Program Files\Java\jdk1.5.0_06\lib\tools.jar' [javac] '-sourcepath' [javac] 'G:\swtdesk\src' [javac] '-g:none' [javac] [javac] The ' characters around the executable and arguments are [javac] not part of the command. [javac] Files to be compiled: [javac] G:\swtdesk\src\InstallTableException.java [javac] G:\swtdesk\src\NoDatabaseConnectionException.java [javac] G:\swtdesk\src\PgDb.java [javac] G:\swtdesk\src\PgSqlException.java [javac] G:\swtdesk\src\SInstallTables.java [javac] G:\swtdesk\src\SObject.java [javac] G:\swtdesk\src\SqlError.java [javac] G:\swtdesk\src\SqlErrorCond.java [javac] G:\swtdesk\src\SqlNames.java [javac] G:\swtdesk\src\SqlUtils.java BUILD SUCCESSFUL Total time: 3 seconds G:\swtdesk Any suggestions are greatly appreciated. Kind regards, gamehack - 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: Really a non-forum related question
I use Cygwin on Linux. There are few guides how to set it up: http://pigtail.net/LRP/printsrv/cygwin-sshd.html http://cfm.gs.washington.edu/security/ssh/client-pkauth/ or http://www.google.com/search?sourceid=mozclientie=utf-8oe=utf-8q=cygwin+openssh+key - Alexey. Res Pons wrote: Thanks for the quick response. I'm not a *nix guru and so far Googling is just pointing me to a lot of products or .edu for the basic instructions of FTP. Do you know of a good site, I can read on this? Also does the certificate have to be generated on the Linux side and copied to the Windows side? Thanks again. Original Message Follows I would use SSH and scp instead with certificate authentication. Also Linux (not sure about RHEL 3.5 - maybe it is too old) can work with Windows shared drives. - Alexey. Res Pons wrote: OK the only remote relation my question has to do with this forum is that I use Subversion and Ant and Linux shell scripting to do my builds. Please someone either give me their expertise or point me to a forum to ask this question. I FTP couple of files from a Linux RHEL 3.5 server to a Windows Domain and my ftp script sends my password in raw ascii text. I have no idea to send my password encrypted for Windows to understand. Any idea, suggestion, or forum I can pose this question please? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ant memory leak - not fixed???
Maybe JspC ate all the memory. Can you run it in forked mode? - Alexey. Xiangzhou Wang wrote: No, still the same. --- EJ Ciramella [EMAIL PROTECTED] wrote: Would incremental garbage cleanup help? ANT_OPTS=-Xincgc -Original Message- From: Xiangzhou Wang [mailto:[EMAIL PROTECTED] Sent: Thursday, March 16, 2006 1:15 PM To: user@ant.apache.org Subject: ant memory leak - not fixed??? Hi, I know it is not a new problem. I am using ant 1.6.5 to compile large number of java files pre-generated from jsp pages with tomcat 5.5.15 jspC. The total number of bytes of these java files is around 150 MB, total class is 40MB, total lib (exclude java) is 21MB. I am using ant only, NO IDE tools. the javac config is: javac destdir=${build.home}/WEB-INF/classes optimize=off debug=on failonerror=false srcdir=${build.home}/WEB-INF/src memoryInitialSize=512m memoryMaximumSize=512m source=1.5 target=1.5 fork=true verbose=5 listfiles=true for classpath /javac I always get failure because of system out of resource. [javac] The system is out of resources. [javac] Consult the following stack trace for details. [javac] java.lang.OutOfMemoryError: Java heap space [javac] Compile failed; see the compiler error output for details. The ant process eats up large chunk of memory (500MB, total memory is 1GB). I also used javac -XX:paralelGC to launch ant, still the same error. I set fork for true and false, both have same error too. It is claimed the memory leak is fixed, is there anyone with similar problem? How to solve it? It seems to me that ant caches a lot of things in the memory, is there a way to hack ant to force disk writing. Many thanks, William - 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: Something like 'make' pattern rules in Ant?
Please look at apply task: http://ant.apache.org/manual/CoreTasks/apply.html - Alexey. Rodrigo de Salvo Braz wrote: Hi, I am learning Ant and would like to write something like a pattern rule as used in 'make'. Something like: %.o: %.cpp cc ... I read the manual but didn't notice something that would do that. Could anyone please give me a pointer? Thanks, Rodrigo - 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: zip files, upload to ftp, unzip files
Usually FTP is the worst option you have (at least SCP is secure). It is much better to mount destination directory locally and use simple copy or sync. If it is impossible, you can run rsync or unison with normal files without zipping them (they work incrementally, so next update will only copy updated files). Finally, if you want to minimize traffic, after transferring the ZIP you can run commands on another side using SSH. - Alexey. Andrus, Brooks wrote: Hey, I'm an Ant noob, so I apologize in advance. I've created a simple build file which zips up a project and uploads it to an ftp site. The missing piece of the puzzle for me is how I can go about unzipping the file once its been uploaded. I'm not seeing anything in the ftp task that seems to address this issue. Anyone have some suggestions? Regards, Brooks Andrus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: When is the next release?
There is fetch.xml build file that downloads some needed jars of the web. Please try running it first. - Alexey. Clifton Craig wrote: Does anybody have an idea about when the next release of Ant is due? I'm having some trouble getting 1.6.5 to work as I'm getting an error: Could not create task or type of type: scriptdef. Ant could not find the task or a class this task relies upon. I get this even after copying the bsf.jar and bsh-2.0b1.jar into $ANT_HOME/lib. I've verified that the lib folder has ant-apache-bsf.jar in it as well. I built my Ant-1.6.5 distro from source and while it built I did notice some warnings that I did not pay attention to. Maybe that has something to do with it? I'm about to leave for the day so I'll have to look more tomorrow. Has anybody else experienced a similar issue? --- Clifton C. Craig, Software Engineer Intelligent Computer Systems - A Division of GBG [EMAIL PROTECTED] [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: Can I substitute jar executable used by jar ?
It depends. When I had any problems with jar, it was always because not SUN's jar was executed, but fastjar instead. But we should not prevent anybody from running any jar that he or she likes. - Alexey. Cena, Bernard (IT) wrote: Steve Loughran wrote: Cena, Bernard (IT) wrote: Is there a way to substitute what executable is used under the hood of jar task in similar fashion to executable and compiler attribute for javac ? We've found jar quite slow on large packages and were wondering if we could substitute for example GNU jar which is much faster. If not, what would be your recommendation for this - write own macro to replace jar ? I would suggest contributing the effort needed to optimise the SVN_HEAD implementation of JAR. Yes, had a look at the code itself and found the answer (lazy!) - thanks for the responses! It would be great to speed this up indeed - may see if we can find a developer to spend some time on profiling this. In the meantime we might just wrap GNU jar in a macro for a cut down jar. Thanks Bernard NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited. - 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: macrodef
You can overwrite the macrodef in your build file or you can copy the file first, then insert necessary elements into that copy. - Alexey. Paulo Jorge Guedes wrote: Hi, I have a target (-init-macrodef-junit ) that initializes junit target using the macrodef element. It doesn't declare the formatter element and I need to have the reports printed. The thing is I can't touch that file. Is there any way to append the formatter child element to the junit macrodef in a target called after the one that initializes it (-init-macrodef-junit)? It would avoid having to redefine all the junit settings... Paulo - 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: macrodef
Well, you can do it via internal ANT API, but it would be a too complex solution for the task. - Alexey. Paulo Jorge Guedes wrote: -Original Message- From: Alexey N. Solofnenko [mailto:[EMAIL PROTECTED] Sent: terça-feira, 17 de Janeiro de 2006 18:23 To: Ant Users List Subject: Re: macrodef You can overwrite the macrodef in your build file or you can copy the file first, then insert necessary elements into that copy. But I have to rewrite all the macrodef settings, i.e., there isn't a way to just add more settings to the already defined macrodef? Paulo - Alexey. Paulo Jorge Guedes wrote: Hi, I have a target (-init-macrodef-junit ) that initializes junit target using the macrodef element. It doesn't declare the formatter element and I need to have the reports printed. The thing is I can't touch that file. Is there any way to append the formatter child element to the junit macrodef in a target called after the one that initializes it (-init-macrodef-junit)? It would avoid having to redefine all the junit settings... Paulo - 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: How to access an inner jar file that resides in a outer jar?
Java itself has this limitation. I will have to unjar it first. - Alexey. Gerd Wütherich wrote: Hi, is there any possibility to access an inner jar file that resides in a outer jar while using an ant path structure? Short example: javac srcdir=${basedir}/source destdir=${basedir}/classes classpath pathelement path=${basedir}/lib/outer.jar!inner.jar / /classpath /javac I did not find any information about it, so i would love to get further information if this is possible and how it may works! Thanks, Gerd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: delete task in Ant
By default ANT ignores some files (CVS, backups,...). To make ANT see such files add defaultexcludes=false into fileset element (see http://ant.apache.org/manual/CoreTypes/fileset.html ). Default excludes list: http://ant.apache.org/manual/dirtasks.html#defaultexcludes . - Alexey. Ken Gentle wrote: The leading . in the filenames (.#Test.log.1.23) is what is preventing this pattern from matching. That looks vaguely like an editor backup file or diff/merge tool backup file pattern. If you're trying to delete files that are named more conventionally (Test.log.1.23), you'll probably need two includes in the fileset, like: delete fileset dir=${buildDir} include name=*Test.log.* / include name=.#Test.log.* / /fileset /delete Don't forget the quotes around the attribute value (name=) - I'm surprised you didn't get an error with the pattern as you have it below. Ken At 13:42 2006-01-06, you wrote: I have a file(s) that get created in the build directory that I want to delete, so I used the delete task delete fileset dir=${buildDir} include name=*Test.log.* / /fileset /delete The files that get created are: .#Test.log.1.23 .#Test.log.1.24 Why does the ant task not recognize these files? Is there something wrong with the pattern that I have given it? Thank you for your help Ajay Dharna - This e-mail message may contain privileged and/or confidential information, and is intended to be received only by persons entitled to receive such information. If you have received this e-mail in error, please notify the sender immediately. Please delete it and all attachments from any servers, hard drives or any other media. Other use of this e-mail by you is strictly prohibited. All e-mails and attachments sent and received are subject to monitoring, reading and archival by Monsanto. The recipient of this e-mail is solely responsible for checking for the presence of Viruses or other Malware. Monsanto accepts no liability for any damage caused by any such code transmitted by or accompanying this e-mail or any attachment. - - 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: Problems using 'mail' task, not able to attach html file
Unless there is something wrong with your particular HTML attachment, please check your classpath. Is it possible that you have some old JAF/JavaMail there. Please also check ANT's and JRE lib/** folders. - Alexey. Chon, Ae H wrote: I removed the charset attribute and getting the following message. [mail] Failed to initialise MIME mail: javax/activation/DataSource [mail] Sending email: BUILD FAILED: TurboPlanner 0.3.0.52 [mail] Sent email with 1 attachment It says it sent it with 1 attachment; but what it actually does is it expands the contents of html as part of the email message. This was what it was doing before. Any other suggestions? -Ae Hwa -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ivan Ivanov Sent: Tuesday, January 03, 2006 3:01 PM To: Ant Users List Subject: Re: Problems using 'mail' task, not able to attach html file Hello, Can you try without charset attribute? Regards Ivan --- Chon, Ae H [EMAIL PROTECTED] wrote: All, I have the following ant mail task configured. But it is unable to attach the 'build.html' file as part of the email but rather expand file as part of the email message. mail mailhost= ${mail.host} subject = BUILD FAILED charset = utf-8 failonerror = false tolist = ${cm.list.address},${metrics.address} messagemimetype = text/html from address = ${from.address} / messageBuild failed due to errors! /message fileset dir = ${log.build.dir} include name = build.html/ /fileset /mail The email contents look like the following when sent. Build failed due to errors! begin 644 build.html M/AT;6P^#0H\:5A9#X-CQ-151!(AT=' M97%U:78](D-O;G1E;G0M5'EP M92(@8V]N=5N=#TB=5X=]H=UL.R!C:%RPT*( @( @;6%R9VEN.B... I cannot figure out what's going on. Thanks for you help. Ae Hwa Chon Configuration Manager SAIC 5113 Leesburg Pike Skyline 4, Suite 502 Falls Church, VA 22041-3220 (W) 703-824-5863 __ Yahoo! DSL - Something to write home about. Just $16.99/mo. or less. dsl.yahoo.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: using buildnumber effectively
This is RTFM: Package pkg = clazz.getPackage(); // there are classes without packages String version=(pkg==null ? null : pkg.getImplementationVersion()); - Alexey. Ferrer, Eric wrote: I had tried that with a version.html and that works great. Has anyone successfully tried using the manifest.mf as a source for storing build/release/version information and successfully reading it at run-time to display in a jsp? -Original Message- From: Ivan Ivanov [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 28, 2005 4:14 PM To: Ant Users List Subject: RE: using buildnumber effectively Hello, You can add a token in your web pages, says @BUILD_NUMBER@ and either replace it with replace or with copy and filterchain. Regards Ivan --- Ferrer, Eric [EMAIL PROTECTED] wrote: Maybe this should be a new thread, but once you increment your build number, what is the best practice to show this build/release in your applications? For instance, I would want to see the build/release number on the footer of my website. -Original Message- From: Mark Lybarger [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 20, 2005 5:53 AM To: Ant Users List Subject: Re: using buildnumber effectively that's definately a great idea. how do i get the branch name of cvs from within ant? basically, which cvs branch is this? On 12/19/05, Anderson, Rob (Global Trade) [EMAIL PROTECTED] wrote: Now, suppose I branch the project to create REL_4_1. Development is still occuring in the head, but REL_4_1 is gearing towards production. The version number would get bumped in this branch, and not reflected back into the head. Is there a way to do the CVS merging from the ant checkin? Not sure I understand what you are asking here. It is OK to release REL_4_1 to production and have the main branch at say build REL_5 or REL_6. When you merge the changes in REL_4_1 to main, just bump the main buildnumber again. So your production system may see REL_4, REL_4_1, and then REL_7. The sequence of buildnumbers does not necessarily need to be contiguious. there seems to be a break in the process, or at least some manual intervention required. say the buildnumber in the head is sitting at 10, and i create a branch REL_1_1. The buildnumber in this branch is incremented to 20 through various releases to test, and finally production. Meanwhile, the head branch never gets released, and the version number is still sitting at 10. My question/confusion is regarding where / how the merging of the version number back into the head occur? When the next project comes along and wants to go to test, they'll branch from the head, and create a branch called REL_1_2. If the version number is never merged back into the head. This seems to be a manual process that must occur every so often or rather when ever an application goes to production, the version in the head needs to be evaluated. How do i keep the version number in the head in sync with the version number in the branches? OK. So if the build number on main is 10, then your buildnumber file would contain the number 10 in it. When you branch, I would recommend naming the branch based on the build number it is branched from, in this case build 10, or perhaps REL_10 as tagged in cvs. So name the branch REL_10 or REL_branch_10. Then on the branch reset the buildnumber to 0. Then builds from the branch will be named REL_branch_10_1, REL_branch_10_2, REL_branch_10_3, ect. On main, you continue with the naming convention REL_10, REL_11, REL_12, etc. When you decide to branch from main again, you follow the same standard. Say you wish to branch off of REL_12, a branch named REL_branch_12 is created and builds from that branch are called REL_branch_12_1, REL_branch_12_2, REL_branch_12_3, etc. Bassically my recommendation is to somehow include the branch name into the build name (or cvs tag) and use buildnumber to increment the number on each branch. Initial setup of a branch would include reseting the buildnumber file to 0. With the branch name in the build name (cvs tag), you don't need to have the buildnumber is sync between main and any branches. I hope this helps. -Rob Anderson - To unsubscribe, e-mail: [EMAIL PROTECTED]
Re: Reg. cpp task
This is how I do it. I created a separate batch script that configures environment for VisualStudio.Net and starts ANT (the script allows local setpath.bat, if local environment is different): if not %MSVCDir% == goto build call %VS71COMNTOOLS%vsvars32.bat :build call %~dp0ant.bat %* Unfortunately it does not work with VisualStudio 2005. So there is another trick. This script allows local setpath.bat script to setup configuration. If setpath.bat does not exist, default script (setpath.bat.orig - it should be in your version control) is used. Please substitute MSVCDir environment variable with any other variable to check, if setpath.bat was already executed. if not %MSVCDir% == goto build if exist %~dp0setpath.bat goto runsetpath copy setpath.bat.orig setpath.bat :runsetpath echo Executing setpath.bat call %~dp0setpath.bat :build call %~dp0ant.bat %* - Alexey. shreedhar natarajan wrote: hi guys, Have anybody used cl/msvc compiler in their build. Visual Studio .Net 2003 internally executes vsvars.bat that set a different env. variables. Only then it is possible to use cl from command prompt. The task cc requires compiler to be run from the command prompt. Not sure what is the best way to do that. Any examples wud be helpful. Best rgds Shreedhar -Original Message- From: Wascally Wabbit [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 28, 2005 11:48 AM To: Ant Users List Cc: [EMAIL PROTECTED] Subject: Re: running mutliple ant files If you can use AntXtras (http://jware.info/) extensions, you could do something like: Example 1: foreach i=test-file list=${list-of-test-files} mode=local haltiferror=no tryeach=yes failproperty=not.clean ant antfile=${test-file}/ /foreach fail if=not.clean message=Something barfed/ Example 2 (to capture logs per test iff it fails): property name=LOGS value=/ foreach i=test-file list=${list-of-test-files mode=local haltiferror=no tryeach=yes failproperty=not.clean capturelogs protect ant antfile=${test-file}/ iferror quiet=yes copylogged tofile=${LOGS}/log-${antfile} important=no/ /iferror /protect /capturelogs /foreach fail if=not.clean message=Something barfed/ At 01:51 PM 12/27/2005, you wrote: i'm trying to find a function/loop that will run all ant test files in a directory that will just run one file after another even if there are errors i've tried a few things that haven't worked, any ideas or snips of code that will put me on the right path? Steven Rogers Developer at NumberSix, Asheville XXX-XXX- XXX email: srogers at numbersix dot com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] The Wabbit - 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: Compiling enums in Ant 1.6.5
Actually there should be no tools.jar in both locations. ANT will automatically use tools.jar from JDK specified by JAVA_HOME. Please add a target to dump all properties and run it to see what was actually executed. There is also a possibility that javac will work with fork=true. - Alexey. Rhino wrote: What version of tools.jar is the correct one for Ant 1.6.5? How can I tell whether I have the right version: by the version number? the size of the file? the timestamp on the file? Rhino - Original Message - From: Alexey N. Solofnenko [EMAIL PROTECTED] To: Ant Users List user@ant.apache.org Sent: Thursday, December 15, 2005 8:08 PM Subject: Re: Compiling enums in Ant 1.6.5 Is it possible that you have old tools.jar somewhere on your CLASSPATH or in your ANT's installation directory? - Alexey. Rhino wrote: - Original Message - From: Rhino [EMAIL PROTECTED] To: ant-user user@ant.apache.org Sent: Thursday, December 15, 2005 5:36 PM Subject: Compiling enums in Ant 1.6.5 Can the javac task in Ant 1.6.5 compile a typesafe enum when using the 'modern' compiler? If yes, how do I persuade it to do so? If no, is there any workaround or will I just have to compile the enum separately and include it in my build manually? Here is my task: target name=compile description=Compile the Java code. javac srcdir=${common.src} destdir=${common.bin} compiler=modern fork=yes verbose=no debug=on debuglevel=lines,vars,source deprecation=yes description=Compile the code in the common package. patternset refid=ps.common/ /javac /target Here is the (relevant) output from the build, which had both the -debug and -verbose switches on: [javac] E:\eclipse\3.0.1\eclipse\workspace\Common\src\ca\maximal\common\Palette.java:19: 'class' or 'interface' expected [javac] public enum Palette { [javac] ^ For what it's worth, I tried adding the source=1.5 parameter to the target and got the message javac: invalid source release: 1.5. My JAVA_HOME environment variable is set to D:\Program Files\Java\jre1.5.0_06, otherwise I'd suspect that I was pointing at a 1.4 (or earlier) compiler. Can anyone shed some light on how I can get Ant to compile this enum? I've solved my problem, although I'd like some guidance on why I had to resort to this to make it work. Shortly after clicking on 'Send', I decided to look in my JAVA_HOME\bin directory to verify that javac.exe was there. It _wasn't_ there and I suddently remembered why: it was a JRE, not a JDK, so naturally no compiler was present! [Hmmm, I just noticed Alexey's reply to my question; Alexey saw the problem before I could finish this note!] Anyway, I changed JAVA_HOME to point to the 1.5.0_06 JDK instead of the JRE. This was in d:\Program Files\Java\jdk1.5.0_06. I ran the javac task again, with the 'source' parameter included, as shown here: target name=compile description=Compile the Java code. javac srcdir=${common.src} destdir=${common.bin} compiler=modern fork=yes verbose=no debug=on debuglevel=lines,vars,source deprecation=yes source=1.5 description=Compile the code in the common package. patternset refid=ps.common/ classpath path=E:\eclipse\3.0.1\eclipse\workspace\Common\bin\ca\maximal\common\utilities\LocalizationUtils/ /javac /target and again got the error message: javac: invalid source release: 1.5 Why?? I amended the task to add the 'executable' parameter (compiler.path was set to d:\Program Files\Java\jdk1.5.0_06\bin\javac): target name=compile description=Compile the Java code. javac srcdir=${common.src} destdir=${common.bin} compiler=modern fork=yes verbose=no debug=on debuglevel=lines,vars,source deprecation=yes executable=${compiler.path} source=1.5 description=Compile the code in the common package. patternset refid=ps.common/ classpath path=E:\eclipse\3.0.1\eclipse\workspace\Common\bin\ca\maximal\common\utilities\LocalizationUtils/ /javac /target This time my Palette enum compiled fine. However, I have some followup questions: Why did I have to add the 'executable' parameter to make this work? Shouldn't Ant have seen the correct compiler by virtue of the fact that I had corrected the JAVA_HOME environment variable to point to a JDK? I did a 'set' at the command prompt to verify that the amended JAVA_HOME was indeed visible before doing the compiles. For what it's worth, Alexey's caution about the spaces in my JAVA_HOME (...Program Files...) value struck me as a potential cause of the problem so I: closed Eclipse; uninstalled the JDK; reinstalled it in D:\Java; changed JAVA_HOME to D:\Java\jdk1.5.0_06; restarted Eclipse; modified the compiler.path property to d:\Java\jdk1.5.0_06\bin\javac and ran the build again. The result was exactly the same: if I omitted the 'executable' parameter and used the 'source=1.5' parameter, I got the 'javac: invalid source release: 1.5' error. If I added 'executable=${compiler.path}, the compile worked fine. How
Re: Ant 1.7
Why cannot you do it now? I do use ANT 1.7 (even worse - locally patched) in my build scripts. - Alexey. David M. Lee wrote: Anyone have any idea when Ant 1.7 will become official? I'd really love to start using signjar's TSA option to timestamp my .jar file signatures. dave CONFIDENTIAL: This email, including its contents and attachments, if any, are confidential. If the reader of this e-mail is not an intended recipient, you have received this e-mail in error and any review, dissemination, distribution or copying is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by return e-mail at [EMAIL PROTECTED] and permanently delete the copy you received. Copyright and other intellectual property rights in its contents are the sole property of Crossroads Systems, Inc. Email transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of the message which arise as a result of email transmission. Although we routinely screen for viruses, addressees should check this email and any attachments for viruses. We make no representation or warranty as to the absence of viruses in this email or any attachments. - 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: Compiling enums in Ant 1.6.5
You will need to point JAVA_HOME to 1.5 JDK (not JRE). Please also use directories without spaces. - Alexey. Rhino wrote: Can the javac task in Ant 1.6.5 compile a typesafe enum when using the 'modern' compiler? If yes, how do I persuade it to do so? If no, is there any workaround or will I just have to compile the enum separately and include it in my build manually? Here is my task: target name=compile description=Compile the Java code. javac srcdir=${common.src} destdir=${common.bin} compiler=modern fork=yes verbose=no debug=on debuglevel=lines,vars,source deprecation=yes description=Compile the code in the common package. patternset refid=ps.common/ /javac /target Here is the (relevant) output from the build, which had both the -debug and -verbose switches on: [javac] E:\eclipse\3.0.1\eclipse\workspace\Common\src\ca\maximal\common\Palette.java:19: 'class' or 'interface' expected [javac] public enum Palette { [javac] ^ For what it's worth, I tried adding the source=1.5 parameter to the target and got the message javac: invalid source release: 1.5. My JAVA_HOME environment variable is set to D:\Program Files\Java\jre1.5.0_06, otherwise I'd suspect that I was pointing at a 1.4 (or earlier) compiler. Can anyone shed some light on how I can get Ant to compile this enum? Rhino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Compiling enums in Ant 1.6.5
Is it possible that you have old tools.jar somewhere on your CLASSPATH or in your ANT's installation directory? - Alexey. Rhino wrote: - Original Message - From: Rhino [EMAIL PROTECTED] To: ant-user user@ant.apache.org Sent: Thursday, December 15, 2005 5:36 PM Subject: Compiling enums in Ant 1.6.5 Can the javac task in Ant 1.6.5 compile a typesafe enum when using the 'modern' compiler? If yes, how do I persuade it to do so? If no, is there any workaround or will I just have to compile the enum separately and include it in my build manually? Here is my task: target name=compile description=Compile the Java code. javac srcdir=${common.src} destdir=${common.bin} compiler=modern fork=yes verbose=no debug=on debuglevel=lines,vars,source deprecation=yes description=Compile the code in the common package. patternset refid=ps.common/ /javac /target Here is the (relevant) output from the build, which had both the -debug and -verbose switches on: [javac] E:\eclipse\3.0.1\eclipse\workspace\Common\src\ca\maximal\common\Palette.java:19: 'class' or 'interface' expected [javac] public enum Palette { [javac] ^ For what it's worth, I tried adding the source=1.5 parameter to the target and got the message javac: invalid source release: 1.5. My JAVA_HOME environment variable is set to D:\Program Files\Java\jre1.5.0_06, otherwise I'd suspect that I was pointing at a 1.4 (or earlier) compiler. Can anyone shed some light on how I can get Ant to compile this enum? I've solved my problem, although I'd like some guidance on why I had to resort to this to make it work. Shortly after clicking on 'Send', I decided to look in my JAVA_HOME\bin directory to verify that javac.exe was there. It _wasn't_ there and I suddently remembered why: it was a JRE, not a JDK, so naturally no compiler was present! [Hmmm, I just noticed Alexey's reply to my question; Alexey saw the problem before I could finish this note!] Anyway, I changed JAVA_HOME to point to the 1.5.0_06 JDK instead of the JRE. This was in d:\Program Files\Java\jdk1.5.0_06. I ran the javac task again, with the 'source' parameter included, as shown here: target name=compile description=Compile the Java code. javac srcdir=${common.src} destdir=${common.bin} compiler=modern fork=yes verbose=no debug=on debuglevel=lines,vars,source deprecation=yes source=1.5 description=Compile the code in the common package. patternset refid=ps.common/ classpath path=E:\eclipse\3.0.1\eclipse\workspace\Common\bin\ca\maximal\common\utilities\LocalizationUtils/ /javac /target and again got the error message: javac: invalid source release: 1.5 Why?? I amended the task to add the 'executable' parameter (compiler.path was set to d:\Program Files\Java\jdk1.5.0_06\bin\javac): target name=compile description=Compile the Java code. javac srcdir=${common.src} destdir=${common.bin} compiler=modern fork=yes verbose=no debug=on debuglevel=lines,vars,source deprecation=yes executable=${compiler.path} source=1.5 description=Compile the code in the common package. patternset refid=ps.common/ classpath path=E:\eclipse\3.0.1\eclipse\workspace\Common\bin\ca\maximal\common\utilities\LocalizationUtils/ /javac /target This time my Palette enum compiled fine. However, I have some followup questions: Why did I have to add the 'executable' parameter to make this work? Shouldn't Ant have seen the correct compiler by virtue of the fact that I had corrected the JAVA_HOME environment variable to point to a JDK? I did a 'set' at the command prompt to verify that the amended JAVA_HOME was indeed visible before doing the compiles. For what it's worth, Alexey's caution about the spaces in my JAVA_HOME (...Program Files...) value struck me as a potential cause of the problem so I: closed Eclipse; uninstalled the JDK; reinstalled it in D:\Java; changed JAVA_HOME to D:\Java\jdk1.5.0_06; restarted Eclipse; modified the compiler.path property to d:\Java\jdk1.5.0_06\bin\javac and ran the build again. The result was exactly the same: if I omitted the 'executable' parameter and used the 'source=1.5' parameter, I got the 'javac: invalid source release: 1.5' error. If I added 'executable=${compiler.path}, the compile worked fine. How do I get the javac task to work _with_ the 'source=1.5' parameter but *without* specifying the 'executable' parameter? Rhino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Urgent help with FTP task.....please help
Why not to use copy with UNC paths? - Alexey. [EMAIL PROTECTED] wrote: I am trying from my laptop to my desktop. Eventually I have to move files from one windows box to multiple windows boxes. -Original Message- From: Ivan Ivanov [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 14, 2005 6:14 PM To: Ant Users List Subject: Re: Urgent help with FTP task.please help Hello, Are you aure you have ftp server up and running on 10.187.218.183? Can you access the ftp server using ordinary command line client like C:\ ftp 10.187.218.183 Regards Ivan --- [EMAIL PROTECTED] wrote: I downloaded the required jarfile from ant site for ftp task . I get the following error. C:\antscriptsant -verbose -f generalftp.xml Apache Ant version 1.6.2 compiled on August 5 2004 Buildfile: generalftp.xml Detected Java version: 1.5 in: C:\bea9\JROCKI~1\jre Detected OS: Windows XP parsing buildfile C:\antscripts\generalftp.xml with URI = file:///C:/antscripts/ generalftp.xml Project base dir set to: C:\antscripts Build sequence for target `ftp' is [ftp] Complete build sequence is [ftp, ] ftp: [ftp] Opening FTP connection to 10.187.218.183 BUILD FAILED C:\antscripts\generalftp.xml:7: error during FTP transfer: java.net.ConnectExcep tion: Connection refused at org.apache.tools.ant.taskdefs.optional.net.FTP.execute(FTP.java:2014) 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.executeTarget(Project.java:1214) at org.apache.tools.ant.Project.executeTargets(Project.java:1062) at org.apache.tools.ant.Main.runBuild(Main.java:673) at org.apache.tools.ant.Main.startAnt(Main.java:188) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55) My build file is project name=ftpuse default=ftp target name=ftp ftp server=10.187.218.183 remotedir=c:\uploads depends=yes userid=sparthasarthy12 password=srinivasa27 fileset dir=c:\sshkeys/ /ftp echo message=ftp successful/ /target /project what is wrong... __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: indirect property evaluation
A simple scriptdef can do that. - Alexey. Lasher, James L wrote: Hello all, I have the following property file that I want to load in my project: db.system=solid # --- for Solid testfw.solid.system=Solid testfw.dbvar.system=testfw.${db.system}.system testfw.db.system=${testfw.dbvar.system} In my build.xml file, after loading the properties file, I would like the result of: echo message=testfw.db.system = ${testfw.db.system}/ To be: testfw.db.system = Solid Instead of: Testfw.db.system = testfw.solid.system Is it possible to do this double evaluation? Thanks in advance, -jim- - 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: how to detect relative or absolute path value
Have you tried property name=path location=${another.path.property}/? In that case path property will have an absolute path of another.path.property. - Alexey. [EMAIL PROTECTED] wrote: My Ant script needs to know if a property value is a relative or absolute path in order to decide if to prepend a root path or not. Can Ant do this without custom tasks? Sten Rosendahl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- / Alexey N. Solofnenko MDL Information Systems, Inc. work: 510-357-x1726 home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Errors on updating a filein ClearCase.
I do not understand what ClearCase is complaining about, but I would suggest using transparent views. With transparent views ClearCase does not mangle files. The problem is that everybody should use the same kind of views, otherwise you can get empty lines inserted after each line in the text files. - Alexey. Karunakar Chatla wrote: Hi, I have following script in my build file. !-- Update build history file -- target name=BuildHistory !--depends=Build -- echo message=Updating build history file... / !-- check out the build history file -- cccheckout viewpath=D:\kchatla\testview\kchatla_view2\AdminCC\data\build\buildHist ory reserved=true nowarn=true comment=Updating build histiory failonerr=true/ !-- Update the contents of the file -- concat destfile=D:\kchatla\testview\kchatla_view2\AdminCC\data\build\buildHist ory force=true eol=dos Build.Date=${Now.Date} Release.Version=${product.version} Build.Number=${build.number} Components=ALL Description=Full build, building all the components Build.Type=${build.type} Configspec=${soft.labels.path}\${configspec-win} Build.Label=${label.type} Build.Requester=${build.requester} /concat !-- Check in when done with the changes -- cccheckin viewpath=D:\kchatla\testview\kchatla_view2\AdminCC\data\build\buildHist ory comment=Build history updated nowarn=true identical=true failonerr=true/ /target I am able to checkout the file update it and check it in. but it is giving following errors and the file is being hijacked. cleartool: Error: size of D:\kchatla\testview\kchatla_view2\AdminCC\data\build\buildHistory is 322, expected 332. cleartool: Warning: This is a msdos text mode view. Is the VOB element's text mode information correct? cleartool: Error: Errors were encountered in loading \AdminCC\data\build\buildHistory. cleartool: Warning: VOB updated, but failure updating snapshot view to reflect checkin of D:\kchatla\testview\kchatla_view2\AdminCC\data\build\buildHistory: error detected by ClearCase subsystem. Any suggestions for avoiding this situation?? Thanks, Karunakar Chatla -- / Alexey N. Solofnenko MDL Information Systems, Inc. work: 510-357-x1726 home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: can ant solve this rather complex challenge
There are also scriptdef (http://ant.apache.org/manual/OptionalTasks/scriptdef.html) and foreach (http://ant-contrib.sourceforge.net/tasks/tasks/foreach.html). - Alexey. Scott Bell wrote: Problem statement: I have a number of simple tcl scripts, and they take a set number of params as input (argv). Usually 1-10 params. They can all run standalone, but have dependencies. ANT is therefore perfect for them. I have the params that I send to the scripts as named value pairs in a set of property files. We clone the property files for each objects we want created. For example hostobject1.properties hostobject2.properties we would send to hostobject.tcl twice to create two objects. Ok, so far...but, its not a good way to run a deployment, run a script twice manually. But it gets more complicated. There are about 10 difference scripts and with each script, we often need to create many objects, each with its own properties. So here is the solution (question is, can ANT make it possible): We want to run each one of the scripts, once for every property file that EXISTS, and we want to use ant to drive the whole thing. So, if there is a hostobject5..properties file..in a directory, ant knows it needs to run the script for it to create the object. So ant goes and 1. finds the properties files 2. understands from the name of the property file what task to execute and pass it to 3. iterates over all files, calls the correct task once for each property file it has Even better, we can put cloned property files into directories to keep everything neat and tidy. How do we do this? Can ANT make it work? or do I need a shell script. There are filesets, macrodefs..etc. We use 1.5 of ant, but..can upgrade to 1.6, if required. 1.5 solution preferred. _ It's fast, it's easy and it's free. Get MSN Messenger 7.0 today! http://messenger.msn.co.uk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- / Alexey N. Solofnenko MDL Information Systems, Inc. work: 510-357-x1726 home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adding to the ant classpath from within a project
taskdef and typedef (http://ant.apache.org/manual/CoreTasks/typedef.html) have classpath attribute. You can execute it within a target or within ANT-Contrib's if task in a global scope. - Alexey. Nestor Dutko wrote: I've looked around at this and understand the mechanisms that nat has for extending types (via typedef) and tasks (via taskdef). I have a condition where I want to use the propertyregexp task. I compile using JDK1.2. I also have the apache regexp.jar. I have read on how to add my own task definition and defining with regexpimpl to use via the ant -D mechanism. What I want to do is - augment just ant's classpath to include regexp.jar - do this without: adding the file to $ANT_HOME/lib adding the file to ~/.ant tree setting CLASSPATH to point to the location of the file before invoking ant. Is there some way that I can cause the ant classloader to know about a generic JAR file to be added if the jar file does not have a type or task definition? Thanks, Nestor -- / Alexey N. Solofnenko MDL Information Systems, Inc. work: 510-357-x1726 home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adding to the ant classpath from within a project
I am not sure, what problem you are trying to solve. Somewhere there should be a logic to include the jar or not. Can you move it outside of ANT script? If no, you can create dummy task and taskdef it. Or you can try to add your jar to classpath of some other innocent taskdef. - Alexey. Nestor Dutko wrote: I should have added this - this jar does not contain any typedef or tasks to be defined. It actually contains the regexp implementation that I just want to have added to the ant classpath. Can I use taskdef/typedef without defining a task or type? -Original Message- From: Alexey N. Solofnenko [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 23, 2005 4:06 PM To: Ant Users List Subject: Re: Adding to the ant classpath from within a project taskdef and typedef (http://ant.apache.org/manual/CoreTasks/typedef.html) have classpath attribute. You can execute it within a target or within ANT-Contrib's if task in a global scope. - Alexey. Nestor Dutko wrote: I've looked around at this and understand the mechanisms that nat has for extending types (via typedef) and tasks (via taskdef). I have a condition where I want to use the propertyregexp task. I compile using JDK1.2. I also have the apache regexp.jar. I have read on how to add my own task definition and defining with regexpimpl to use via the ant -D mechanism. What I want to do is - augment just ant's classpath to include regexp.jar - do this without: adding the file to $ANT_HOME/lib adding the file to ~/.ant tree setting CLASSPATH to point to the location of the file before invoking ant. Is there some way that I can cause the ant classloader to know about a generic JAR file to be added if the jar file does not have a type or task definition? Thanks, Nestor -- / Alexey N. Solofnenko MDL Information Systems, Inc. work: 510-357-x1726 home: http://trelony.cjb.net/ / - 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] -- / Alexey N. Solofnenko MDL Information Systems, Inc. work: 510-357-x1726 home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Removing duplicate jars from classpath
I do it with Jython as following, but, depending on what you actually need to do, it can be done easier by filtering all values via LinkedHashSet: scriptdef name=setpath language=jython attribute name=name / attribute name=path / ![CDATA[# setpath import os import java name=str(attributes.get(name)) path=attributes.get(path) pathList=[] pathSet={} for elem0 in path.split(';'): for elem in elem0.split(java.io.File.pathSeparator): canon_elem=java.io.File(elem).canonicalPath if not pathSet.has_key(canon_elem): pathSet[canon_elem]=None pathList.append(java.io.File(elem).absolutePath) path=os.pathsep.join(pathList) project.setProperty(name, path)]] /scriptdef timt asml wrote: Hi, We've recently moved part of our build environment from traditional unix make to ant, and we're encountering some problems (ant 1.6.2, by the way) - We have an hierachical archive organization, in which individual programmers only work on single components of the product. Typically, a single component is a single jar. - Each developer works in a partial cpy of a so-called gate archive. This gate-archive contains the jar's for all components in the archive. We now build a class path using the following snippet: available file=${jlib.ws} type=dir property=jlib.ws.available/ available file=${jlib.gate} type=dir property=jlib.gate.available/ path id=cmgr.classpath fileset dir=${jlib.ws} include name=*.jar/ /fileset fileset dir=${basedir} include name=${jlib.gate}/*.jar if=jlib.gate.available/ /fileset /path Clearly, this leads to some duplication: the gate archive also contains the component jar, and we're somewhat worried about picking up the wrong version of the jar file. How do I exclude a file which is already in the path from being added to the path ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- / Alexey N. Solofnenko MDL Information Systems, Inc. work: 510-357-x1726 home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: zipfile with manifest
Isn't the manifest just another file? Create one one way or another (maybe even with echo, but it is better not to overwrite the file, if it is already up-to-date to avoid continuous zip file updates) and zip it with all other files. - Alexey. THUFIR HAWAT wrote: http://ant.apache.org/manual/CoreTasks/manifest.html seems to be saying that ant creates the manifest in the standard place, the META-INF directory, specified by http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html, which is putting the manifest in the META-INF directory. Is that a correct reading of the manual? I'm writing a plugin for JamochaMUD http://www.jamochamud.org/. JamochaMUD requires that the plug-in be in a zip file, but that the extension is .jpa http://www.jamochamud.org/PlugInDocs.html. Also, the manifest must be moved from The META-INF directory to the top directory. I think what that means is that JamochaMUD is looking for a jar file, but with a .jpa extension and the manifest moved to the top level. Without commenting on the wisdom of those requirements, how do I meet them? I'm looking at http://ant.apache.org/manual/CoreTasks/zip.html and this seems to be the ticket. How do I get the manifest into the zip file from ant? Thanks, Thufir - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- / Alexey N. Solofnenko home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to test whether a particular environment variable is set or not
The second property will not work, because the property is already set earlier. You may want to execute them in reverse order. - Alexey. [EMAIL PROTECTED] wrote: This will trim down the previous post property name=test.home value=TO_BE_REPLACED/ if isset property=env.TEST_HOME/ then property name=test.home value=${env.TEST_HOME}/ /then /if -- / Alexey N. Solofnenko home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: character replace
I am sorry, I did not read your email correctly. With Java regular expressions you need to escape back slashes twice . - Alexey. Chad Armstrong wrote: Nope, I take it back, read my output wrong. Here is a little more info. Commented sections are outputs: echo message=here is MSVC.Pre-Link.RESOURCE_DEF: ${MSVC.Pre-Link.RESOURCE_DEF} / !-- [echo] here is MSVC.Pre-Link.RESOURCE_DEF: WIN32;NDEBUG;_WINDOWS;_USRDLL;ESPANALYTICS_EXPORTS;NOMINMAX;RW_NO_STL;_CREATE_MBS_DLL_ -- script language=javascript ![CDATA[ strResourceDef = project.getProperty(MSVC.Pre-Link.RESOURCE_DEF); strReplace = strResourceDef.replaceAll(;,\r\n); project.setProperty(RESOURCE_DEF_REPLACE, strReplace); ]] /script echo message=here is RESOURCE_DEF_REPLACE: ${RESOURCE_DEF_REPLACE} / !-- [echo] here is RESOURCE_DEF_REPLACE: WIN32 [echo] NDEBUG [echo] _WINDOWS [echo] _USRDLL [echo] ESPANALYTICS_EXPORTS [echo] NOMINMAX [echo] RW_NO_STL [echo] _CREATE_MBS_DLL_ -- - Still returns actual parsed newlines instead of the string \r\n. thanks Chad -- / Alexey N. Solofnenko home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Does Ant improves the performance in large c++ project than make?
It is quite possible. With make it is usually one file at a time compilation. ANT is smart enough to request a build for several files at a time. - Alexey. hiren patel wrote: Hi, We are having a large,multi platform,complex,commercial C++ project which is build by using a make peer PVCS merant make. In oreder to tailor the functionality of make, we have created the wrapper around it. Around 700 of make files in hierarchy with some top level makefiles are used by the make. A complex perl script performs and co-ordinates the build stages. It also executes some of the build stages in parallel. Full build itself takes aroud 7 hours. Project is build on unix,sun solaris and NT platforms. Question is can Ant be used for this kind project where build takes a several hours already? ANT documentation doen't states that it can be used for C/C++ projects and doen't provides any tasks for C++ file compilation in the latest version. As ANT is designed for java based projects and uses JVM which could make it significantly slower than it is right now. isn't it? is anybody using the Ant for such project? if so than what will be the effect on build time (as this is the most important criteria for us) if we move from PVCS merant make to ANT? Since ANT calculates the file dependencies by its own, I suspect time overhead in doing this at each build operation. Is there any way to cache the dependancy information in order to remove this overhead? Please provide suggestions, Thanks, Hiren patel __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- / Alexey N. Solofnenko home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: Howto do this in Ant: Replace a placeholder in a file with the content in another file
It is XML. You will need to put amp;database;. - Alexey. Christine Gerstenmayer wrote: Hello Alexey Thanks very much for your help but I have another problem: Loadfile works fine: property name=ojbdatabase value=/ loadfile property=ojbdatabase srcfile=repository_database.xml /loadfile But if I want to replace the placeholder with the property like this (the placeholder in repository.xml is database;: replace file=repository.xml replacefilter token=database; property=ojbdatabase/ /replace Ant says: The entity database was referenced but not declared. Can you explain me this please? Where do I have to declare a token ? Thanks for your help. Best Regards Christine -Ursprüngliche Nachricht- Von: Alexey N. Solofnenko [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 05. Juli 2005 00:20 An: Ant Users List Betreff: Re: Howto do this in Ant: Replace a placeholder in a file with the content in another file I would suggest using loadfile http://ant.apache.org/manual/CoreTasks/loadfile.html with replace http://ant.apache.org/manual/CoreTasks/replace.html - Alexey. Christine Gerstenmayer wrote: Hi all, I need your help. I want to replace a placeholder in a file with the content of another file. ... -- / Alexey N. Solofnenko MDL Information Systems, Inc. work: 510-357-x1726 home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: Howto do this in Ant: Replace a placeholder in a file with the content in another file
Hmm... loadfile after property with the same name is not supposed to work. The first task in the build script always wins. - Alexey. Christine Gerstenmayer wrote: Hello Alexey Thanks very much for your help but I have another problem: Loadfile works fine: property name=ojbdatabase value=/ loadfile property=ojbdatabase srcfile=repository_database.xml /loadfile But if I want to replace the placeholder with the property like this (the placeholder in repository.xml is database;: replace file=repository.xml replacefilter token=database; property=ojbdatabase/ /replace Ant says: The entity database was referenced but not declared. Can you explain me this please? Where do I have to declare a token ? Thanks for your help. Best Regards Christine -Ursprüngliche Nachricht- Von: Alexey N. Solofnenko [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 05. Juli 2005 00:20 An: Ant Users List Betreff: Re: Howto do this in Ant: Replace a placeholder in a file with the content in another file I would suggest using loadfile http://ant.apache.org/manual/CoreTasks/loadfile.html with replace http://ant.apache.org/manual/CoreTasks/replace.html - Alexey. Christine Gerstenmayer wrote: Hi all, I need your help. I want to replace a placeholder in a file with the content of another file. ... -- / Alexey N. Solofnenko MDL Information Systems, Inc. work: 510-357-x1726 home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [offtopic] ClearCase/cleartool with ssh ?
With SSH you can run anything on a remote computer (much like rexec). You can just use exec for that. Please configure SSH to use key authentication, so no password is requested. - Alexey. Rebhan, Gilbert wrote: Offtopic, but as there are a couple of ClearCase users around on that list and google didn't bring up anything. In our buildprocess we want to use a ClearCase snapshotview on a remote unix machine. But no telnet / ftp allowed. Is there any possiblity to run the ClearCase client with ssh ? Maybe with wrapping the cleartool command line interface into ssh ... / with ant ? I know of ClearCase Multisite, but there only the communication between different servers is with ssh. Gilbert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- / Alexey N. Solofnenko home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Howto do this in Ant: Replace a placeholder in a file with the content in another file
I would suggest using loadfile http://ant.apache.org/manual/CoreTasks/loadfile.html with replace http://ant.apache.org/manual/CoreTasks/replace.html - Alexey. Christine Gerstenmayer wrote: Hi all, I need your help. I want to replace a placeholder in a file with the content of another file. ... -- / Alexey N. Solofnenko home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unjar + Jar (check if up-to-date)
I usually create a timestamp file with touch and use uptodate to see if zip file was updated. - Alexey. Pavel Krupets wrote: Hello, Problem is that it always unzip files. I want to check it before unzipping. With regards, Pavel Krupets -- / Alexey N. Solofnenko home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need help writing regular expression??
I would try to replace all spaces '\s' with empty values. - Alexey. Ninju Bohra wrote: Hello all, Quick question... I need write a regular expression to generate FirstLetterOfFirstNameLastName from a full name (i.e. First Name Last Name) Given the string: Ninju Bohra I want: NBohra What is the regular expression (if any) I would use? property name=full.name value=Ninju Bohra/ propertyregex property=userID input=${full.name} regexp=need help here select=\1 casesensitive=false / Thanx, Ninju Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- / Alexey N. Solofnenko home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to execute a subtask conditionally if used several times
You can put antcall inside apply. - Alexey. Dr. Michael Lipp wrote: Hi, I have a target that produces an output file based on an input file. I invoke this target several times using antcall with different pairs of input and output files (using antcallparam ...). As an optimization, I want to do the generation only if the input file is newer than the output file. In order to do this, I have to set a property with uptodate. Of course, I would like to do this in my antcall-ed target to avoid duplication of code. But how can I reset the property once it has been set in my sub-target? Once a property is set, it cannot be changed. So if the first antcall causes e.g. isUpToDate to be set, all subsequent antcalls will be executed as well. Any solution? Regards, Michael -- / Alexey N. Solofnenko home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Detecting JDK Version using ANT
Java sets ${java.vm.version} property with its version. - Alexey. Zarar Siddiqi wrote: Hi, Is there a clean way to detect what version of Java is being used when running a build file? Some possible solutions include: 1) parsing the JAVA_HOME variable to detect the version number 2) Checking the existence of a file which is specific to a version Both methods are somewhat brittle. Is there a sureshot way of knowing whether ANT is being invoked using Java 1.5 or not? Thanks in advance, Zarar -- / Alexey N. Solofnenko home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Detecting JDK Version using ANT
Actually the best property is ${java.specification.version} it is just two digit version 1.4 or 1.5. - Alexey. Ivan Ivanov wrote: Hello, you can try with java.version property: project echo$${java.version} is ${java.version}/echo echo$${java.runtime.version} is ${java.runtime.version}/echo !-- Dumps all properties starting with java -- echoproperties prefix=java/ /project Regards Ivan --- Zarar Siddiqi [EMAIL PROTECTED] wrote: Hi, Is there a clean way to detect what version of Java is being used when running a build file? Some possible solutions include: 1) parsing the JAVA_HOME variable to detect the version number 2) Checking the existence of a file which is specific to a version Both methods are somewhat brittle. Is there a sureshot way of knowing whether ANT is being invoked using Java 1.5 or not? Thanks in advance, Zarar -- / Alexey N. Solofnenko home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Errors while trying to compile ant 1.6.5 with gcj 4.0
It is an interesting exercise... Tools.jar is required, if you want to run javac/ in process, otherwise you can specify javac fork=true.../ and external compiler will be used (for example, jikes). Another possibility is to compile tools.jar into native code (not sure whether gcj can do it and maybe it is illegal, because gcj would have to decompile bytecode in order to generate native code and I doubt you will have rights to redistribute the results). - Alexey. Bernhard Rosenkraenzer wrote: Hi, when trying to compile ant from source using gcj 4.0 (no non-free JDKs installed), hundreds of deprecation warnings and 2 fatal errors: src/main/org/apache/tools/ant/IntrospectionHelper.java:495: error: No constructor matching '(org.apache.tools.ant.IntrospectionHelper,java.lang.Object,java.lang.Object)' found in class 'org.apache.tools.ant.IntrospectionHelper$NestedCreator'. nc = new NestedCreator(null) { ^ src/main/org/apache/tools/ant/IntrospectionHelper.java: In class 'org.apache.tools.ant.IntrospectionHelper$2': src/main/org/apache/tools/ant/IntrospectionHelper.java: In constructor '(org.apache.tools.ant.IntrospectionHelper,java.lang.Object,java.lang.Object)': src/main/org/apache/tools/ant/IntrospectionHelper.java:508: error: No constructor matching '(org.apache.tools.ant.IntrospectionHelper,java.lang.Object,java.lang.Object)' found in class 'org.apache.tools.ant.IntrospectionHelper$NestedCreator'. nc = new NestedCreator(null) { ^ 2 errors Trying to use the ant binaries doesn't work either: ant -version results in Unable to locate tools.jar. Expected to find it in /usr/lib/tools.jar Apache Ant version 1.6.5 compiled on June 2 2005 AFAICT gcj doesn't have a tools.jar file. Any ideas on this? Thanks, bero - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- / Alexey N. Solofnenko home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AntHill Question
If the name is stored in XML try renaming it manually, then deleting it via GUI. I think the reason for the failure is the failure to encode ampersand. Try putting HTML or XML its encodings. Also maybe AntHill is already fixed. Did you try its latest version? - Alexey. S I wrote: Sorry, don't know where to post this. It's really an Anthill question. I created a schedule in anthill (http://localhost:8080/anthill/ and running tomcat) on my winXP and I embedded the an ampersand in the name(e.g. AB Project); now I get error messages that I can not delete or edit it. Anyone has any ideas? I have a opinion poll: What's your preference between the 3? Anthill (Free or paid version) Cruisecontrol Maven - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- / Alexey N. Solofnenko home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: sshexec error handling
Like in C: cmd1 cmd2 - Alexey. Dick, Brian E. wrote: I need to execute two commands with sshexec. sshexec host=host username=username password=password command=cmd1; cmd2 trust=yes/ How can I get sshexec to fail when the first command fails? Later, BEDick -- / Alexey N. Solofnenko home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ANT CVS Task
I do not think anybody really cares if you skip few build numbers, but CVS tagging can be expensive, so it is better to do it after your build successfully finishes. - Alexey. S I wrote: Hi I have my ant script to tag our cvs repository projects with the build# recursively after modifying couple of files and continue to do the build. However, if the build down the line fails, I do not have any failsafe mechanism to untag or undo, so I could reuse the same tag and since my build.number file is internally incremented already...if I run c:\ant target target, naturally I'd get the next build#, so on so forth. How do I wanna handle this or does it matter when I skip builds and annouce random builds? Thanks Steven -- / Alexey N. Solofnenko home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ANT CVS Task
If I am not mistaken, you tag file revisions that are currently loaded in your sand box. If you used ClearCase with dynamic view the files could be changed on a fly, but with CVS it will not happen. - Alexey. S I wrote: Here's then another question: Normally, I tag cvs repository as soon as I checkout since I do not lock the repository during a build. If I tag after a successful build, don't I take the chance of someone checking in code between the time I checked out to build's completion? If someone checked in code while I was building then the integrity of my build is questionable, no? Then again I'm not clear of CVS Tagging architecture, in the sense, that whether it matches my local working folder's date/time stamp to the live repository and that is what it tags only or tags the live repository at its current state? Which is the case? Does it matter when a buildmaster tags their project? -- / Alexey N. Solofnenko home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Urgent Help Required:Exec Issue with Suse Linux
If it works on a command line, write a batch script and execute it as cmd /c batch.bat. - Alexey. Kapil Bajaj wrote: Hi All I am facing an issue when I am trying to execute Ant Script in Suse Linux Environment. I am using Ant Version 1.6.1. I am using exec Tag in Build.xml to make connection to DB2 Database and then using Exec Tag again to execute a SQL File exec executable=db2 output=db2-nagano.txt append=true arg line=-v CONNECT TO dummy USER db2admin USING db2pass / /exec exec executable=db2 output=db2-nagano.txt append=true arg line=-f getNaganoInfo.sql / /exec In this case I would like that both Exec Commands should execute in same Shell Environment so that Connection made by First Tag can be used by Tag 2 However I guess Ant is executing both the Command in different shell environment and therefore connection made is not passed to next command while executing sql file. Hence I am getting Error for No Connection made to database. This Script seems to be working perfectly fine in Windows Environment. Also If I manually type my Command on prompt at Linux shell then also I get correct result. Only when I try to do this task using Ant Script I am getting this Error which suggest that exec Command is not executing in same shell in Linux. Can some one please suggest me workaround for this issue as this has become a High Prioroty Issue. Thanks and Regards -- Kapil Bajaj India Software Labs IBM Software Group. Email : [EMAIL PROTECTED] -- / Alexey N. Solofnenko home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Simple (?) question about available
I think you should add fileset inside filepath: http://ant.apache.org/manual/using.html#path - Alexey. Rich Wagner wrote: Hi, I'm having trouble specifying a particular available task. Here's what I want, though Ant isn't happy with it: target name=check_for_zip_file available property=ZIP_FILE_EXISTS filepath include name=${DIR}/*.zip/ exclude name=${DIR}/not_this_one.zip/ /filepath /available /target Ant says: The path type doesn't support the nested 'include' element. OK, but can anyone tell me how to write what I want? Essentially, set the ZIP_FILE_EXISTS property if there's at least one match to ${DIR}/*.zip, though NOT counting ${DIR}/not_this_one.zip... Thanks in advance, Rich Wagner -- / Alexey N. Solofnenko home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Spawning a java call in a new command shell
On Windows you can execute 'cmd /c start Window title command', on Unix ('pwd' is usually executed on Unix) it can be done by executing xterm You will also pause at the end, so the window is not closed. - Alexey. Brian Kuhn wrote: I think this is more of a windows than an ant question; Does anyone know if it's possible to create a new window when spawning a cmd command? For instance, I'd like to have the following exec task create a new cmd window so I can see the results. This is an example: exec executable=cmd spawn=true dir=${windows.weblogicDir} arg line=/c pwd/ /exec Thanks, Brian -- / Alexey N. Solofnenko home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Spawning a java call in a new command shell
Brain is working faster than fingers I meant that you will to need to add pause at the end of your command for the window to remain opened. - Alexey. Alexey N. Solofnenko wrote: On Windows you can execute 'cmd /c start Window title command', on Unix ('pwd' is usually executed on Unix) it can be done by executing xterm You will also pause at the end, so the window is not closed. - Alexey. Brian Kuhn wrote: I think this is more of a windows than an ant question; Does anyone know if it's possible to create a new window when spawning a cmd command? For instance, I'd like to have the following exec task create a new cmd window so I can see the results. This is an example: exec executable=cmd spawn=true dir=${windows.weblogicDir} arg line=/c pwd/ /exec Thanks, Brian -- / Alexey N. Solofnenko MDL Information Systems, Inc. work: 510-357-x1726 home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: updating jar file with existing file: overwrite?
I think one can add a sleep for two seconds before zipping to work around time rounding issues. It would be great to do it automatically, if necessary. - Alexey. Stefan Bodewig wrote: On Mon, 16 May 2005, Andreas Bothner [EMAIL PROTECTED] wrote: Thanks Keith. I tried to do this using touch, however, this did not work because the date time stamp does not go down to milliseconds... zip and friends can only use what the underlying archive format allows. And ZIPs only support a granularity of two seconds. If you are using Ant 1.6.2 or later, you can use the roundup attribute of the task to make it consider your archived files out of date. Note that it may now always do so. Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- / Alexey N. Solofnenko home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ant way to get multiple inputs from user until condition is met
I am not sure how you are going to save the addresses, but with scriptdef you can implement this logic. - Alexey. Corey Ellis wrote: Hi, I need to ask the user for 1 or more ipaddresses. I want to stop asking when the user enter's return without providing any data. I looked at the foreach task but I have to set a limit in order for this to work. Any clean way using Ant to allow this scenario. I would like to see something like this. while(!done) { Ask for ip and port if (done) break } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- / Alexey N. Solofnenko home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with SSHEXEC and nohup
The command does not work, because you need to redirect STDxxx file handles to /dev/null (or some file(s)) first. You may also need to run a script interpreter first, or create a separate script in order to be able to redirect STDxxx handles. - Alexey. Dave Bartmess wrote: I'm trying to do a four-task parallel call, using sshexec to call the remote builds. Each build is a replica of the calling build, just on a different platform. The build script portion is below. The problem is, when ant executes the sshexec task, despite what I put in the remotebuild.sh, such as nohup ... (insert command for ...) or send the command through sshexec as nohup remotebuild.sh 2gt;amp;1 gt;build.log amp;, it won't work. It waits for the build command inside the remotebuild.sh to complete, no matter if the build command itself is nohup'd, or the sshexec command is nohup'd. I could use some help. I've tried every alternative I could think of... Thanks! * (WITH nohup in the ssh'd command) local build script: target name=build-linux sshexec command=nohup ./remotebuild.sh ${product.name} ${build.number} 2gt;amp;1 gt;build.log amp; username=${Linux.build.user} host=${Linux.build.host} keyfile=${env.HOME}/.ssh/id_dsa trust=true/ /target remote build script: cvs co -A $PRODUCT ./build installer.xml -Dbuild.number=$2 installer exit * (WITH nohup in the remote command script) local build script: target name=build-linux sshexec command=./remotebuild.sh ${product.name} ${build.number} username=${Linux.build.user} host=${Linux.build.host} keyfile=${env.HOME}/.ssh/id_dsa trust=true/ /target remote build script: cvs co -A $PRODUCT nohup ./build installer.xml -Dbuild.number=$2 installer 21 build.log exit * -- / Alexey N. Solofnenko home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Your ideas about annotations
Hello, I am thinking about adding generic annotations for targets and tasks to specify arbitrary meta data that can be used by different executors or other code (for example, to be able to specify what targets should not be executed in parallel by parallel executor). There is a discussion about ways to specify them. What do you think: [ ] Processing instructions (for example, ?group name=linux-build?) - most tools, IDEs should not be updated, because PIs are usually invisible to XML parsers (unless the parsers ask for PIs). Cons: people do not like PIs, it may be more difficult to generate or to act upon in generic tools. [ ] Special nodes (for example, ann:group xmlns:ann=http://ant.apache.org/annotations; name=linux-build/; ann namespace can be defined globally) specified before (or inside, looks less pretty, but generic tools will like them inside more) XML nodes. [ ] Other... Your ideas are welcome. - Alexey. -- / Alexey N. Solofnenko home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]