Opp, I hit send by accident, (gmail does not have the same key shortcuts as emacs). <project> <target name="init"> <available file="lib/pmd.jar" property="pmd.jar"/> <target> <target name="pmd" depends="init" if="pmd.jar"> ... do pmd stuff <target> </project>
On 9/21/07, Peter Reilly <[EMAIL PROTECTED]> wrote: > <project> > <target name="init"> > <available file="lib/pmd.jar" property="pmd.jar"/> > <target> > > > > On 9/21/07, Eric Wood <[EMAIL PROTECTED]> wrote: > > I want to only call a target ( _pmd ) if the property "pmd.jar" is set. > > > > <target name="perform-pmd" if="pmd.jar" > > > <runtarget target="_pmd" /> > > </target> > > > > <target name="_pmd" > > depends="pmd-init,find-pmd-java-files,modified-java-pmd,new-java-pmd" /> > > > > > > The problem I have with the code above is that runtarget seems to run in > > its own JVM so properties that are set in there that I need to reference > > later are not available after it runs. Also, if I add the "if" clause > > to the _pmd target, the depends are processed first. > > > > How do I best handle the conditional execution of a target without using > > either antcall or runtarget? > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]