Re: AW: ant property

2005-02-25 Thread Douglas Kramer
James Fuller wrote: Douglas Kramer wrote: I'd like to set up my Ant script to load one set of paths if I'm building on one machine and a different set of paths when building on a another machine. this can be achieved in a variety of ways; Good, thanks. In build.propert

Re: AW: ant property

2005-02-25 Thread Douglas Kramer
I'd like to set up my Ant script to load one set of paths if I'm building on one machine and a different set of paths when building on a another machine. In build.properties I have: run.classpath.javadoc="${JAVA_HOME}/lib/tools.jar" run.classpath.mifdoclet="${WORKDIR}/build/jar/mifdoclet.jar" My sc

Re: Ant Tutorial - Question

2005-02-14 Thread Douglas Kramer
Venki, Try this instead. Yes, you need a method named "main" as follows: public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World"); } } More details: http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html -Doug [EMAIL PROTE

Re: AW: copy all but exclude one directory

2005-02-08 Thread Douglas Kramer
Thanks. Is there a difference between these two sets: -Doug [EMAIL PROTECTED] wrote: BACKUP is a file BACKUP/ or BACKUP/** is a directory Jan -Ursprüngliche Nachricht- Von: Douglas Kramer [mailto:[EMAIL PROTECTED] Gesendet am: Dienstag, 8. Februar 2005 22:37 An

Re: copy all but exclude one directory

2005-02-08 Thread Douglas Kramer
looks like including files below BACKUP is stronger than excluding the top-level directory BACKUP) Dominique Devienne wrote: From: Douglas Kramer [mailto:[EMAIL PROTECTED] Use --DD - To unsubscribe, e-ma

Ant: copy all but exclude one directory

2005-02-08 Thread Douglas Kramer
I haven't gotten a reply yet, so I'll try again. Does anyone see any syntax or logic mistakes in this fileset? I have this structure: ${WORKDIR} | +-BACKUP +-DIR1 +-DIR2 +-file1 +-file2 How would I recursively copy all files and dirs below ${WORKDIR} exc

Re: Ant: mkdir if none exists

2005-02-07 Thread Douglas Kramer
ACKUP: -Doug Ninju Bohra wrote: The fact that you getting an additional BACKUP directory created is very strange... I believe the that contents of the ${WORKDIR} are different than you believe...it seems un-believable that the would create an additional level. Later, Ninju --- Douglas Kramer &l

Ant: mkdir if none exists

2005-02-06 Thread Douglas Kramer
I have this mkdir statement, but on Solaris, if BACKUP already exists, it creates a BACKUP directory inside of it: BACKUP/BACKUP I believe this creates a directory only if one doesn't exist. Is there a simpler way to do it all in one task? -Doug --

Re: Skip building jar file

2005-02-03 Thread Douglas Kramer
Thank you! That works, and speeds things up a lot. -Doug Conor MacNeill wrote: Remove the line where you delete it. Ant should then not bother rebuilding it if none of the files has changed. Douglas Kramer wrote: Novice question. My ant script works great, skipping compile if source files have

Skip building jar file

2005-02-03 Thread Douglas Kramer
Novice question. My ant script works great, skipping compile if source files have not changes, and skipping copying of resources if they have not changed. How would I prevent building the jar file if nothing has changed? -Doug -

Re: properties, path with trailing \\

2005-02-03 Thread Douglas Kramer
Dominique Devienne wrote: -Original Message- From: Rebhan, Gilbert [mailto:[EMAIL PROTECTED] Well, IMO that's a real gotcha for WinUsers, as they are used to write '\' instead of '/' and normally (my\normal/path\foo/bar) it doesn't matter whether you write \ or / or mixed I've seen those be

Re: Ant: pathelement relative?

2005-02-02 Thread Douglas Kramer
(I have substantial reasons for calling javadoc by call java on java.Main) -Doug Matt Benson wrote: --- Douglas Kramer <[EMAIL PROTECTED]> wrote: SunOS (Solaris 9 on SPARC) % uname -a SunOS dooghome 5.9 Generic_112233-12 sun4u sparc SUNW,Sun-Blade-100 Follow-up question -- h

Re: Ant: pathelement relative?

2005-02-02 Thread Douglas Kramer
att Benson wrote: --- Douglas Kramer <[EMAIL PROTECTED]> wrote: SunOS (Solaris 9 on SPARC) % uname -a SunOS dooghome 5.9 Generic_112233-12 sun4u sparc SUNW,Sun-Blade-100 Follow-up question -- how do I provide an absolute path Assuming that /Users/programs/jdk1.5.0/lib/tools.jar exists,

Re: Ant: pathelement relative?

2005-02-02 Thread Douglas Kramer
SunOS (Solaris 9 on SPARC) % uname -a SunOS dooghome 5.9 Generic_112233-12 sun4u sparc SUNW,Sun-Blade-100 Follow-up question -- how do I provide an absolute path -Doug Matt Benson wrote: what OS are you running on? -Matt --- Douglas Kramer <[EMAIL PROTECTED]> wrote: Does pathelemen

Ant: pathelement relative?

2005-02-02 Thread Douglas Kramer
Does pathelement take only a relative path? This page: http://ant.apache.org/manual/using.html#projects says: The location attribute specifies a single file or directory relative to the project's base directory (or an absolute filename), I assume "absolute filename" me

Re: PropertyFile task is optional?

2005-01-31 Thread Douglas Kramer
x27;s optional tasks where in optional.jar. With ant 1.6, all the optional tasks are in ant-*.jar, where * is a short-name for the library the task depends on. Some optional tasks do not depend on any third party library and are in ant-nodeps.jar Peter Douglas Kramer wrote: Thanks for replying. Pe

Re: PropertyFile task is optional?

2005-01-31 Thread Douglas Kramer
Thanks for replying. Perhaps I wasn't clear enough to get to my central confusion. Just some follow-up questions here. Stefan Bodewig wrote: On Fri, 28 Jan 2005, Douglas Kramer <[EMAIL PROTECTED]> wrote: I'm new to Ant and have been wanting to understand optional tasks better

Re: Ant: create file if none exists

2005-01-29 Thread Douglas Kramer
Found "unless" attribute of target. This simpler version works if ${MYFILE} resource is a file or directory, but fails if a symlink (which is what I devised this for). Am bummed out. -Doug Douglas Kramer wrote: Okay, try again. Need to create a file (

Ant: create file if none exists

2005-01-29 Thread Douglas Kramer
Okay, try again. Need to create a file (actually a symlink) if none exists. Is there a way to set a property true if a resource does *not* exist? DETAIL The dosomething task will do something only if the file exists. I tried usi

Re: Ant: file exists

2005-01-29 Thread Douglas Kramer
For the curious, this is it. When calling the run task, a symlink is created if it does not exist. Douglas Kramer wrote: Thanks. Okay, great so far... but I also need to excute a statement if the property

Re: Ant: file exists

2005-01-29 Thread Douglas Kramer
Thanks. Okay, great so far... but I also need to excute a statement if the property is true, something like this: if [ -f filename ]; then echo "File exists"; fi -Doug Erik Hatcher wrote: On Jan 29, 2005, at 3:40 PM, Douglas Kramer wrote: Is there a way to test whether a f

Ant: file exists

2005-01-29 Thread Douglas Kramer
Is there a way to test whether a file exists? I googled ant.apache.org for "file exists", looked at conditional, etc to no avail. -Doug - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Ant: Redirect output to both screen and log file

2005-01-29 Thread Douglas Kramer
When I use and specify output, all the output is redirected from the display to the log file. I want to be able to also view the output as it runs. Is there any way to send both standard out and standard error simultaneously to both a log file and the display? I'm basically looking for the equ

Re: PropertyFile task is optional?

2005-01-28 Thread Douglas Kramer
Stefan Bodewig wrote: On Fri, 28 Jan 2005, Matt Benson <[EMAIL PROTECTED]> wrote: Indeed, I have myself wondered (though I never have bothered to bring it up) why propertyfile and echoproperties are an optional tasks when they have no external dependencies? Any old-timers have any insights? Unles

Re: java task - invalid flag

2005-01-27 Thread Douglas Kramer
Thanks for your help. A comment below. Dominique Devienne wrote: -Original Message- From: Douglas Kramer [mailto:[EMAIL PROTECTED] Sent: Thursday, January 27, 2005 4:53 PM To: user@ant.apache.org Subject: Ant: java task - invalid flag The following java task fails with this error: javadoc

Re: Ant: java task - invalid flag

2005-01-27 Thread Douglas Kramer
Matt Benson wrote: --- Douglas Kramer <[EMAIL PROTECTED]> wrote: The following java task fails with this error: javadoc: error - invalid flag: -doclet com.sun.tools.doclets.formats.mif.MIFDoclet which is a perfectly valid option for javadoc. [SNIP] Could something be wrong with the lines? C

Ant: java task - invalid flag

2005-01-27 Thread Douglas Kramer
The following java task fails with this error: javadoc: error - invalid flag: -doclet com.sun.tools.doclets.formats.mif.MIFDoclet which is a perfectly valid option for javadoc. Notice java calls javadoc Main, which then

Re: Ant: get today's date and replace old date

2005-01-26 Thread Douglas Kramer
Douglas Kramer wrote: PROBLEM 1: I want to set the date in the version.properties file of my project. In the past I've used this Unix command to get today's date: DATE=`date '+%d %b %Y'` // 26 Jan 2005 That is, how can I set the date and assign it to a variable in An

Ant: get today's date and replace old date

2005-01-26 Thread Douglas Kramer
PROBLEM 1: I want to set the date in the version.properties file of my project. In the past I've used this Unix command to get today's date: DATE=`date '+%d %b %Y'` // 26 Jan 2005 That is, how can I set the date and assign it to a variable in Ant? PROBLEM 2: Then I want to replace the date