Checking for files in a directory

2007-03-13 Thread Shankar S

Hi,

Is there a way in ANT where I could check if a list of files is
available/present in a directory instead of having a long list of
s under ?
Any help will be much appreciated.

-Shankar


Re: Checking for files in a directory

2007-03-13 Thread Shankar S

OK let me put it this way .. intead of having 50 
for 50 files which makes my build file look ugly .. I want something like
define the list of files in a property file and check something like
  check if the directory contains all
the files

-Shankar


On 3/14/07, James Oltmans <[EMAIL PROTECTED]> wrote:


Have you tried something like the following?

  
 
   
   
...
 
  


-Original Message-
From: Shankar S [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 13, 2007 6:59 PM
To: user@ant.apache.org
Subject: Checking for files in a directory

Hi,

Is there a way in ANT where I could check if a list of files is
available/present in a directory instead of having a long list of
s under ?
Any help will be much appreciated.

-Shankar

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: [SEC=UNCLASSIFIED] Junit test fails in ant but not in Eclipse

2007-03-14 Thread SHANKAR S

Hi,
  
Your best bet is to debug it with Eclipse but NOT using the Eclipse
junit tool.
Change the ant junit target, add these jvmargs to the junit target








Here I am using 8787 port for debugging which should be a free port on your
machine.

When the ant reaches this task, it will wait (because suspend=y), now from
Eclipse, launch a "Remote Java Application" debug with Connection Properties
set as localhost and 8787. Set breakpoints wherever required.

Hope this helps!

Mikael Petterson (KI/EAB) wrote:
> 
> Hi,
> 
> I run a junit test ( junit 3.8.1 in both) in Eclipse it works just fine.
> Then I run the test in Ant using:
> 
> 
>fork="on" failureproperty="junit_test_failed" forkmode="perBatch">
> 
>  value="-Demma.coverage.out.file=${coverage.dir}/coverage.emma" /> 
>  
> 
>  
>  
>  
>  
>  
>
>
>
> 
>  
>   
>   
>   
>   
>   
>   
>  
> 
>
>
> 
> The test fails with an NullPointerException.
> 
> How are junit tests executed in ant?
> 
> Anyone knows if the jvm is restarted per suite or something. Since there
> must be differences in what objects are still in the environment.
> All ideas and hints are greatly appreciated!
> 
> Cheers,
> 
> //mikael
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Junit-test-fails-in-ant-but-not-in-Eclipse-tf3361400.html#a9479688
Sent from the Ant - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Deleting folders based upon status:(Re: AW: Checking for files in a directory)

2007-03-14 Thread Shankar S

thanks a tonne .. that's the nicest way 'cause my build.xml is not longer
dependent on these often changing o/p files ..
i was trying to do something like this
Get a list of subdirectiories
   Say my base directory is /ci ..and it has folders like /ci/RL_1_5_9 ,
/ci/RL_1_5_10 , /ci/RL_1_5_11
  and inturn under folder RL_1_5_9 i have 2007_15030945
 basically i have to go through status.txt present in these directories..
/ci/RL_1_5_9/2007_15030945, /ci/RL_1_5_9/2007_15031000
and if the status.txt has a string "FAIL" then I have to delete
2007_15030945,2007_15031000 directories.
Is there a cleaner way to do this in ANT or should I rely on the not so nice
way of having java scripts in my build.xml

-Shankar



On 3/15/07, Matt Benson <[EMAIL PROTECTED]> wrote:



--- [EMAIL PROTECTED] wrote:

> Just an idea ...
>
>  value="these;files;must;be;present"/>
> 
> 
>
> 
> 
>  includes="${includes}"/>
> 
> 
>

Of course by now Jan has realized that 
was the condition to use rather than .  ;)

Other thoughts:  if your list was e.g. 50 files as you
mentioned, especially if you think that list (I
believe you mentioned the idea of maintaining the list
in an external file) might change oftener than you'd
like to be modifying your Ant file, you might want to
make your Ant file be independent of the number of
files.  This is slightly problematical, but if you can
make the blanket assumption that your includesfile
contains no wildcards it's not too bad.  One example
assuming that ${basedir} contains an includesfile,
named includesfile:


  

  



  
    
  

  


HTH,
Matt

>
>
> Jan
>
> >-Ursprüngliche Nachricht-
> >Von: Shankar S [mailto:[EMAIL PROTECTED]
> >Gesendet: Mittwoch, 14. März 2007 01:59
> >An: user@ant.apache.org
> >Betreff: Checking for files in a directory
> >
> >Hi,
> >
> >Is there a way in ANT where I could check if a list
> of files is
> >available/present in a directory instead of having
> a long list of
> >s under ?
> >Any help will be much appreciated.
> >
> >-Shankar
> >
>
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>







Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.
http://answers.yahoo.com/dir/?link=list&sid=396546091

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Command Line execution

2007-03-22 Thread Shankar S

I want to invoke this command using ant's exec?

i've tried getting double qoutes but haven't suceeded

"C:/Program Files/InstallShield/InstallShield Professional
6.1/Program/ISBuild.exe"
-p"../RL_1_6_1_3/20070322_1451/installer/superstar2/superstar2install/SuperSERVER
VC 2003/SuperSERVER VC2003.ipr" -m"Default"
-b"../RL_1_6_1_3/package/SuperSERVER"

any help will be much appreciated ..


Re: tag inside some other tag(cvs)

2007-04-19 Thread Shankar S

Prasad,
Why don't you just do this?



 
 

   

 


If you are not clear with this then read about CVS tags by doing a quick
Google.

On 4/20/07, prasad kumar <[EMAIL PROTECTED]> wrote:


hi Tanguy,

  http://www.wincvs.org/wincvs_app.png

  from what ur showing in the picture,let us assume 'cvsgui' is module
name in HEAD tag.then i updated the 'cvsgui' module with clean copy option
from HEAD tag.ofter getting clean copy of 'cvsgui',i create the tag(let us
assume build_xxx) as follows:

  remote---> create a tag by  module-->tag name-->change from uncheck to
check "Overwrite existing existing tags with the same name"-->click ok

  why iam creating because to maintain all version of files in the
particular tag(build_xxx).with cvs it is possible 'One version of a file can
have multiple tags'
  like above.

  then come to ant,with ant i have written code to take fresh checkout

  
  


  but from above it  will take fresh checkout with existing(already
created) tag.i.e from HEAD.

  but i require to maintain all version of files in the particular
tag(build_xxx) ,ofter creating the this tag i have to take fresh checkout
from this tag(build_xxx).

  is it possible with ant to create new tag to maintain all version of
files in the particular tag(build_xxx)?

  i think there is no option in ant to create new tag,i chekced the ant
docs no option was available.

  if no option is there in ant,please respond becuase i need to give the
report to my superiors as saying "there is no option in ant to create new
tag to maintain all version of files in the particular tag(build_xxx)?"

  if any person knows,respond that's a great appreciation

  thanks,

  prasad





RADEMAKERS Tanguy <[EMAIL PROTECTED]> wrote:
  Hello Prasad,

OK, i have checked the WinCvs site, and it seems that WinCvs has a
window (they call it the "browser status window") that shows you which
cvs calls are being made as you use the tool.

In this picture:

http://www.wincvs.org/wincvs_app.png

it is the window at the bottom of the screen showing the text "cvs -z9
-q" etc etc etc.

Please carry out the *entire* series of cvs operations you wish to
automate with ant (this means start with a checkout), and copy and paste
the contents of this window (as text!) into a mail *directly to me* at
this address. If i can help you, i will, and i will copy the list on the
solution.

I am not promising anything! But i will try.

Regs,
/t

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Check out what you're missing if you're not on Yahoo! Messenger


vsscheckin task

2007-05-16 Thread Shankar S

Hi Folks,

I am trying to checkin a list of files using vsschekin task.
Here is the code snippet:


   

But it's complaining that the files path is an Invalid DOS path. Is it
because the file path has whitespaces?
Any workaround for this will be highly appreciated.

Cheers;
Shankar


sshexec

2007-09-05 Thread Shankar S
I have got the sshexec task in this format:



Ant throws up saying:

com.jcraft.jsch.JSchException: reject HostKey: xxx

Any help on this is much appreciated.

-Shanki


Re: sshexec

2007-09-05 Thread Shankar S
Ant Version: 1.6.5
jsch version: jsch-0.1.32.jarls
i can ssh into the host using putty ,,, OpenSSH_4.5p1, OpenSSL 0.9.8d 28 Sep
2006

Apache Ant version 1.6.5 compiled on June 2 2005
Buildfile: SC-Solaris-build.xml
Detected Java version: 1.4 in: c:\j2sdk1.4.2_10\jre
Detected OS: Windows 2003
parsing buildfile C:\ci\scripts\SC-Solaris-build.xml with URI =
file:///C:/ci/sc
ripts/SC-Solaris-build.xml
Project base dir set to: C:\ci\scripts
Build sequence for target(s) `SC-Solaris' is [SC-Solaris]
Complete build sequence is [SC-Solaris, ]

SC-Solaris:
  [sshexec] Connecting to supernova:22

BUILD FAILED
C:\ci\scripts\SC-Solaris-build.xml:7: com.jcraft.jsch.JSchException: reject
Host
Key: xxx
at org.apache.tools.ant.taskdefs.optional.ssh.SSHExec.execute(
SSHExec.ja
va:211)
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: com.jcraft.jsch.JSchException: reject HostKey: supernova
at com.jcraft.jsch.Session.checkHost(Session.java:706)
at com.jcraft.jsch.Session.connect(Session.java:309)
at com.jcraft.jsch.Session.connect(Session.java:145)
at org.apache.tools.ant.taskdefs.optional.ssh.SSHBase.openSession
(SSHBas
e.java:180)
at org.apache.tools.ant.taskdefs.optional.ssh.SSHExec.execute(
SSHExec.ja
va:143)
... 12 more
--- Nested Exception ---
com.jcraft.jsch.JSchException: reject HostKey: supernova
at com.jcraft.jsch.Session.checkHost(Session.java:706)
at com.jcraft.jsch.Session.connect(Session.java:309)
at com.jcraft.jsch.Session.connect(Session.java:145)
at org.apache.tools.ant.taskdefs.optional.ssh.SSHBase.openSession
(SSHBas
e.java:180)
at org.apache.tools.ant.taskdefs.optional.ssh.SSHExec.execute(
SSHExec.ja
va:143)
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: 0 seconds



On 9/6/07, Anderson, Rob (Global Trade) <[EMAIL PROTECTED] > wrote:
>
> Usually this error is caused when you have not specified either
> trust="true" or knownhosts="something". You have set trust="true"
> though...I'm not sure what is causing the problem. Couple questions:
>
> What version of Ant? What version of jsch? Can you ssh into the host
> with an ssh client? What version is the ssh server? OpenSSH or other?
>
> Also, produce some output with -verbose and sent it.
>
> -Rob Anderson
>
> > -Original Message-
> > From: Shankar S [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, September 05, 2007 12:52 AM
> > To: Ant Users List
> > Subject: sshexec
> >
> > I have got the sshexec task in this format:
> >
> >  > trust="true" />
> >
> > Ant throws up saying:
> >
> > com.jcraft.jsch.JSchException: reject HostKey: xxx
> >
> > Any help on this is much appreciated.
> >
> > -Shanki
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Passing properties as parameters to different targets in a build file

2007-12-02 Thread Shankar S
Hi all,

I have a project.properties file that define a set of properties for my
build system.
log.dir and build.dir are defined in project.properties. Based upon user's
confirguration these values are changed at build time.

My build.xml looks something like this:


  
  
  
  

  
  

  
  

  
  
  
   
   
  
 
  
  
  
  
 
 
  
  
 
  
   
 
   
   
   *
*
   




 



---
Firstly log.dir value is not being passed to target *"Tag_All_CVS_Modules".*
Secondly I tried passing the value using  but no luck with that
either.

Is there a way to pass log.dir (and other properties) to different targets
in the same build file.

Thanks in advance;
-Shankar