Re: Enforcing "depends" order for 3rd-party targets?
Alexey Solofnenko wrote: I had to update a lot my build scripts in order for them to run in parallel mode with my own parallel executor. The usual problem was a missing dependency. Out of normal order execution breaks in random places and without careful review of all targets, it is difficult to fix all of them. I was thinking about external target order too, but the ordering logic became too complex when there are several targets setting different orders on other targets. For example, clean build could be "clean;build", meaning first run "clean" and later "build". Unfortunately usually "clean" and "build" targets depend on other targets, so the rule should be translated into {depends(clean) ^ depends(build)} -> {depends(clean) - (depends(clean) ^ depends(build))} -> {depends(build) - (depends(clean) ^ depends(build))}" This effectively means that all targets in {depends(clean) - (depends(clean) ^ depends(build))} should depend on all targets in {depends(clean) ^ depends(build)} And it is assuming that none of the other targets impose other ordering rules. However it is an important feature that is required for a real parallel executor. If you know a solution, please let me know. - Alexey. the trouble with before() targets (and target injection) is what if those targets also have dependencies, life gets very complex. This is what I do * Have a base template project with lots of predefined targets that do nothing (initialized, compile, packaged, tested, published. These represent 'states' I want the project to be in. * Have 'ready-to-X' targets for everything that is needed to prepare before doing the work to enter a state. In by default, "ready-to-compile" depends on "create-output-dirs". In a project that does some code generation, the extended project would have depends="base.ready-to-compile,generate-java-code" /> So I'm effectively adding a 'before' to the compile target by adding it in to its 'ready-to' predecessor. One thing I'd like is a way to declare a dependency on all the targets of another target, but not its work itself. If compile does a javac, but on one project I don't want that, I can't go -- Steve Loughran http://www.1060.org/blogxter/publish/5 Author: Ant in Action http://antbook.org/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: variables or a counter ?
Ivar Bratberg wrote: Hi, I have the following problem I try to solve in ant. I should check a www server for a certain result each minute. I should keep on checking until a desired result is given ( the file downloaded should exceed a certain limit ) In addition it should have a kind of timeout so it it will return if it has tried too many times. Do some of you have better suggestions for solving this ? Note, I cannot use task, because I have to check not only for error code on the response, but the text itself( I manage whith checking the length of the file downloaded > Actually, it sounds like you can use , just with an extended condition. I do something similar at work where we actually run regexp patterns over the response and wait for a specific pattern coming back. -- Steve Loughran http://www.1060.org/blogxter/publish/5 Author: Ant in Action http://antbook.org/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
target conditional and dependency issue
I have a target that I only want to execute if a property is set, but it executes the dependencies regardless. The code looks like this: What I have used as a work around is: This works, but it doesn't seem very ANT like. Do folks have a better, way to perform the conditional execution with a dependency list? Thanks, Eric
Re: Problem with
You may need to set the character encoding on the loadproperties. See: http://ant.apache.org/manual/CoreTypes/filterchain.html#classconstants peter On Sun, Aug 10, 2008 at 3:10 PM, Jim Showalter <[EMAIL PROTECTED]> wrote: > I am having problems getting this to work as described. I am using Ant > 1.7.1 with bcel-5.2 and java 1.6. The OS platform is Solaris 10 Unix. The > bcel classParser throws a ClassFormatException when I run a very simple ant > file. I put a print statement in the org.apache.bcel.classfile.ClassParser > code and the problem appears to be that the readID method returns a > 0x3F3F3F3F instead of the expected 0xCAFEBABE value. I have verified (using > od -x) that the Foo.class file begins with 0xCAFEBABE. > The files are below. > > > //Foo.java > public class Foo { > public static final String TESTIT = "hello"; > } > > > > > > > > > > > >${Foo.TESTIT} > > > > > Any help would be appreciated. > > Thanks > Jim > > > > - > 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: Problem with
That did it! Many thanks! Jim -Original Message- From: Peter Reilly [mailto:[EMAIL PROTECTED] Sent: Friday, August 22, 2008 11:07 AM To: Ant Users List Subject: Re: Problem with You may need to set the character encoding on the loadproperties. See: http://ant.apache.org/manual/CoreTypes/filterchain.html#classconstants peter On Sun, Aug 10, 2008 at 3:10 PM, Jim Showalter <[EMAIL PROTECTED]> wrote: > I am having problems getting this to work as described. I am using Ant > 1.7.1 with bcel-5.2 and java 1.6. The OS platform is Solaris 10 Unix. The > bcel classParser throws a ClassFormatException when I run a very simple ant > file. I put a print statement in the org.apache.bcel.classfile.ClassParser > code and the problem appears to be that the readID method returns a > 0x3F3F3F3F instead of the expected 0xCAFEBABE value. I have verified (using > od -x) that the Foo.class file begins with 0xCAFEBABE. > The files are below. > > > //Foo.java > public class Foo { > public static final String TESTIT = "hello"; > } > > > > > > > > > > > >${Foo.TESTIT} > > > > > Any help would be appreciated. > > Thanks > Jim > > > > - > 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]
Re: Enforcing "depends" order for 3rd-party targets?
I just thought of this: The "inheritall" allows the called target to inherit all properties set. This is suppose to be the default. The "inheritrefs" allows for all references to be inherited too. This is false by default. -- David Weintraub [EMAIL PROTECTED] On Mon, Aug 18, 2008 at 5:09 PM, cowwoc <[EMAIL PROTECTED]> wrote: > > Hi, > > Give: > > > > how do I guarantee that "internal" gets executed before "external" if > "external" is declared by some 3rd-party script I have no control over (that > is, I can't add depends="internal" to "external"). > > It should be noted that "internal" declares properties that "external" looks > for, so AntCall won't work. > > Thanks, > Gili > -- > View this message in context: > http://www.nabble.com/Enforcing-%22depends%22-order-for-3rd-party-targets--tp19040027p19040027.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] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Enforcing "depends" order for 3rd-party targets?
Yeah, I guess this would work so long as "externals" does not need to return any properties (I think in my case it doesn't). Thanks, Gili David Weintraub wrote: > > I just thought of this: > > > > > > > inheritall="true" > inheritrefs="true"/> > > > The "inheritall" allows the called target to inherit all properties > set. This is suppose to be the default. The "inheritrefs" allows for > all references to be inherited too. This is false by default. > > -- > David Weintraub > [EMAIL PROTECTED] > > > > On Mon, Aug 18, 2008 at 5:09 PM, cowwoc <[EMAIL PROTECTED]> wrote: >> >> Hi, >> >> Give: >> >> >> >> how do I guarantee that "internal" gets executed before "external" if >> "external" is declared by some 3rd-party script I have no control over >> (that >> is, I can't add depends="internal" to "external"). >> >> It should be noted that "internal" declares properties that "external" >> looks >> for, so AntCall won't work. >> >> Thanks, >> Gili >> -- >> View this message in context: >> http://www.nabble.com/Enforcing-%22depends%22-order-for-3rd-party-targets--tp19040027p19040027.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] >> >> > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Enforcing-%22depends%22-order-for-3rd-party-targets--tp19040027p19111915.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]
Re: target conditional and dependency issue
On Fri, Aug 22, 2008 at 11:03 AM, Eric Wood <[EMAIL PROTECTED]> wrote: > I have a target that I only want to execute if a property is set, but it > executes the dependencies regardless. Yes, the dependencies to get hit before the test is done. There's a reason for that: