RE: AW: AW: Reversing a list

2009-08-05 Thread Raagu
Hello people I have used javascript code written above and i gave new proerty name for each iteration while calling javascript scriptdef.. It works fine.. Thanks for useful replies :) Joshua Wunder-2 wrote: > > For these situations I like to use the following: > > http://ant-contrib.sourc

Re: Process File?

2009-08-05 Thread Avlesh Singh
Well, no text file be read and processed in this manner. However, you can always create a JAVA property file, and have key value pairs which you can use inside ANT targets. and, your dependency properties might look like this - jar_1 = my-dependency-jar-1.jar jar_2 = my-dependency-

Process File?

2009-08-05 Thread Sam
I was wondering if this was feasible in ant. I was thinking of having the list of dependencies listed somewhere say in: ant/dependencylist.txt for example. I'd like to have ant read the text file and build a fileset then for each entry in the depenendancy.txt I'd pass a line to my jar target

Re: sshexec

2009-08-05 Thread Eric Fetzer
In order to fix this, I had to write a macrodef that strips the last character (no matter what it is being that you can't test for it):                       I would consider the behavior of sshexec a bug.  Anyone else... From: Eric Fetzer

RE: converting slashes in attributes of script tasks in macrodefs

2009-08-05 Thread Martin Gainty
possibly taskdef org/apache/tools/ant/util/FileUtils.java http://www.docjar.com/html/api/org/apache/tools/ant/util/FileUtils.java.html call normalize method e.g. clean_path=FileUtils.normalize(String path) on path to clean it then set clean linted path to property *Gruss* Martin ___

Re: equals condition issue

2009-08-05 Thread Eric Fetzer
I believe this to be the same issue as I am having with sshexec putting a linefeed, cr, or both. If this antuser would have put an echo on his property like so: He would have seen that there's a cr stuck in there. It does the same with output when you put it in a text file. I had it do that,

converting slashes in attributes of script tasks in macrodefs

2009-08-05 Thread MichaelStgt
I have the following problem with ant 1.7.1 on windows example where the first / of property2 ist first converted plattformspecifc to \ because ${basedir} is used and then dropped inside the javascript. How can I avoid this, that i have the original value inside the script? Output: [echo

Re: sshexec

2009-08-05 Thread Eric Fetzer
I tried:         But it doesn't seem to work on newline/cr stuff...  This is nuts, is what I'm trying to do really all that tough? From: Eric Fetzer To: Ant Users Sent: Wednesday, August 5, 2009 11:10:36 AM Subject: sshexec So sshexec is adding a carriag

sshexec

2009-08-05 Thread Eric Fetzer
So sshexec is adding a carriage return to the outputproperty when run from winders.  Is there a way to strip this off of the end of a property in ant?  Here's a small repro: test.sh: echo "error" | tr '\n' '' | tr '\r' '' exit 0 testSshExec.xml             Run from winders machi

RE: AW: AW: Reversing a list

2009-08-05 Thread Joshua Wunder
For these situations I like to use the following: http://ant-contrib.sourceforge.net/tasks/tasks/variable_task.html -Original Message- From: Raagu [mailto:rknilekani2...@gmail.com] Sent: Wednesday, August 05, 2009 16:36 To: user@ant.apache.org Subject: Re: AW: AW: Reversing a list "Try

Re: Calling CYGWIN from Ant in XP

2009-08-05 Thread Eric Fetzer
Thanks for the response Martin.  I ended up going a different route before you replied.  I found sshexec and put the script directly on the Unix machine rather than leaving it in my Cygwin and it worked well.  Here's what I ended with:                

Re: Reversing a list

2009-08-05 Thread David Weintraub
Well, if you don't mind using the AntContrib package, you could do this using the AntContrib's , , and the tasks to build the string. I haven't tested it, but it would look something like this:

Re: Need Suggestion in build.properties

2009-08-05 Thread Chris Green
rather than On Wed, Aug 5, 2009 at 3:37 PM, Haiqi Wei wrote: > works for me. > > -Haiqi. > > > On Wed, Aug 5, 2009 at 6:20 AM, Rajesh Kumar (IN4774) < > rajesh_kum...@mindtree.com> wrote: > > > I am trying to use variable defined in build.properties file in Solaris > > Machine but below sc

Re: Need Suggestion in build.properties

2009-08-05 Thread Haiqi Wei
works for me. -Haiqi. On Wed, Aug 5, 2009 at 6:20 AM, Rajesh Kumar (IN4774) < rajesh_kum...@mindtree.com> wrote: > I am trying to use variable defined in build.properties file in Solaris > Machine but below script is not working > > > > Please suggest. > > Regards, > Rajesh > > >

Re: Need Suggestion in build.properties

2009-08-05 Thread David Weintraub
On Wed, Aug 5, 2009 at 7:20 AM, Rajesh Kumar (IN4774) < rajesh_kum...@mindtree.com> wrote: > I am trying to use variable defined in build.properties file in Solaris > Machine but below script is not working > > > Do you mean "*.*build.properties" (note the preceding period) or simply " build.pr

Re: AW: Reversing a list

2009-08-05 Thread Raagu
Ok.. But in my script i cant assign newlist values to a property because In my script newlist values will change dynamically over many iteration and i need process.. Other than assigning to a property Is there any other options ??? glenn opdycke-hansen wrote: > > Ant properties are immutable

Re: Need Suggestion in build.properties

2009-08-05 Thread Chris Green
try removing the dot before build. Might help On Wed, Aug 5, 2009 at 12:20 PM, Rajesh Kumar (IN4774) < rajesh_kum...@mindtree.com> wrote: > I am trying to use variable defined in build.properties file in Solaris > Machine but below script is not working > > > > Please suggest. > > Regards, > Raj

Need Suggestion in build.properties

2009-08-05 Thread Rajesh Kumar (IN4774)
I am trying to use variable defined in build.properties file in Solaris Machine but below script is not working Please suggest. Regards, Rajesh http://www.mindtree.com/email/disclaimer.html

Re: AW: Reversing a list

2009-08-05 Thread glenn opdycke-hansen
Ant properties are immutable, once the property is given a value that value cannot be changed. See http://ant.apache.org/manual/CoreTasks/property.html I believe the suggestion was to define a new property (with a new name). The value of the new property can then be assigned. -glenn

RE: AW: Reversing a list

2009-08-05 Thread Rebhan, Gilbert
P.S. : using $attributes.get('in').split(',') because i assumed your list is given comma separated, f.e. like being set via Regards, Gilbert -Original Message- From: Rebhan, Gilbert Sent: Wednesday, August 05, 2009 3:42 PM To: 'Ant Users List' Subject: RE: AW: Reversing a list

RE: AW: Reversing a list

2009-08-05 Thread Rebhan, Gilbert
-Original Message- From: Raagu [mailto:rknilekani2...@gmail.com] Sent: Wednesday, August 05, 2009 3:17 PM To: user@ant.apache.org Subject: Re: AW: Reversing a list /* [..] How can i access the the newlist here (outside task) I tried ${list} But it is giving old values .

Re: AW: AW: Reversing a list

2009-08-05 Thread Raagu
"Try giving the property a new name" I didnt get this.. pls can u explain ?? Jan.Materne wrote: > >>How can i access the the newlist here (outside task) >>I tried ${list} >>But it is giving old values .. which is set initially.. >>please do reply. > > Maybe you are not doing a

AW: AW: Reversing a list

2009-08-05 Thread Jan.Materne
>How can i access the the newlist here (outside task) >I tried ${list} >But it is giving old values .. which is set initially.. >please do reply. Maybe you are not doing anything wrong. Properties in Ant are immutable. Try giving the property a new name. Jan

Re: AW: Reversing a list

2009-08-05 Thread Raagu
Hey Thanks for awesome reply.. I have done the same procedure.. I have included groovy jar file n excuted groovy codes within tags.. Now I am not getting How to pass a variable from to the main script.. i,e How Do i access a variable outside tag.. The variable is set within tag.. Here is the

AW: Reversing a list

2009-08-05 Thread Jan.Materne
I dont know any core tasks. Maybe there are external tasks for that. Alternatively you could implement your own. Jan The original list : ${list} filtered

Reversing a list

2009-08-05 Thread Raagu
Hello People I have a written a ant script which has a variable say "list" which contains list of names say name1,name2,ant,forum,nabble . All r comma separated.. I want to reverse this list such dat , after reversing "list" should give me nabble,forum,ant,name2,name1.. And also Is there

RE: Search for folders and access them

2009-08-05 Thread Redondo Gallardo, Raul Maria
Thank you very very much, I'll try it. -Mensaje original- De: jan.mate...@rzf.fin-nrw.de [mailto:jan.mate...@rzf.fin-nrw.de] Enviado el: miércoles, 05 de agosto de 2009 10:45 Para: user@ant.apache.org Asunto: AW: Search for folders and access them In Ant you usually have ONE action whi

AW: Search for folders and access them

2009-08-05 Thread Jan.Materne
In Ant you usually have ONE action which processes a bunch of resources. E.g. instead of iterating over a fileset and copying each individual file you have There are many tasks which support filesets, paths or resource collections. A resource collection (as the most abstract type of these res

RE: Search for folders and access them

2009-08-05 Thread Redondo Gallardo, Raul Maria
Thank you very much Jan, In this way how can I process this fileset to get the path to move to the folder and then do something? Is this possible? Sorry, I'm new with ANT and I've looking for the help about fileset but not understand it well. Thank you very much. Raúl -Mensaje origin

AW: Search for folders and access them

2009-08-05 Thread Jan.Materne
Ant does "not go into" a folder. It scans them. You could define a which returns only the paths to these files: Here the wildcard "**" is interesting: every subdirectory including recursive. If you only want the directories directly under "." choose the "*" wildcard. Jan >-Ursprünglic

Search for folders and access them

2009-08-05 Thread Redondo Gallardo, Raul Maria
Hello Users, I'm working with a folders hierarchy and I don't know the names of the subfolders. Is it possible with ANT to go into every subfolder which exist or I must use an external application? I want to check every folder to see if contains a certain file and do things depending the fi