RE: extract file date in a given format

2007-01-04 Thread Rebhan, Gilbert
Hi, -Original Message- From: T E Schmitz [mailto:[EMAIL PROTECTED] Sent: Thursday, January 04, 2007 11:32 PM To: user@ant.apache.org Subject: extract file date in a given format /* Also: could I combine the two scripts and return 2 properties if format is specified? */ i also used ja

AW: extract file date in a given format

2007-01-04 Thread Jan.Materne
> > > > > > >I also need the date in a human readable format. > >I tried to write a second script but am getting an >IllegalArgumentException on "new Date(millis)": > > > > > > > > Project: public String getProperty(String propertyName) You have to convert

RE: target timeout

2007-01-04 Thread Rebhan, Gilbert
Hi, can you give a short snippet to illustrate your problem ? i use limit like that and it works fine = put all my stuff that should be killed if not in time, f.e. ... ... if there are any sideeffects with your targets and antcall it's not a problem with the limit task itself. Regar

extract file date in a given format

2007-01-04 Thread T E Schmitz
Hello, I have a task which returns a file's date in epoch format (for use with 'touch'): I also need the date in a human readable format. I tried to write a second script but am getting an IllegalArgumentException on "new Date(millis)": Also: cou

Re: target timeout

2007-01-04 Thread martin sweitzer
On 12/22/06, martin sweitzer <[EMAIL PROTECTED]> wrote: On 12/22/06, Gilbert Rebhan <[EMAIL PROTECTED]> wrote: > Hi, > > martin sweitzer wrote: > > Is there a way to have a timeout associated with a ? > > I would like to put an upper bound on the time a target can run. I > > you can go with the

RE: Resource Collections in 1.7

2007-01-04 Thread Rebo, Alex
Thank you, Matt, will try looping from ant-contrib. One thing I noticed running Ant: [antlib:org.apache.tools.ant] Could not load definitions from resource org/apach e/tools/ant/antlib.xml. It could not be found. Do you know what might cause it and what overall impact it has? Here's diagnostics:

Fwd: RE: Resource Collections in 1.7

2007-01-04 Thread Matt Benson
oops--fwding to list: --- Matt Benson <[EMAIL PROTECTED]> wrote: > Date: Thu, 4 Jan 2007 11:29:44 -0800 (PST) > From: Matt Benson <[EMAIL PROTECTED]> > Subject: RE: Resource Collections in 1.7 > To: "Rebo, Alex" <[EMAIL PROTECTED]> > > > --- "Rebo, Alex" <[EMAIL PROTECTED]> wrote: > > > No pro

RE: Resource Collections in 1.7

2007-01-04 Thread Rebo, Alex
No problem :) And for the future references, the answer is "no". So, to get a number of elements in the collection, say, fileset, I have to create an "empty" set (let's refer to it as fs2) and: ? That's sure one way to do things. However, looking at , implementing ResourceColle

Re: Resource Collections in 1.7

2007-01-04 Thread Matt Benson
--- "Rebo, Alex" <[EMAIL PROTECTED]> wrote: Any relation to Max? (sorry, couldn't resist...) > > >Hello, > > > >Could you, please, help me to understand how to > utilize Resource > >Collections? > > > >As an example, please, consider illustrating how > Ant task may verify the > >proper # of el

Re: Odd Behavior

2007-01-04 Thread Alasdair Young
I bought the book "Pragmatic Project Automation" and tried following the steps. (There is a free chapter online to do with CC) Unfortunately this book is outdated and many of the examples do not work, use deprecated methods etc. Getting CC working with subversion was also much more painful than i

Re: Odd Behavior

2007-01-04 Thread Res Pons
Thanks for this info. It would definitely come handy should I decide to go with CC. I find the CC's documentation somewhat outdated. There's no main/lib folder any longer, etc. I need to subscribe to their forums. I believe Steven mentioned he's using luntbuild, I am reading about it today.

Re: AW: Problem with startAnt()

2007-01-04 Thread Sungho Maeung
Hi, Thank you , Jan. but I tried and made one class that extends from Main , and added this exit() function as follows: --- class ExitAntMain extends org.apache.tools.ant.Main { /** * This operation is expected to call [EMAIL P

Resource Collections in 1.7

2007-01-04 Thread Rebo, Alex
>Hello, > >Could you, please, help me to understand how to utilize Resource >Collections? > >As an example, please, consider illustrating how Ant task may verify the >proper # of elements in a particular collection (say, number of files in a >fileset) or >operate only on a subset of elements tha

Re: AW: problem: jspc fails -- no public execute() method

2007-01-04 Thread [EMAIL PROTECTED]
Hi jan, Jan wrote: it with a new name. i assume you mean , right? do you have any ideas how i can tell *which* class ant actually uses for "jspc", i.e. which class is the problem class? thanks, bill milbratz [EMAIL PROTECTED] wrote: This issue lies in the nexus of tomcat and ant: jspc fa

default excludes in

2007-01-04 Thread paul . arzul
hi, using a slightly modified version of the last example: and without setting .setIncludes() or .setExcludes(), i'm picking up .cvsignore files. do default excludes not apply to .createDataType("fileset")? btw, the double space in that ex

Re: AW: AW: how to access/iterate id in

2007-01-04 Thread Steve Loughran
[EMAIL PROTECTED] wrote: 2) The java api of some types in ant were not really designed for ease of use. It's much easier to use instead of , e.g. Compare the execute()-implementation between [1] and [2]. ahh, but as of ant 1.7 everything is a resource, which is something you can iterat

Re: Odd Behavior

2007-01-04 Thread Steve Loughran
Alasdair Young wrote: Fixed it. (I spent 2 hours on this, and just after I hit send, I realise that there was one more place to check :) cruise control has a cruisecontrol/lib directory with ant.jar in it. You need to ensure that ant.jar, ant-junit.jar and junit.jar are all the right versions an

Re: Problem with startAnt()

2007-01-04 Thread Steve Loughran
Sungho Maeung wrote: Dear Ant User Group. I am having a problem to execute Ant via Java. After startAnt() executed, the Hello.xml was done successfully, but it does not go though the next step which supports to be printing out the output "Hello, it is done". another strange thing is when

AW: AW: how to access/iterate id in

2007-01-04 Thread Jan.Materne
>2) >The java api of some types in ant were not really designed for >ease of use. It's much easier to use instead of , e.g. Compare the execute()-implementation between [1] and [2]. Jan [1] http://ant.apache.org/manual/tutorial-tasks-filesets-properties.html#fil esets [2] http://ant.apache.

RE: setting source version in war file

2007-01-04 Thread Rebhan, Gilbert
put the version in the Manifest file ... META-INF/MANIFEST.MF as Jan already suggested you may also put the versionstring in the header of some html/jsp file to make it visible for the user/tester of your webapp if you want to read the Versionstring out of your Manifest later you could go with

Re: AW: how to access/iterate id in

2007-01-04 Thread Peter Reilly
On 1/4/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Quoting Peter Reilly <[EMAIL PROTECTED]>: > On 1/4/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Quoting [EMAIL PROTECTED]: > > > > > project.getProperty("source.dirs"); > > > > source.dirs is an id, not a property. i assume the dist

Re: AW: how to access/iterate id in

2007-01-04 Thread paul . arzul
Quoting Peter Reilly <[EMAIL PROTECTED]>: > On 1/4/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Quoting [EMAIL PROTECTED]: > > > > > project.getProperty("source.dirs"); > > > > source.dirs is an id, not a property. i assume the distinction is > important, > > since getProperty returns null

Re: AW: how to access/iterate id in

2007-01-04 Thread Peter Reilly
On 1/4/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Quoting [EMAIL PROTECTED]: > project.getProperty("source.dirs"); source.dirs is an id, not a property. i assume the distinction is important, since getProperty returns null (which is correct but unhelpful). You need to use project.getRefe

AW: AW: how to access/iterate id in

2007-01-04 Thread Jan.Materne
ok project.getReference() Jan http://svn.apache.org/repos/asf/ant/core/trunk/src/main/org/apache/tools/ant/Project.java >-Ursprüngliche Nachricht- >Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >Gesendet: Donnerstag, 4. Januar 2007 10:34 >An: Ant Users List >Betreff: Re: AW: how

AW: setting source version in war file

2007-01-04 Thread Jan.Materne
Oh - the use of manifest is not documented in the manual. extends , so you could use it. Jan >-Ursprüngliche Nachricht- >Von: Raghu [mailto:[EMAIL PROTECTED] >Gesendet: Donnerstag, 4. Januar 2007 10:35 >An: user@ant.apache.org >Betreff: setting source version

Re: AW: how to access/iterate id in

2007-01-04 Thread paul . arzul
Quoting [EMAIL PROTECTED]: > project.getProperty("source.dirs"); source.dirs is an id, not a property. i assume the distinction is important, since getProperty returns null (which is correct but unhelpful). - p - To unsubscri

setting source version in war file

2007-01-04 Thread Raghu
It is required for me to identify the source version of my war file. Example: Test.war- 1.0 version Test.war- 1.1 version Test.war- 1.2 version Imagine I made war file from build.xml. This war file if unjared then from manifest file I need to identify the version of source code

AW: how to access/iterate id in

2007-01-04 Thread Jan.Materne
project.getProperty("source.dirs"); The javadocs are not online at Apache, just on your local harddist - if you have build them ;-) Jan >-Ursprüngliche Nachricht- >Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >Gesendet: Donnerstag, 4. Januar 2007 10:14 >An: Ant Users List >Betre

how to access/iterate id in

2007-01-04 Thread paul . arzul
hi all, if someone could point me to relevant docs i would be grateful-- the ant api appears 404: i'm trying to access an ant id in javascript: but .getId is

AW: Problem with startAnt()

2007-01-04 Thread Jan.Materne
By default Main calls a System.exit(). You have to subclass it and overwrite exit(int). Jan Main.java:0238: /** Main.java:0239: * This operation is expected to call [EMAIL PROTECTED] System#exit(int)}, which Main.java:0240: * is what the base version does. Main.java:0241: *

AW: problem: jspc fails -- no public execute() method

2007-01-04 Thread Jan.Materne
>This issue lies in the nexus of tomcat and ant: jspc fails >with this message when I try to build tomcat from source: > >/usr/local/jakarta-tomcat/apache-tomcat-5.5-svn/build/build.xml:429: >No public execute() in class org.apache.jasper.JspC > >Why? The source code clearly has an 'execute()'