Re: Feature request: ifbool/unlessbool

2009-09-24 Thread Prashant Reddy
Yay! :). This is good. Thanks for sharing this information. On 9/24/2009 3:57 PM, Stefan Bodewig wrote: On 2009-09-24, Francis GALIEGUE wrote: But ideally, I'd like to use these properties all the time, with boolean values. Say, for example, if I have nomail set to 1 or true, then no mail

Re: Feature request: ifbool/unlessbool

2009-09-24 Thread Prashant Reddy
+1 to this feature request. I am curious to know. why if and unless attributes in 'target' work the way they do, i.e only check existence of the property and not its value. Currently ant-contrib's if tag has to be used to accomplish this sort of control over build execution. -Prashant On 9

Re: help with ant - copy and filesets

2008-12-12 Thread Prashant Reddy
Take a look at "mapper" http://ant.apache.org/manual/CoreTypes/mapper.html manku wrote: Hi , I am new to ant to script. I am looking for some help for the below task Suppose the directory "/d1/user1/abc/" has 50 subdirectories. and these sub directories in turn have some other directories an

Re: JUnit Report (Please help me, i am trying this from past two weeks)

2008-12-12 Thread Prashant Reddy
Phani Kumar wrote: I removed from target and test runs fine, i got result.xml file .. but could not able to get the reports.. is there anything wrong in this report Target code? i have put the jar file outside of Ant\lib still getting same result i am using jdk 15 and Ant 1.7, installed xalan a

Re: JUnit Report (Please help me, i am trying this from past two weeks)

2008-12-12 Thread Prashant Reddy
How about : 1. Rename xalan.jar from ANT/lib (Rename to something like xalan.jar1) 2. Run ANT with JDK 1.6 set in the path. My guess is that the Xalan that ANT ships is giving you problem, and by following the above steps Xalan shipped with Sun JDK will be picked up. But obviously this soluti

Re: javac -encoding

2008-06-18 Thread Prashant Reddy
Yes 'encoding' option exists in javac task. http://ant.apache.org/manual/CoreTasks/javac.html Raghuveer wrote: Is there option compiling all my source files in my web application in "tomcat\webapps\testApp" with "-encoding "option in ant. Example: . javac -encoding ISO-8859-2 Hel

Re: unable to execute JAR file

2008-06-18 Thread Prashant Reddy
Google is your friend. http://www.google.co.in/search?q=Failed+to+load+Main-Class+manifest+attribute The first hit from the search result has this link to Java tutorial : http://java.sun.com/docs/books/tutorial/deployment/jar/basicsindex.html To execute a jar using 'java' command, the JAR file

Re: how to capture output from a target as xml

2008-05-11 Thread Prashant Reddy
> Is it possible to capture the output from a single target Check out the task. > into a file as > xml format ? will only what ever the target writes into System.out. However getting XML formatted output, really depends on what the target is. For example junitreport can write out XML/plain t

Re: ANT: charsets in replace-task

2008-05-08 Thread Prashant Reddy
May be you have tell Eclipse to use UTF-8 encoding when showing the file in which ANT has replaced ? On Thu, 2008-05-08 at 06:46 -0700, Hilden wrote: > Hello everybody, > > I have a problem with charsets, by using the "replace-task" of Ant in the > Eclipse IDE. > After ant relaces a token (the

Re: Build Webapp that runs off file:///

2008-03-27 Thread Prashant Reddy
On Thu, 2008-03-27 at 10:00 +, Steve Loughran wrote: > Garrett Smith wrote: > > Hey, I have an uncommon problem for the JSP Java guys here: > > > > Problem: The user wants to download a zip archive of the website that > > can run off file:/// protocol. The website requires navigation. > > Ma

Re: Fail build when 'replace' task cannot find expected number of tokens

2008-02-21 Thread Prashant Reddy
en you are expecting to find 3 replacements but only found 2. I guess modifying task itself, (since it obviously knows the number of occurrences) to take expected number of occurrences would have been a clean soln. -Prashant On Tue, 2008-02-05 at 17:36 +0530, Prashant Reddy wrote: > He

Re: AW: Fail build when 'replace' task cannot find expected number oftokens

2008-02-05 Thread Prashant Reddy
. On Tue, 2008-02-05 at 18:24 +0530, Prashant Reddy wrote: > Thanks for a good idea. nice and simple. > > Quick check with following build.xml reveals that the replace does not > modify timestamp even when token is replaced. However this approach will > not catch scenario where

Re: AW: Fail build when 'replace' task cannot find expected number oftokens

2008-02-05 Thread Prashant Reddy
Thanks for a good idea. nice and simple. Quick check with following build.xml reveals that the replace does not modify timestamp even when token is replaced. However this approach will not catch scenario where 1 instance was replaced when 2 were expected.

Fail build when 'replace' task cannot find expected number of tokens

2008-02-05 Thread Prashant Reddy
Hello ANT users, Using ANT 1.6.5, a build XML i am using makes use of task to replace certain token in a bunch of Javascript files. I would like the build to fail when the replace of a token fails, so that when someone changes the source file such that does not find any tokens to replace; the i

RE: AW: extended parallelism

2007-12-20 Thread Prashant Reddy
On Thu, 2007-12-20 at 13:45 +0100, Gilles Scokart wrote: > > As I mentioned earlier the only road-block at the moment to a totally > > transparent mechanism for > > supporting parallel execution is the dubious implicit dependencies that the > > documentation for the > > "depends" attribute makes

Re: Handling multiple subproject in J2EE app

2007-11-27 Thread Prashant Reddy
On Tue, 2007-11-27 at 15:50 +, Joe Schmetzer wrote: > Here's the technique I use in these situations: > > http://www.exubero.com/ant/dependencies.html Another modification to the same technique would be to import predefined "macrodef"s from a common-build script. This way the build file impor

Re: Ant 1.6.5: Learning to build an EAR that contains a single War and a single EJB Jar

2007-11-26 Thread Prashant Reddy
Hi Todd, Have a look at : * task : http://ant.apache.org/manual/CoreTasks/ear.html * task : http://ant.apache.org/manual/CoreTasks/jar.html The Manifest.MF can be generated by ANT, given the dependecies * See task : http://ant.apache.org/manual/CoreTasks/manifest.html The "ear" task extends

Re: How to get the count of the number of lines in a file using ANT

2007-10-11 Thread Prashant Reddy
** > * Saladin Sharif > * e-mail: [EMAIL PROTECTED] > * Visit homepage @ http://gaia.ecs.csus.edu/~sharifs > ** > > > - Original Message > From: Prashant Reddy <[EMAIL PR

Re: How to get the count of the number of lines in a file using ANT

2007-10-09 Thread Prashant Reddy
On Tue, 2007-10-09 at 12:25 -0700, Saladin Sharif wrote: > But what I am really after is being able to set a flag if the file > contains one or more lines of text. oh you are looking to do something like : cat log.txt | grep "a string" | wc -l

Re: How to get the count of the number of lines in a file using ANT

2007-10-09 Thread Prashant Reddy
ye of little faith... Look at: > > http://ant.apache.org/manual/CoreTypes/resources.html#tokens > > for a hint... > > -Matt > > --- Prashant Reddy <[EMAIL PROTECTED]> wrote: > > > Ok, none of the named filters that exist in ANT dist > > can

Re: How to get the count of the number of lines in a file using ANT

2007-10-09 Thread Prashant Reddy
Ok, none of the named filters that exist in ANT dist can help achieve this. You might need to use the scriptfilter, and i am not an expert in using scripting lang. -Prashant On Tue, 2007-10-09 at 11:09 +0530, Prashant Reddy wrote: > checkout the filterchains: > > http://ant.apache.o

Re: How to get the count of the number of lines in a file using ANT

2007-10-08 Thread Prashant Reddy
checkout the filterchains: http://ant.apache.org/manual/CoreTypes/filterchain.html On Mon, 2007-10-08 at 15:20 -0700, Saladin Sharif wrote: > I have a txt file and would like to get the count of the number of lines in > that file, and then store that count into a property. > > I mean something

Re: How to include a single Java file in javac task?

2007-10-08 Thread Prashant Reddy
Try : On Mon, 2007-10-08 at 16:20 +0530, Alexis Votta wrote: > Currently, my compile target is as follows. > > > > > > > So, it compiles everything in ${src.dir}. > > Apart from this I want to add one single Java file to be compiled. > Therefore, I want: > > 1. All Java f

Re: javadoc task does not pick up package-info.java from included filesets

2007-09-12 Thread Prashant Reddy
On Wed, 2007-09-12 at 14:37 +0100, Peter Reilly wrote: > > Shouldn't javadoc task pick this artifact (package-info.java) given > that > > this file is meant only for the javadoc tool ? Why should the user > have > > to explicitly include it ? > 1) the fileset is not only used in I was thinking m

javadoc task does not pick up package-info.java from included filesets

2007-09-12 Thread Prashant Reddy
Hello ANT Users, I have a lot of files from which javadoc needs to be generated. Not all java files from a package need to be published in javadoc. To enable this i use a number of s that provide input to javadoc task. Something like : //More filesets However to my su

Re: No class Def Error

2007-09-10 Thread Prashant Reddy
On Tue, 2007-09-11 at 08:48 +0530, Ramu Sethu wrote: > Both the junit task and custom task has the same class path ref id. > Junit task works but my task fails with no class found exception May be your task does not expand refids. Have you tried cut pasting the classpath instead of referring to i

Re: No class Def Error

2007-09-05 Thread Prashant Reddy
On Wed, 2007-09-05 at 14:56 +0530, Ramu Sethu wrote: > hi > > We are working in EJB and we use jboss-all-clent.jar. We have custom > task which makes use jboss-all-cleint.jar > > When we run our custom task with the taskdef which has > jboss-all-client.jar in classpath, what we get is No class fo

Re: Two-level property names

2007-08-20 Thread Prashant Reddy
May be a strategy like this will be of use : http://blogs.sun.com/geertjan/entry/p_img_src_http_blogs -Prashant On Mon, 2007-08-20 at 11:36 +0200, Krzysztof KucybaƂa wrote: > Hi, > > I just wanted to know if there is a possibility to achieve something > like this in Ant: > > -> I have a set of n

Re: checkstyle-ant

2007-07-30 Thread Prashant Reddy
Does the file checkstyle.xsl exist in the directory where your build.xml is ? -Prashant On Mon, 2007-07-30 at 02:20 -0700, Sameer Borwankar wrote: > Hi all, > > I am trying to generate a report using checkstyle plugin with IBM RAD. > I have written an ant script for the same as follows: > >

Re: Create WEB-INF/lib based on path-structure

2007-07-10 Thread Prashant Reddy
On Tue, 2007-07-10 at 12:25 +0530, Prashant Reddy wrote: > >> Based on http://ant.apache.org/manual/CoreTypes/fileset.html, how > do > >> we know the element supports "refid" attribute? > The relevant documentation seem to be here : http://ant.apache.org/manua

Re: Create WEB-INF/lib based on path-structure

2007-07-09 Thread Prashant Reddy
On Tue, 2007-07-10 at 14:29 +0800, hezjing wrote: >> Based on http://ant.apache.org/manual/CoreTypes/fileset.html, how do >> we know the element supports "refid" attribute? You mean the 'id' attribute, right ? Yes you are correct the documentation of fileset does not specify support for id attrib

Re: Create WEB-INF/lib based on path-structure

2007-07-09 Thread Prashant Reddy
in task or it's > nested element? WAR task specifies in the documentation that : "The nested lib element specifies a FileSet. All files included in this fileset will end up in the WEB-INF/lib directory of the war file." So try : Actually if you are using modern IDE (like

Re: Create WEB-INF/lib based on path-structure

2007-07-09 Thread Prashant Reddy
Take a look at 'war' task at : http://ant.apache.org/manual/CoreTasks/war.html Examples given in this page should address your concern. On Tue, 2007-07-10 at 10:21 +0800, hezjing wrote: > Hi > > I have a path structure containing a list of JARs, saved at the shared > repository. > > How can I i

RE: Formatter for ant scripts ?

2007-07-09 Thread Prashant Reddy
On Mon, 2007-07-09 at 13:48 +0200, Rebhan, Gilbert wrote: > Beside that, there maybe a solution with xslt, but i'm no specialist > for xslt !? > I have used the following xsl successfully to pretty print a XML. It should not hard to hook this XSL up with xslt task. Hope this helps http://www.

Re: Re: task issue in ANT

2007-06-28 Thread Prashant Reddy
Why not have all the NANT task activities in a separate build file, and simply use task in ANT to launch the NANT process ? There is some evidence in Google (http://www.google.co.in/search?q=nantcall) of building a task to facilitate this. I am not sure how far that effort got to. -Prashant On

Re: Javac task query

2007-06-26 Thread Prashant Reddy
No 'javac' task by itself will not delete class file whose source java file has been deleted, and rightly so. I do not think you would really want other source files to *not* compile when you have deleted a dependent source file. Imagine class A uses class C and you deleted class C (manually, a

RE: Javac task query

2007-06-26 Thread Prashant Reddy
> [EMAIL PROTECTED] > http://article.gmane.org/gmane.comp.jakarta.ant.user/42524 > http://marc.info/?l=ant-user&m=97303040120654&w=2 > http://dev.eclipse.org/newslists/news.eclipse.tools.jdt/msg01615.html > http://mail-archives.apache.org/mod_mbox/ant-user/29.mbox/%3

Re: Javac task query

2007-06-26 Thread Prashant Reddy
Please see : http://ant.apache.org/faq.html#always-recompiles HTH On Tue, 2007-06-26 at 16:15 +0800, Yadav, Akshat Kumar wrote: > Hi All, > > Ant manual says "The source and destination directory will be > recursively scanned for Java source files to compile. Only Java files > that have no corre

Re: using '/' as the separator for the elements

2007-06-14 Thread Prashant Reddy
Is't it much easier to simply write a Java Program that uses String Tokenizer to process the input and launches these commands ? If you really really want to use ANT, just call up that Java class using task. On Wed, 2007-06-13 at 23:26 -0700, Pritesh Saharey wrote: > Hi All, >We had our

Re: How to add a file to existing zip archive into a existing folder

2007-06-13 Thread Prashant Reddy
Use and tasks. More here : http://ant.apache.org/manual/CoreTypes/zipfileset.html HTH -Prashant On Thu, 2007-06-14 at 11:26 +0530, Ravi Roy wrote: > Hi All, > > > > I have a zip archive, which I want to update with adding a new file

Re: How we will check the jsp with Ant script

2007-06-07 Thread Prashant Reddy
On Thu, 2007-06-07 at 16:43 +0530, Saurabh Dave wrote: > Hi, > > Could any one tell me How we can precompile the jsp with Ant, Is > using Maven is essential . If you are deploying your JSPs on Tomcat have a look at : http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html#Web% 20App

Re: ant project building problem when one project depend upon another project.

2007-06-03 Thread Prashant Reddy
Project A's build process will make the jar and puts the jar in location known to Project B. Then you could write a 'outer' build script that infact builds these projects (A,B) in the order you require. (-)build.xml (outer) (+)dist (Jars from project A go here) (+)Project A/build.xml (+)Project B

Re: how to get a process id from a spawned task?

2007-05-28 Thread Prashant Reddy
If you are OK with using JDK 1.5, you could use 'jps' command that is shipped with every JDK. See : http://java.sun.com/j2se/1.5.0/docs/tooldocs/share/jps.html Output of jps on my computer : $ ~/programs/java/jdk1.5.0_10/bin/jps 20608 Jps 6550 Main You could perhaps use ANT's task to run this c

RE: java exception when task executed with ant but not manually

2007-05-15 Thread Prashant Reddy
Hi david, You could try running the target 'testApp' in verbose mode. This will print the java command used to launch the tests. You can then compare this with the setup which is working fine to figure out which configuration is missing. Hope this helps. -Prashant On Wed, 2007-05-16 at 12:34 +1

Re: build error

2007-05-03 Thread Prashant Reddy
On Wed, 2007-05-02 at 13:34 -0700, Murtuza wrote: > Although my java version is "1.5.0_09" I am getting the following > error. You could verify this assumption by starting ANT with -verbose switch. You would see output like : $ ant -verbose Apache Ant version 1.6.2 compiled on June 28 2005 Build

Re: BUILD FAILED ... (No such file or directory)

2007-05-03 Thread Prashant Reddy
On Wed, 2007-05-02 at 16:07 -0700, jasonn1234 wrote: > /Users/jason1234/Desktop/enterprisejava/HelloWorld/build.xml:76: You could open this file and see how the destination directory is arrived at. Looking at this : http://ant.apache.org/manual/CoreTasks/copy.html may help you understand how a 'c

Re: Re: build.xml for running applets

2007-05-01 Thread Prashant Reddy
> I want to know, similarly how to run a compiled applet pgm, using build. > Hope you understood my problem now. Yes, I also addressed this towards the end of my last email. Reproducing here... ANT also has 'exec' task which can execute any commands. So appletviewer command can also be called f

Re: build.xml for running applets

2007-05-01 Thread Prashant Reddy
>From : http://java.sun.com/docs/books/tutorial/deployment/applet/index.html In order to load an applet in a web page, you must specify the applet class with appropriate applet tags. A simple example is below: For development and testing purposes, you can run your appl

RE: I need to write a task for Tagging

2007-04-18 Thread Prashant Reddy
Try You will get more help, if you are more specific about what you want to achieve. -Prashant On Wed, 2007-04-18 at 22:04 -0700, alam wrote: > Hi as Prashant has given me some link regarding the cvs checkout,update that > is fine but i want how to write a task "TAG" a module can anyone hel

RE: I need to write a task for Tagging

2007-04-18 Thread Prashant Reddy
I suppose you mean to tag a particular file in your version control system. The answer to your question would depend on which version control system you use. ANT has tasks for CVS, and Subversion Check out: http://ant.apache.org/manual/CoreTasks/cvs.html I am not a Subversion user but quick goog