Re: Doing Ant builds

2009-06-11 Thread Michael Ludwig
Ina, Antoine schrieb am 11.06.2009 um 19:58:37 (+0200): > I am posing a general question about Ant vs Make vs Batch: > 1- What is advantage of Ant script over regular Batch script that > calls up the solution files for all the projects in your system tree > of projects(for Windows platform) Now wh

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

2009-06-11 Thread Michael Ludwig
Ashley Williams schrieb am 11.06.2009 um 17:51:45 (+0100): > > // create the ant parent project > Project project = new Project(); > project.setName("project"); > project.init(); > > // create the child target > T

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

2009-06-11 Thread Michael Ludwig
Dean Schulze schrieb am 11.06.2009 um 09:48:12 (-0700): > > Ant build scripts make simple things like an if else difficult Use the extensions, as mentioned by others. > and things like changing the value of a property impossible. This might be seen as a feature (but I rather don't think it

Re: mail task does not work under ant 1.7.+

2009-06-11 Thread Michael Ludwig
Laurent Perez schrieb am 10.06.2009 um 12:22:43 (+0200): > > When using encoding=mime, the mail task fails under ant 1.7.0, 1.7.1, > under jdk5 or jdk6. It works under ant 1.6.5. It does not fail under Ant 1.7. Just leave mail/@encoding at the default of "auto", there is no need to change it. It

Re: Delete file inside a warfile

2009-06-11 Thread Michael Ludwig
Knuplesch, Juergen schrieb am 03.06.2009 um 17:55:49 (+0200): > It would be nice just to delete sth. Out of a jar/war etc. without the > need to copy the wars around. Moin Jürgen, in-situ updates are possible, in-situ deletions aren't. See: http://java.sun.com/docs/books/tutorial/deployment/jar

RE: Doing Ant builds

2009-06-11 Thread Ina, Antoine
I am posing a general question about Ant vs Make vs Batch: 1- What is advantage of Ant script over regular Batch script that calls up the solution files for all the projects in your system tree of projects(for Windows platform) 2- How does Ant handle up and down project dependencies Regards, A

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

2009-06-11 Thread Dale Anson
For if/else, try/catch, and changing the value of a property, all you need is either antcontrib (ant-contrib.sourceforge.net) or antelope (antelope.tigris.org) tasks. Dale On Thu, Jun 11, 2009 at 10:48 AM, Dean Schulze wrote: > > I anticipate using a simple build.xml with different targets to ki

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: Replacing build.xml with Build.java - Doing Ant builds directly from Java

2009-06-11 Thread Dean Schulze
I anticipate using a simple build.xml with different targets to kick off the Build.java file passing in whatever parameters correspond to different targets.  The heavy lifting would be done by the Build.java.  build.xml would be used for parameter passing and for integration with Eclipse. Ant

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

2009-06-11 Thread Cole, Derek E
You are correct that there is very little documentation on the subject, other than a few small, simple examples on the net. It seemed like one of the responders in that link you posted was implying that he spoofed the tasks he needed to use? That seems like quite a bit more work than would be n

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

2009-06-11 Thread Dean Schulze
The Ant documentation has a section titled "Using Ant Tasks Outside of Ant" which gives a teaser for how to use the Ant libraries from Java code.  In theory it seems simple enough to replace build.xml with Build.java. The Ant documentation hints at some undocumented dependencies that I'll have to

Re: Fail if any of many files contains a string

2009-06-11 Thread David Weintraub
I haven't used it, but you might want to look at "loadresource". This loads a resource into a property, but you can use the resource filters on it. This would allow you to load a text resource into a property, but only those lines that contain that regex you're looking for. Then, you could check t

Re: relative path

2009-06-11 Thread divyanshu singh
oh never knew abt import thanks it worked On Thu, Jun 11, 2009 at 6:29 PM, David Weintraub wrote: > Is this Ant "library" build file included with the task? > > If this is the case, the imported tasks will behave as if they're in the > original build file. From the Ant Manual in the task: > >

Re: relative path

2009-06-11 Thread David Weintraub
Is this Ant "library" build file included with the task? If this is the case, the imported tasks will behave as if they're in the original build file. From the Ant Manual in the task: I*mported files are treated as they are present in the main buildfile.* Otherwise, if you used or , you will

Re: Fail if any of many files contains a string

2009-06-11 Thread Matt Benson
I'm assuming you want to keep your per-file processing so you can identify the offending file. Instead of copying with filters, though, try nesting a (usable as a single-element resourcecollection since 1.7.1) into your length condition. Concat your fileset, embedding your filterchain so tha