accessing antlib svn
hi, I would like to contribute to the ant dotnet antlib. Does anyone know how I can get at least anonymous access to the repository? I couldnt find anything for the ant libs. Also, having some documentation about which branch I can code against would be helpful. Maybe I just havent searched enough - but any help would be appreciated. thanks, Vijay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: copyng and renaming files
you can achieve the same without using ant-contrib: by using a flattenmapper to get the list of files (without directory names), and then using that in an include to move from 'destination' to 'destination/old' and then copying from 'origin' to 'destination'. hth, Vijay Kriss wrote: Hi, You can use antcrontib task 'for' and the task basename, as following : tofile="${dest.backup.dir}/${file2copy.filename}"/> tofile="${dest.dir}/${file2copy.filename}"/> Have a nice day, kriss - Original Message - From: "Pomè Elisabetta" <[EMAIL PROTECTED]> To: Sent: Wednesday, August 29, 2007 10:53 AM Subject: copyng and renaming files Hi everybody, I apologize if this issue have been posted previously, but I search the mailing list and I couldn't find nothing similar. I need to copy files (says A.java e B.java) from a directoy Origin to a directory Destination. The directory Destination already contains an older version of A.java and B.java, but it contains many other files. Before copying A.java and B.java (the new version) from Origin I need to save A.java and B.java contained in Destination in another directory (Destination\Old). This is my problem: I don't know how to say to ant that the set of fils that it have to copy from Destination to Destinatio\Old is the same that in contained in Origin. Thank you in advance for your kind reply Elisabetta Axioma S.p.A. www.axioma.it via De Vizzi 35/39 - 20092 Cinisello B.mo (MI) Tel. +39 02-618.061 - Fax +39 02-660.10337 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Updated : Failonerror does not have any effect on compilation failure
it would be better to call it using the task. That way the build will fail if any step or target fails. Exec creates a different process and so cannot cause the current build to fail. hth, Vijay Ravi Roy wrote: Hi All, I am calling ant.bat using in the following way : I am using javac task inside projecbuild.xml and calling each project 's projectbuild.xml using task as shown above in the target. The problem is even compilation of the porject is failed, it continue to execute next target, I am not sure what is wrong. I think in principle it should not go further and halt the build immediately. Could somebody point the troubleslopt? Or Am I missing something ? Thanks for the pointers! Regards, Ravi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to replace a segment in a XML file?
we use the xmltask (http://www.oopsconsultancy.com/software/xmltask/) to work with xml structures within an ant file. And it seems to fit our needs. Based on what you want to do, this might help. NOTE: I am in no way affiliated to/with OOPS consultancy. Just think that this package/tool is a great addition to ant while working with xml structures. thanks, hth, Vijay Chad.Chang wrote: I have to replace a section in a xml file which can be identified by attribute "id". The section which id equals 100 is what i wanna replace with id="100" name="test">. Could you guys give me some suggestions? Thanks, -Chad - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: My first build with ant failed
Your target for compile is incorrect. It should read: You are missing " in two places. hth, Vijay Mohammad Khan wrote: below is the part of my build.xml ant returned: BUILD FAILED srcdir "/home/user/project/src destdir=/home/user/project/bin" does not exist! I see both src and bin directory exist in my project root. Would anybody give a light on it? Thanks, Mohammad - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ant build vs. CruiseControl
Also, make sure CC is using the ant install that you have dropped the jera jar in. Typically, CC comes with its own version of ant - and to use a different install directory of ant, you have to pass in some parameters or set a system environment variable. (Cant remember what they are offhand). hth, Vijay Loehr, Ruel wrote: Before declaring your taskdef echo the classpath you are using and post it. Google "ant print classpath" for instructions. -Original Message- From: david [mailto:[EMAIL PROTECTED] Sent: Thursday, October 25, 2007 10:43 AM To: user@ant.apache.org Subject: Ant build vs. CruiseControl Hello Steve, dev, committers, gurus and users, a few weeks ago I read an email from Steve in the response to another user's email: Steve listed CruiseControl as one of the better OSS (free) softwares to manage a project under CVS and Ant. I have downloaded and built so-called CC and now it dutifully attempts to build my project. Problem: my project uses the Jera Ant Task jar to allow hidden input of a password. At the command-line the Ant build works as always. Under CC the build fails with the following exception: [cc]Oct-25 09:58:16 ScriptRunner - xmls\taskdefs.xml:2: taskdef class com.jera.anttasks.Query cannot be found The JeraAntTasks.jar is in the ANT_HOME/lib directory and elsewhere but Ant cannot find this jar regardless. I have included the Jera jar in the CLASSPATH and in the cruisecontrol.bat as a property but no change in the CC build exception reporting as stated above. All of the CC ML replies so far claim Ant as the culprit. The particulars follow. Thanks in advance and please advise, David. OS: Windows XP Ant: 1.7.0 CC: 2.7.1 JDK: 1.4 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Is there an ant task (inbuilt in ant core) to verify the version of a jre?
hi, On many of my projects, we need to compile against the 1.4 JDK. Depending on what any individual developer might have installed, we run into issues with JDK versions ranging from 1.4.x, 1.5.x and 1.6. Does anyone know if there is a task in ant which can be used to verify the version of the JDK and possibly fail the build if the version does not match what the project needs? (For eg: The limitation could be that the app server being used does not support more than JDK 1.4) To get around this currently, I have the following lines at the top of the build file: classpath="lib/compile/ant-contrib.jar" /> But, as you can see, this creates a dependency on the ant-contrib jar. What I would like to achieve is the same - but without having to include the ant-contrib jar. thanks, Vijay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: Redefining a task
does it work if the name of the presetdef is the same name as the actual task? I tried it some time ago - but with not much luck. Also, the examples for presetdef show using it with a different name, thanks, Vijay [EMAIL PROTECTED] wrote: Jan -Ursprüngliche Nachricht- Von: Dimitris Mouchritsas [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 19. Dezember 2007 15:56 An: Ant Users List Betreff: Redefining a task Hi everyone, is there a way I can redefine a task to have some default attributes? For example I would like to redefine the javac task to use source="1.4", target="1.4", debug="true" always without needing to define them each time I call the task. Any other property used should be passed to the original task unaltered. Thanks. -- Dimitris Mouchritsas Computer Services - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is there a way to search for a file matching a condition and assign it to a variable ?
hi Hari, You might be able to try this: That has worked for me in the past - with Ant 1.7.0 (not sure if it works in Ant 1.6.5). Doesn't hurt to try! thanks, Vijay Gilbert Rebhan wrote: Hariharasudhan R schrieb: Hi Gilbert, That worked. Many Thanks! The doc for fileset ( http://ant.apache.org/manual/CoreTypes/fileset.html ) does not list id as one of the attributes. Is it an undocumented feature ? btw, I am using JDK 5.0u14 and Ant 1.6.5 on windows xp. yup, you're right. The manual is great in comparison to other open source, but incomplete sometimes ... you should always consult the archive of the ant user list = http://marc.info/?l=ant-user&r=1&w=2 Regards, Gilbert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Running TestSuite with ANT
Look at the manual here: http://ant.apache.org/manual/OptionalTasks/junit.html specifically the section for batchtest. That task can be used to run a suite of tests matching a specified pattern. This also allows you to not have to code and maintain a class implementing the TestSuite API from junit. hth, Vijay [EMAIL PROTECTED] wrote: Hi Experts, Can we run the TestSuites from ANT, there is no documentation on how to run the TestSuites from ANT junt tasks. If I follow the single test way, it just says " [junit] Test dao.testsuite FAILED " This is my tests target : showoutput="yes"> usefile="true"/> Can someone please explain whats the issue, best if I get some examples with TestSuite implementation in ANT. Thanks , Sumit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ant's preferred location of toolkit.jar?
set the JAVA_HOME environment variable to point to the JDK. hth, Vijay [EMAIL PROTECTED] wrote: I have just installed Ant on a laptop I haven't used previously for development. When I ran ant.bat, I got a message telling me that Ant couldn't find toolkit.jar in my jre directory. The file is is my jdk directory. I searched the ant.bat file and couldn't find where to tell ant to look in the correct directory. What do I need to do? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Inheriting tasks?
are you referring to tasks or targets? I think what you want to find out abt is a target. If its a target, then you can use the task to import common definitions of tasks, properties, etc. hth, Vijay jpyork wrote: I know you can inherit properties, but can you do this with tasks also? I am trying to make a generic script, so say I have 5 scripts that all do the task "init" that deletes a classes folder and recreates it. Is there a way I can create a master file and put this task in the master file and have it run when all the child scripts are run? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Delete with Wildcard
hi Tom, You should be able to do the following to delete the multiple nested directories: hth, Vijay Tom Henricksen wrote: I have seen a little discussion with this in past but no resolution. Is it possible to We have multiple nested directories under dojox we need to delete for our build process. Thanks in advance, Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to detect failed build
hi, I have also seen some clients who use ant's MailLogger to notify interested parties of failed builds - in case you have a wide audience. btw: are you running inside a CI environment? If not, try CruiseControl, Hudson, Bamboo or TeamCity. Depending on whether you want an open source tool or a commercial one, and based on your requirements, one or more might fit. hth, Vijay Md. Jahidul Hasan wrote: is there any task / properties which can be use to track the build failed or not. I don't want to extend any ant class for this task. Is there any built in task ? :Hasan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: env.COMPUTERNAME not working in linux
Is COMPUTERNAME only for windows? Is there any workaround to print the hostname(Linux)? The end of that statement is misleading - are you looking for the hostname or the host OS? Or is your machine named 'Linux'? Vijay Ramu Sethu wrote: Hi We have a build script which runs in both windows and Linux m/c. Recently i added property to print the computer name of the m/c in which the script runs. In windows everything is fine. Ant sets the property to the hostname in windows. But in Linux it prints the hostname like "${env.COMPUTERNAME}". Value is not printed. Is COMPUTERNAME only for windows? Is there any workaround to print the hostname(Linux)? We don't make any changes in the ant script when running in Linux. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How can we use the checksum task (or another ant task) to compare that the ftp worked
hi, We have a client where a build process creates artifacts (jar, exe) and uses the scp task to copy them over to an ftp server. Once this process completes, an email is sent to the offshore team asking them to verify that the file sizes (obtained from the build machine) are the same for each file from the ftp server before they use these artifacts. I wanted to use the checksum task or something similar to compare the file sizes between the local and remote server before sending that email. If the checksums don't match, we would like to fail the build. Does anyone know how this can be accomplished? thanks, Vijay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Verifying checksum of files after ftp'ing to remote server
hi, In our build process, some files are ftp'ed onto a remote server. I would like to incorporate a step that can be used to verify that the ftp process worked correctly - by verifying the checksum of the local file(s) to the corresponding remote one(s). Could someone please help with how this can be done? I have looked at the checksum task - but am not sure how to do this for a file that resides on a remote ftp server. Here is a code snippet of the ant file that I would like to use: ${local.zip.file}: ok thanks, Vijay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Repeating a task for a list of directories
hi, if all you are doing is calling a different ant file within each subdirectory - you can look at subant (http://ant.apache.org/manual/CoreTasks/subant.html) If your main build file has a target which you want to repeat for each subdirectory, use ant-contrib's for or foreach tasks (http://ant-contrib.sourceforge.net/tasks/tasks/index.html) With the ant-contrib option, you will have access to a property that you can define which contains the directory name. hth, Vijay Rob Wilson wrote: Hi, I have not done too much with Ant, but I would like to find all sub-directories below a given directory and then for each directory repeat a task in the context of that directory, so for example topdir subdir1 subdir2 I would like to get ant to repeat a task for subdir1 and subdir2 and have access to the directory name within the task - does anyone know how I can achieve this? Cheers, Rob. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Delete directory with .svn; ant manual issue
hi, I don't think defaultexcludes takes into account svn directories - though it does handle the cvs directories. hth, Vijay [EMAIL PROTECTED] wrote: Hi all, when following the ant manual for deleting all files including .svn entries, I got to something like: includes="**/*> But this does not work - the .svn folders are not deleted. However, when following the ant frequently asked question page, it states that the defaultexcludes attribute is under the fileset element instead of under the delete element. And it says "no" instead of "false" for the defaultexcludes. And this works. Thanks, Sebastian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: exclude test and examples from a jar
i think what you want is: hth, Vijay Luca Ferrari wrote: Hi, is it correct the following file set to be included in a jar task for excluding examples and test files? I still got the classes under the example package and the Test classes into my jar. Thanks, Luca - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to change the property value at run time
I would also look at the documentation about differences between user defined properties vs the ones defined within the build.xml file. Another way to change properties at runtime is to read different property files based on your condition. hth, Vijay Taj, Abdul wrote: When you say runtime, what do you mean - are you invoking ant from another program? - like a java application. If yes - you can use the Project class in Ant, refer api and use setProperty method. If no - then I don't understand what you mean by runtime - just initialize the property in the build xml file. -t -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 14, 2008 12:07 PM To: user@ant.apache.org Subject: RE: how to change the property value at run time Thanks a lot. I know that JAVA_HOME is not the ANT - property. I just wanted to check whether can we change the property value at run time. Can we have detail list of different properties that ANT supports.?? Regards, Irfan -Original Message- From: Knuplesch, Juergen [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 14, 2008 7:05 PM To: Ant Users List Subject: AW: how to change the property value at run time Thats just the special thing about ANT-properties: You can not change them, for good reasons. But JAVA_HOME does not look like an Ant-property. What do you want to do? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: best practice: How to insert unreferenced class files into a JAR
Since these dynamically loaded classes are part of a separate project, you are already on the correct path. Just jar those files separately and use that jar in the classpath of your project. If you want to go even further, use ivy to manage your dependencies. Vijay Amit Dor-Shifer wrote: Hi all. I'm using a framework of logging formatters. Those formatters are assigned to a log according to configuration. This means those classes are never imported in source code. I've came to notice this when a/m files weren't appended to my JAR. They are located at the 'sourcepath' of my project, but belong to a separate java project. I've resolved this issue by explicitly adding the directory containing those files to the 'srcdir' attribute of my 'javac' task. Nevertheless, I'm not content with this solution and I'm guessing there's some sort of standard procedure to resolve such issues. Anyone using java reflection might stumble on the same issue, right? What's the correct way to have dynamically instantiated classes available at runtime, in a deployed environment? Am I on the right path with this work-around? Thanks, Amit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Depends="init" problem
hi, I think the way you invoke the targets is like: ant -f buildFile.xml a b c If that is the case, you are invoking each target independent of each other - which means that the dependencies for each are discovered separately and executed - once for a, once for b and once for c. If you had a single target called 'all' or something that ties together a, b and c, and you invoke that from the command line, then the dependency tree will be determined once and init will be called once for each invocation. Does that make sense? hth, Vijay Guy Catz wrote: I have several targets, all depends on init - ... ... ... and of course ... Now, I also have a target which call a, then b and then c. But when I run that ANT, the output is something like this - running - successful running -successful running - successful running -successful running - successful running -successful which means that Init ran 3 times!! instead of only once. I do I make it to run only once? Please advise. Thanks, Guy. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: facing the problem in package
check that your classpath has been set and includes the directory where your sources are being compiled to. hth, Vijay Kamran Hameed wrote: folks .. this is my package structure. I have a root src folder. In src i have a mpjdev package which contains some files. This mpjdev also contains a folder nativ, which contains its files. Now i have several files in nativ such as Comm.java, Group.java, Status.java etc Note that every class in package mpjdev.nativ has the following same package statement at the top package mpjdev.nativ In Comm.java, i am trying to call Group.java 's object. (Both classes are in same package) When i try to compile it i get the error [javac] found : mpjdev.Request [javac] required: mpjdev.nativ.Request [javac] req[i] = device.isend(wBuffer, ids[i], (calContextTag+i), context); . . . . . Since i am new to ant, i used javac Comm.java to see it it compiles, it gave the follwiung output omm.java:57: cannot find symbol symbol : class Group location: package mpjdev.nativ public Group group = null; ^ Comm.java:58: cannot find symbol symbol : class Group location: package mpjdev.nativ public Group localgroup = null; ^ Comm.java:69: cannot find symbol symbol : class Group location: package mpjdev.nativ Comm(xdev.Device device, Group group) throws MPJDevException { . I have correctly added the package in the classes, i dont know why its not compiling ONE more thing i notice is that there is a class Status.java in the same package but this class doesnt contain an object of any other class of same package and it compiles well without error. but when ever i try to call classes that are in the same package, it gives error Can any one help -- Kamran Hameed http://hpc.niit.edu.pk/~kamran - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Property array?
What is it you are trying to achieve? I have used a comma-separated string property, split it and iterated over it (using ant-contrib). Would that work for you rather than writing a custom task? hth, Vijay markww wrote: Hmm I just read through a custom Task tutorial, but I don't think they'll help, because you can't specify a variable number of attributes, they must be known in advance. In the examples I've read, your custom Task class has to have getters and setters for all the attributes you want to use. But if I want to let my user specify an arbitrary number of attributes, I don't think that's possible... please correct me if I'm wrong! Thanks mgainty wrote: Hey Mark- no declaration of property array as far as I can see you can feel free to create your own as in this example public class MyTask extends Task { private List conditions = new ArrayList(); public void add(Condition c) { conditions.add(c); } public void execute() { // iterator over the conditions } } One may define and use this class like this: There are a number of hidden implementation details such as which constructors are created and used but the mechanics of creating the stub are here..more info available at http://ant.apache.org/manual/develop.html Maybe some of the committers can weigh in??? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Date: Thu, 14 Aug 2008 13:14:33 -0700 From: [EMAIL PROTECTED] To: user@ant.apache.org Subject: Property array? Hi, Is there any way to make an array property in Ant? I want to write some stuff to a file based on an array property. Something like the user enters this: for (i = 0; i< ${colors}; i++) { } Yeah I'm just making the syntax up as I go along - anything like that? Thanks -- View this message in context: http://www.nabble.com/Property-array--tp18988851p18988851.html Sent from the Ant - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Reveal your inner athlete and share it with friends on Windows Live. http://revealyourinnerathlete.windowslive.com?locale=en-us&ocid=TXT_TAGLM_WLYIA_whichathlete_us