Re: Delete directory with .svn; ant manual issue

2008-03-27 Thread David Weintraub
Take a look at the task. You can remove .svn from the list of excluded files, then reset . On Thu, Mar 27, 2008 at 11:18 AM, <[EMAIL PROTECTED]> wrote: > Hi all, > > when following the ant manual for deleting all files including .svn entries, > I got to something like: > > > inc

Re: Having problem using property to in macrodef if invoke for more than one time

2008-03-27 Thread CheeYang Chau
Yes. This is what I do now. Using antcall is safe for parallel task. I also use macrodef but only to organize tasks that don't produce property. In this case, my ant script is always safe to run in parallel and invoke macrodef for more than one time in same target. On Fri, Mar 28, 2008 at 11:09 A

Re: Having problem using property to in macrodef if invoke for more than one time

2008-03-27 Thread David Weintraub
As you've discovered: Once a property is set, it is set forever. You can use the "var" task, but it isn't safe for parallel use. The other way is to append the module's name onto the end of the property name. Another solution is to use instead of macrodef. The task gives you the similar power to

Re: Having problem using property to in macrodef if invoke for more than one time

2008-03-27 Thread CheeYang Chau
> > > > > > > > > > > > > > > > > inside macro: ${myvalue} > > > > > > > outside macro: ${myvalue} > > outside macro: ${myvalue} > > > > $ a

NetBeans target "run" to .bat file

2008-03-27 Thread Andrew n marshall
This may be more of a general Java question than a specific Ant question, but here it goes I have a project that I built with NetBeans. NetBeans gave me a nice ant file that works great. But I need non-developers who don't have ant installed to be able to run it. When I run "ant -v run

RE: Having problem using property to in macrodef if invoke for more than one time

2008-03-27 Thread Cyril Sagan
You could also use beanshell. Not sure if this works due to a bug or feature. We use it very sparingly in our build process (analagous to like goto in C). inside macro: ${myvalue}

RE: Defined task fails to find base class of task

2008-03-27 Thread Karr, David
I think I have to do that because one of the classes compiled by the compile step is the class referenced in the taskdef. What I found was that if I defined the taskdef at the "top level", not inside a target, no matter where it was sequentially in the build script, it would fail on the taskdef im

Re: exclude test and examples from a jar

2008-03-27 Thread Vijay Aravamudhan
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 un

Re: Defined task fails to find base class of task

2008-03-27 Thread Scot P. Floess
Yeah, I posted a question about this recently. I got side-tracked and never fully pursued the issue... I don't think it works - I saw the same behavior as you... Curious, why are you structuring in this fashion? Meaning performing the taskdef in a target? Not a criticism - just curious as

Re: Delete directory with .svn; ant manual issue

2008-03-27 Thread Vijay Aravamudhan
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="**/*>

exclude test and examples from a jar

2008-03-27 Thread Luca Ferrari
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 --

Re: NPE in Ant 1.7.0

2008-03-27 Thread Xavier Hanin
On Thu, Mar 27, 2008 at 5:43 PM, Stefan Bodewig <[EMAIL PROTECTED]> wrote: > On Thu, 27 Mar 2008, Xavier Hanin <[EMAIL PROTECTED]> wrote: > > > Do you mean that 1.7.1 final is supposed to be the same as > > 1.7.1beta2, except for last minute bug fix? > > At least it shouldn't be drastically differ

Re: NPE in Ant 1.7.0

2008-03-27 Thread Stefan Bodewig
On Thu, 27 Mar 2008, Xavier Hanin <[EMAIL PROTECTED]> wrote: > Do you mean that 1.7.1 final is supposed to be the same as > 1.7.1beta2, except for last minute bug fix? At least it shouldn't be drastically different. My personal take would be to include the fix for this. If it doesn't look to sc

(resent) Defined task fails to find base class of task

2008-03-27 Thread Karr, David
(Sorry, I somehow sent this before it was done.) I have a simple build file that compiles some files and has a taskdef for one of the compiled classes, which indirectly references a class in one of the jars in the classpath. I have the taskdef inside the target which uses the task. When it execu

Defined task fails to find base class of task

2008-03-27 Thread Karr, David
I have a simple build file that compiles some files and has a taskdef for one of the compiled classes, which indirectly references a class in one of the jars in the classpath. I have the taskdef inside the target which uses the task. When it executes the defined task, it fails to find the class f

Re: NPE in Ant 1.7.0

2008-03-27 Thread Xavier Hanin
On Thu, Mar 27, 2008 at 5:03 PM, Peter Reilly <[EMAIL PROTECTED]> wrote: > On Thu, Mar 27, 2008 at 3:48 PM, Xavier Hanin <[EMAIL PROTECTED]> > wrote: > > On Thu, Mar 27, 2008 at 4:02 PM, Peter Reilly < > [EMAIL PROTECTED]> > > wrote: > > > > > > > On Thu, Mar 27, 2008 at 2:19 PM, Buck, Robert <[

Re: NPE in Ant 1.7.0

2008-03-27 Thread Peter Reilly
On Thu, Mar 27, 2008 at 3:48 PM, Xavier Hanin <[EMAIL PROTECTED]> wrote: > On Thu, Mar 27, 2008 at 4:02 PM, Peter Reilly <[EMAIL PROTECTED]> > wrote: > > > > On Thu, Mar 27, 2008 at 2:19 PM, Buck, Robert <[EMAIL PROTECTED]> wrote: > > > > so obviously we would > > > love to see this fixed in 1.

Re: NPE in Ant 1.7.0

2008-03-27 Thread Xavier Hanin
On Thu, Mar 27, 2008 at 4:02 PM, Peter Reilly <[EMAIL PROTECTED]> wrote: > On Thu, Mar 27, 2008 at 2:19 PM, Buck, Robert <[EMAIL PROTECTED]> wrote: > > so obviously we would > > love to see this fixed in 1.7.1. > > This may be problematic, as we are in a release cycle at the moment. > It will be

Delete directory with .svn; ant manual issue

2008-03-27 Thread S . Mayer
Hi all, when following the ant manual for deleting all files including .svn entries, I got to something like:

AW: NPE in Ant 1.7.0

2008-03-27 Thread Jan.Materne
Ok, verified for Ant 1.7.0 and Ant 1.7.1beta2. Works for 1.6.5. Jan > -Ursprüngliche Nachricht- > Von: Buck, Robert [mailto:[EMAIL PROTECTED] > Gesendet: Donnerstag, 27. März 2008 15:49 > An: Ant Users List > Betreff: RE: NPE in Ant 1.7.0 > > No, not simply "ant", rather "ant init clea

Re: problem with copy task

2008-03-27 Thread Luca Ferrari
On Thursday 27 March 2008 Luca Ferrari's cat, walking on the keyboard, wrote: > Hi all, > I've got the following task in my ant build file: > > description="Copies all the jars this project depdends on contained in > ${src.lib.dir}" if="${src.lib.dir}"> > > >

Re: NPE in Ant 1.7.0

2008-03-27 Thread Peter Reilly
On Thu, Mar 27, 2008 at 2:19 PM, Buck, Robert <[EMAIL PROTECTED]> wrote: > Hi Peter, > > I added a bug report a few minutes ago; the bug number is: > > https://issues.apache.org/bugzilla/show_bug.cgi?id=44689 > Saw that, thanks. > We have a fairly complex build system at VeriSign, Thanks very m

RE: Using Ant in Java

2008-03-27 Thread Denis.Sitnitsa
Thanks a lot. -Original Message- From: Keith Hatton [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 5:48 PM To: Ant Users List Subject: RE: Using Ant in Java There is a createArg() method which sounds like what you want. The manual included in the Ant download has API docs for

RE: NPE in Ant 1.7.0

2008-03-27 Thread Buck, Robert
No, not simply "ant", rather "ant init clean". -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 10:38 AM To: user@ant.apache.org Subject: AW: NPE in Ant 1.7.0 That works for me: ${ant.version} test C:\TEMP>ant Buildf

RE: Using Ant in Java

2008-03-27 Thread Keith Hatton
There is a createArg() method which sounds like what you want. The manual included in the Ant download has API docs for all the tasks, as well as some general guidance for programming to the API. Hope this helps Keith -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

RE: Using Ant in Java

2008-03-27 Thread Denis.Sitnitsa
First of all I tried to find this method.. JavaTask is instance of org.apache.tools.ant.taskdefs.Java class. This class doesn't have such a method. Which class should I use? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 5:41 PM To: u

AW: Using Ant in Java

2008-03-27 Thread Jan.Materne
There is an add method which takes an Arg object. Jan Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 27. März 2008 15:18 An: user@ant.apache.org Betreff: Using Ant in Java Hi,

AW: NPE in Ant 1.7.0

2008-03-27 Thread Jan.Materne
That works for me: ${ant.version} test C:\TEMP>ant Buildfile: build.xml [echo] Apache Ant version 1.7.1beta compiled on March 18 2008 init: [echo] test BUILD SUCCESSFUL JDK 1.6.0_02-b05 @ WinXP SP2 Jan > -Ursprüngliche Nachricht- > Von: Buck, Robert

RE: NPE in Ant 1.7.0

2008-03-27 Thread Buck, Robert
Hi Peter, I added a bug report a few minutes ago; the bug number is: https://issues.apache.org/bugzilla/show_bug.cgi?id=44689 We have a fairly complex build system at VeriSign, so obviously we would love to see this fixed in 1.7.1. We cannot run multiple targets, ever. /Bob -Original Mess

Using Ant in Java

2008-03-27 Thread Denis.Sitnitsa
Hi, everybody. I'm using ant in java to run another java application. Here is the example of code: JavaTask runner = new JavaTask(); . runner.setArgs("--xsdschemaroot=C:/aschemas --outputdir=C:/obj --language=java --basepath=.."); runner.execute(); It says: [java] The args attribut

Re: NPE in Ant 1.7.0

2008-03-27 Thread Peter Reilly
Thanks for report - and the build file. This has not been reported before, please add a bug report. This error is also present int the ant 1.7.1beta build and the trunk. In general, however, ant 1.7.0 can support multiple targets, I (and a gillzillion others) use them all the time), there must b

NPE in Ant 1.7.0

2008-03-27 Thread Buck, Robert
Has this bug been reported yet? Run "ant init clean" and you get an NPE. Basically, Ant will not run multiple targets, which is a pretty huge limitation. test Apache Ant version 1.7.1beta compiled on March 18 2008 D:\dev\thirdparty\shared\apache-ant-1.7.1beta>ant -f antfails.

Re: problem with copy task

2008-03-27 Thread Peter Reilly
if="${src.lib.dir}"> should be if="src.lib.dir" as the if attribute uses the presence or absence of the property and not on the value of the property. also, you may need to do **/*.jar instead of "*.jar" to get jars in sub-directories. Peer On Thu, Mar 27, 2008 at 12:48 PM, Luca Ferrari <[EMAIL

Using Ant in Java applications.

2008-03-27 Thread Denis.Sitnitsa
Guys, How can I get the result of execution? For example, I have Java task. runner.execute(); is void If I set the following: runner.setFailonerror(true); Than I don't see the error output. But I need both. So, how can I know if application is failed? Regards, Denis. Visit our website at

problem with copy task

2008-03-27 Thread Luca Ferrari
Hi all, I've got the following task in my ant build file: the idea is to copy all the jars in the src-lib file directory to the destination directory. ${src.lib.dir} poi

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: Build Webapp that runs off file:///

2008-03-27 Thread Steve Loughran
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. Managing the navigation should normally be done with server-side code (JSP). So

Re: Having problem using property to in macrodef if invoke for more than one time

2008-03-27 Thread Peter Reilly
On Thu, Mar 27, 2008 at 7:34 AM, CheeYang Chau <[EMAIL PROTECTED]> wrote: > > A common, if not so nice solution, is to use an attribute value as > > a property name. > > > > For example: > > > > > > > > > > value="@{module}"

Ant profiler + Embedded ant classpath problems

2008-03-27 Thread Eugene Kirpichov
Hi everybody, 1. I have written a line-level profiler for ant build scripts: http://sourceforge.net/projects/antro . I was surprised at how easy it was and at the fact that no one has done that before (at least, to my best knowledge) 2. I was going to add a feature to launch ant script directly f

Re: Having problem using property to in macrodef if invoke for more than one time

2008-03-27 Thread CheeYang Chau
> A common, if not so nice solution, is to use an attribute value as > a property name. > > For example: > > > > > >[EMAIL PROTECTED] > > I am aware of this solution. I read some old

AW: Using ant in java

2008-03-27 Thread Jan.Materne
There are some builtin implementations of redirectors. Follow the manual of to the redirectors manual page, take the names and search the codebase. Jan > -Ursprüngliche Nachricht- > Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Gesendet: Donnerstag, 27. März 2008 08:21 > An: user

RE: Using ANT from Java application

2008-03-27 Thread Denis.Sitnitsa
Thanks, will investigate it. -Original Message- From: Steve Loughran [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2008 1:38 PM To: Ant Users List Subject: Re: Using ANT from Java application [EMAIL PROTECTED] wrote: > Hi, all! > > I'm using ant tasks from my application: > > 1

RE: Using ant in java

2008-03-27 Thread Denis.Sitnitsa
Is there any working example of it? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 9:25 AM To: user@ant.apache.org Subject: AW: Using ant in java You could implement a Redirector for catching the output into your GUI. Jan

Re: Having problem using property to in macrodef if invoke for more than one time

2008-03-27 Thread Peter Reilly
On Thu, Mar 27, 2008 at 6:23 AM, CheeYang Chau <[EMAIL PROTECTED]> wrote: > I do run the macrodef in parallel using parallel task. Do you think > using var task will work ? There are lots of tasks that are *not* safe with using in the task and is one of them. If possible do not use Peter > >

Re: Having problem using property to in macrodef if invoke for more than one time

2008-03-27 Thread Peter Reilly
On Thu, Mar 27, 2008 at 5:51 AM, CheeYang Chau <[EMAIL PROTECTED]> wrote: > Hi, > > I love the macrodef task. However, it has a weakness. We must be very > careful if using property within the macrodef. I face problem with a > macrodef that is more complicated than the following example. I ha