Re: Replacing build.xml with Build.java - Doing Ant builds directly from Java

2009-06-12 Thread Ashley Williams
g that the (xml) ant DSL is no longer a good match for your project. And until recently there hasn't been anywhere to turn to for such projects. - Ashley On 12 Jun 2009, at 00:42, Michael Ludwig wrote: Ashley Williams schrieb am 11.06.2009 um 17:51:45 (+0100): // create

Re: Replacing build.xml with Build.java - Doing Ant builds directly from Java

2009-06-11 Thread Ashley Williams
Hi Dean, I use this technique frequently as in this example lifted straight from my code, see below. All you have to remember is that a top level project owns many targets which in turn own many tasks, so just make sure you set up the parent/child references in both directions.

Re: Java in JDK but ANT can't find it!

2009-05-17 Thread Ashley Williams
Hi David, I never meant that you should modify the ant code. Try launching your app with the fully qualified path to the jdk java eg: > /path/to/jdk/bin/java MyTestApp So in other words don't rely on your PATH environment variable. It could be also that the bootclasspath has been overridden s

Re: Java in JDK but ANT can't find it!

2009-05-16 Thread Ashley Williams
s anyone know where the method System.getProperty goes to get the java.home? Like a file or something like that?? Cheers PS: I also used that code to call and in my java code. -- David Nemer Sent from Kaiserslautern, RP, Germany On Thu, May 14, 2009 at 5:36 PM, Ashley Williams > wrote

Re: Java in JDK but ANT can't find it!

2009-05-14 Thread Ashley Williams
? -Original Message- From: Ashley Williams [mailto:ashpub...@mac.com] Sent: Thursday, May 14, 2009 10:54 AM To: Ant Users List Subject: Re: Java in JDK but ANT can't find it! Check your PATH to make sure you are launching your application from the jdk and not the jre. I l

Re: Java in JDK but ANT can't find it!

2009-05-14 Thread Ashley Williams
, do you have any other suggestions? Cheers -- David Nemer Sent from Kaiserslautern, RP, Germany On Thu, May 14, 2009 at 4:54 PM, Ashley Williams wrote: Check your PATH to make sure you are launching your application from the jdk and not the jre. I launch programatically and I don'

Re: Java in JDK but ANT can't find it!

2009-05-14 Thread Ashley Williams
avid Nemer Sent from Kaiserslautern, RP, Germany On Thu, May 14, 2009 at 4:42 PM, Ashley Williams wrote: In your description you say that JAVA_HOME=/opt/jdk1.6.0_06/jre Seriously, try JAVA_HOME= /opt/jdk1.6.0_06 instead On 14 May 2009, at 15:28, Cole, Derek E wrote: When I had this

Re: Java in JDK but ANT can't find it!

2009-05-14 Thread Ashley Williams
was set correctly. There is some missing step here that prevents the ant Project instance from knowing which Java to use. -Original Message- From: Ashley Williams [mailto:ashpub...@mac.com] Sent: Thursday, May 14, 2009 9:56 AM To: Ant Users List Subject: Re: Java in JDK but ANT can&#

Re: Java in JDK but ANT can't find it!

2009-05-14 Thread Ashley Williams
It looks like you are pointing to the jre not the jdk. Try repointing the JAVA_HOME environment variable to the jdk directory instead, On 14 May 2009, at 13:15, David Nemer wrote: Hello Everyone, I am running ANT programmatically in JAVA. So, my task is to build the BUILD.XML. I'm able to

Re: Calling ant programatically

2009-04-27 Thread Ashley Williams
dead!!! alive On 27 Apr 2009, at 20:46, Ashley Williams wrote: Didn't make any difference. I did however get the stack trace from the ant java task vm and the only non daemon thread dump looks like this: Thread [main] (Suspended) ProcessImpl.waitFor()

Re: Calling ant programatically

2009-04-27 Thread Ashley Williams
ute being true. java.exe ---> ant-java (fork=true, spawn=false) ---> ant- exec (spawn=true) ---> cmd.exe (terminates only when dos cmd.exe window is closed) I know it looks a little unusual to have the extra ant-java task in there but it is necessary for my use-case a

Re: Calling ant programatically

2009-04-27 Thread Ashley Williams
rallel task, see http://ant.apache.org/manual/CoreTasks/parallel.html On Mon, Apr 27, 2009 at 12:42 PM, Ashley Williams wrote: Ok here's a little more context. It seems that the exec/spawn=true command works as expected when called on its own directly from java.exe but not from an i

Re: Calling ant programatically

2009-04-27 Thread Ashley Williams
use-case and I don't have the option to set spawn to true for it. Any ideas? Many Thanks - Ashley On 24 Apr 2009, at 13:20, Ashley Williams wrote: Hi, I would like to know how to start a batch file in a new dos window without blocking the java process and so naturally I

Calling ant programatically

2009-04-24 Thread Ashley Williams
Hi, I would like to know how to start a batch file in a new dos window without blocking the java process and so naturally I tried the following that does work: However I need to be able to do this from java and so I used t

Creating an ant task from xml fragment

2005-11-09 Thread Ashley Williams
Hi, I have a fragment of ant xml and would like to create a task or target from it in my java code. For example here is the xml text:

Re: How do I walk the task tree from Java?

2005-10-28 Thread Ashley Williams
ssor is at: http://antelope.tigris.org/source/browse/antelope/src/ise/library/ PrivilegedAccessor.java?rev=1.4&view=markup Hope this helps! Dale Ashley Williams wrote: Hi, I'm trying to write a method in java that takes a root target and then walks down the task tree until i

How do I walk the task tree from Java?

2005-10-28 Thread Ashley Williams
Hi, I'm trying to write a method in java that takes a root target and then walks down the task tree until it comes to the desired object, but don't seem to find the api to do this. I sort of got it to work in Ant 1.6.2 but wasn't really happy with the results as I still don't fully unders