Re: Redirecting output to a file

2007-02-23 Thread Wayne Cannon
I'm new to ant, but can the Log4jListener combined with log4j's HTMLAppender be used for this? --Wayne Scot P. Floess wrote: Try this: If you are interested, I also have some XSLT that will convert the output to HTML in a nice format :) Priest, James (NIH/NIEHS) [C] wrot

RE: symlink task

2007-02-23 Thread Marcus Zafarano
Yes, I have done that, but the problem is the 1st time a system is setup the symlinks are not there, hence I need to see if it fails or the symlinks exists then if they don't then create them Right now I have the brute force why with failonerror=false, which is not good. Thanks -mez -Origina

RE: symlink task

2007-02-23 Thread Anderson, Rob (Global Trade)
You can do that with Ant. http://ant.apache.org/manual/index.html Let us know if we can help with any questions. -Rob Anderson > -Original Message- > From: Marcus Zafarano [mailto:[EMAIL PROTECTED] > Sent: Friday, February 23, 2007 10:36 AM > To: user@ant.apache.org > Subject: symlink

Re: Get copied fileset

2007-02-23 Thread Antoine Levy-Lambert
Hello James, there is no direct way to extract from the copy task these files. what do you want to do once you have found the set of files which are getting copied. Some tasks work with filesets and mappers. Applying a mapper to the "new.files" fileset will give you what you want. Also have

Get copied fileset

2007-02-23 Thread James Oltmans
Is there any way to create a fileset from the copy task that lists the files that were copied into the todir? Here's the code snippet: --

RE: Redirecting output to a file

2007-02-23 Thread Priest, James (NIH/NIEHS) [C]
Sweet that worked!!! In hindsight I should have looked up the exec task on the Ant site :\ output Name of a file to which to write the output. If the error stream is not also redirected to a file or property, it will appear in this output. Thanks much!! Jim > -Original M

Re: Redirecting output to a file

2007-02-23 Thread Scot P. Floess
Try this: If you are interested, I also have some XSLT that will convert the output to HTML in a nice format :) Priest, James (NIH/NIEHS) [C] wrote: I'm trying to get Ant to build a SVN log file: svn log -v --xml > logfile.log The ">" seems to be causing problems - so I d

Redirecting output to a file

2007-02-23 Thread Priest, James (NIH/NIEHS) [C]
I'm trying to get Ant to build a SVN log file: svn log -v --xml > logfile.log The ">" seems to be causing problems - so I dug around and found this: http://ant.apache.org/faq.html#shell-redirect-1 But despite various trys using > and various combos of single and double quotes I can't make it wo

symlink task

2007-02-23 Thread Marcus Zafarano
Hi, I want to check to see if a symlink exists 1st, and if it does not then create it. Also want to check if exists then update with other info. Thanks if advance

RE: Help with running different target based on user input?

2007-02-23 Thread KDuffy
Kevin Duffy eScholar White Plains, NY 914-989-2983

RE: Help with running different target based on user input?

2007-02-23 Thread Priest, James (NIH/NIEHS) [C]
Actually playing around with using depend - I think I can just eliminate the user input entirely... :) Now that I look at it - it seems redundant when you can just determine what gets run by picking the appropriate target... Thanks again! Jim > -Original Message- > From: RADEMAKERS Tangu

RE: Help with running different target based on user input?

2007-02-23 Thread RADEMAKERS Tanguy
>Thanks for all the help!! Your name looks familiar - you are on the >CFEclipse mailing list as well aren't you? :) My pleasure, and, yes, i am indeed on the CFE list (usually posting things like "you can do that with ant!") /t ---

RE: Help with running different target based on user input?

2007-02-23 Thread RADEMAKERS Tanguy
Hey James, Just a last disclaimer/whatnot: it's worth mentioning that is not meant to be used as a poor man's "goto" - it's more about allowing you to reuse an existing target, optionally with different properties. Ant scripts can get pretty hairy even when you do everything "by the book" (becau

RE: Help with running different target based on user input?

2007-02-23 Thread Priest, James (NIH/NIEHS) [C]
Thanks!! I figured out how in CFEclipse to run individual targets which is more inline with your example - I'm going to rebuild my build file so I can do as you suggested and have: 1) build-tables 2) build-table-with-reqdata (depend 1) 3) build-table-with-peopledata (depend 1,2) 4) build-everythi

RE: Help with running different target based on user input?

2007-02-23 Thread Priest, James (NIH/NIEHS) [C]
Okay - gotcha. For what I need now it's OK but I see where you are going... I'll copy my current code and rework it using 'depend' and see if I can make it work... I can see how that would be very flexible! Thanks! Jim > -Original Message- > From: RADEMAKERS Tanguy [mailto:[EMAIL PRO

RE: Help with running different target based on user input?

2007-02-23 Thread RADEMAKERS Tanguy
do you think you'll ever want to run script 3 *without* running script 4? 'Coz if you do, antcall is not the way to go - just make the script 4 target depend on the script 3 target. That way, if you want to run just script 3, you just call "ant script3", otherwise you call "ant script4", which will

RE: Help with running different target based on user input?

2007-02-23 Thread Priest, James (NIH/NIEHS) [C]
> -Original Message- > From: RADEMAKERS Tanguy [mailto:[EMAIL PROTECTED] > Ant is not a scripting language... assuming that "run script > four" is a target in your build file, you could call it from > within another target using the task. You should > also look into the AntContrib thi

RE: Help with running different target based on user input?

2007-02-23 Thread RADEMAKERS Tanguy
i'm not too sure i understand what you mean by "chain dependencies together". In ant, a target can depend on more than one other targets (just pass a comma separated list) and ant handles generating the graph of dependent targets for you (so if target c depends on target b which depends on target a

RE: Help with running different target based on user input?

2007-02-23 Thread Priest, James (NIH/NIEHS) [C]
One last question :) Is there a way to chain the dependencies together? So I'll run Script 1 and 2... Then prompt for them to run Script 3... If they run Script 3 they should be prompted if they want to run script 4 - otherwise the build should just stop. Thanks, Jim -

RE: Help with running different target based on user input?

2007-02-23 Thread Priest, James \(NIH/NIEHS\) [C]
Glad you revised your entry - I was going to email you back that it didn't work :) Your second version was the ticket!! I had something similar at one point but I had my depends and if logic a bit mixed up... This works great! I need to go back and read the conditions docs again now that I have

RE: Help with running different target based on user input?

2007-02-23 Thread RADEMAKERS Tanguy
after a more careful reading of your mail ;P - D:\scrap\ant>ant Buildfile: build.xml ask_script3: [input] Populate people tables with test data? (run script3)(y,n) n script3: BUILD SUCCES

RE: Help with running different target based on user input?

2007-02-23 Thread RADEMAKERS Tanguy
Hello James, You should put the input tasks within the target blocks that "consume" the inputted info: mailto:[EMAIL PROTECTED] >Sent: Friday, February 23, 2007 2:13 PM >To: user@ant.apache.org >Subject: Help with running different target based on user input? > >I'm just gett

Help with running different target based on user input?

2007-02-23 Thread Priest, James \(NIH/NIEHS\) [C]
I'm just getting started using Ant (from within Eclipse) to help deploy my ColdFusion projects and Oracle sql scripts. I've had great success so far but I have finally ran into a problem I can't figure out. I'm trying to run some Oracle scripts - but would like to prompt the user while running th

Re: How to compile jsp files with ANT

2007-02-23 Thread Rashmi Rubdi
Thank you for your reply, I will start reading those chapters and the presentation, I think it should be fairly simple to understand since I'm already familiar with the concepts. I think, now there's a new and better way to write JSPs using JSTL tags or custom tags. Perhaps, Cactus tests coul

RE: Using ant to parse text file

2007-02-23 Thread Rebhan, Gilbert
Hi, > Example:- If I was to provide the value "Test2", I would like the Ant > to search for "Test2" in the file, and return the value "blue". If I > provide the value - "Test3", it should return the value "green" with less coding, you need = bsf.jar (Bean Scripting Framwork) http://jakarta.ap

RE: empty string is interpreted as arg to java program

2007-02-23 Thread Mikael Petterson (KI/EAB)
Hi, This is what ant shows. And the java program will interpret it as an arg. Maybe I have to change the java program how args are interpreted. Or any other suggestions? Cheers, //mikael [java] '' [java] [java] The ' characters around the executable and arguments are [

AW: Problem : javac ANT Task

2007-02-23 Thread Jan.Materne
This is a behaviour of Suns java compiler which Ant uses under the hood. I dont know if there is any (external) task to use the Eclipse compiler, which could that job. Another approach is compiling each java source for its own (I did a very small example four years ago [1]). Jan [1] http://m

AW: empty string is interpreted as arg to java program

2007-02-23 Thread Jan.Materne
Start Ant with "-d" or "-v" option and you'll get the command which is used for . Jan >-Ursprüngliche Nachricht- >Von: Mikael Petterson (KI/EAB) [mailto:[EMAIL PROTECTED] >Gesendet: Freitag, 23. Februar 2007 09:08 >An: user@ant.apache.org >Betreff: empty string is interpreted as arg to

AW: variable "target name"

2007-02-23 Thread Jan.Materne
A task could use its getOwningTarget() method for retrieving that information. Because of property immutability that cant be stored in a property. And having parallel targets you'll get troubles ... Jan >-Ursprüngliche Nachricht- >Von: Antoine Levy-Lambert [mailto:[EMAIL P

AW: Using ant to parse text file

2007-02-23 Thread Jan.Materne
I played a little bit ... import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Task; public class LoadGroupTask extends Task { String prefix; File file; String section;