ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <peter.rei...@corvil.com>
Subject Re: <param> question
Date Tue, 05 Aug 2003 12:25:26 GMT
I have made a fix in ANT cvs, for John's problem.
It may be related to your problem.

If you could reduce the build script to the smallest possible
script that shows the problem, it would help.

Peter

On Monday 04 August 2003 21:25, Lopez, William wrote:
> Previously I had asked about a workaround for bug #11418 and I believe I
> found my answer, I will have to add 3 more targets to compensate- that's a
> shame. I looked at the <foreach> tag and believe I will run into the same
> problem. If anyone else has a solution I'd like to hear from you.
>
> Thanks,
> -Will
>
> -----Original Message-----
> From: Shackelford, John-Mason [mailto:john-mason.shackelford@pearson.com]
> Sent: Monday, August 04, 2003 2:15 PM
> To: 'Ant Users List'
> Subject: RE: <param> question
>
>
> William,
>
> I haven't read your email too carefully, but it might be worth looking at
> bug #11418 to see if you've been bit.
>
> John-Mason Shackelford
>
> Software Developer
> Pearson Educational Measurement - eMeasurement Group
>
> 2510 North Dodge St.
> Iowa City, IA 52245
> ph. 319-354-9200x6214
> john-mason.shackelford@pearson.com
> http://etest.ncspearson.com
>
>
> -----Original Message-----
> From: Lopez, William [mailto:william.lopez@eds.com]
> Sent: Monday, August 04, 2003 1:48 PM
> To: Ant Users List
> Subject: <param> question
>
>
> Why isn't the param value being "scoped"? I was under the impression that
> an <antcall> encapsulates all the properties associated with the target
> being called (unless inheritAll="false") including any properties that were
> set in depends target calls. I've tried several different ways to get the
> build logic to flow a certain way but each iteration (after failing to
> achieve desired results) becomes more of a hack (and messy)...this way
> appeared to be the cleanest way but it doesn't work as planned.
>
> What I noticed was that the <param name="jndiPrefix" value="aux" /> was not
> being set when the depends call to chk-ejbjndi-outofdate target was
> executed. This compounds my confusion, how does the <outofdate> task
> execute when the ${jndiPrefix} property is not resolved?
>
> I know this because of the debug output:
> chk-ejbjndi-outofdate:
> Property ${jndiPrefix} has not been set
>
> The chain of events starts at the generate.ejb.jars target. Any insight
> will be greatly appreciated.
>
>  <target name="chk-ejbjndi-outofdate">
>      <outofdate property="jndi_outofdate">
>        <sourcefiles>
>          <fileset dir="${this.ejb.build.dir}" includes="**/*.class"/>
>        </sourcefiles>
>        <targetfiles>
>          <pathelement
> path="${app.module.dir}\${jndiPrefix}\${ejb.jar.name}"/>
>        </targetfiles>
>      </outofdate>
>      <echo>${jndiPrefix} notuptodate: ${jndi_outofdate}</echo>
>   </target>
>
>  <target name="ejb.jar.prefix" depends="chk-ejbjndi-outofdate"
> if="jndi_outofdate">
>      <antcall target="ejb.jar">
>         <param name="jndiPrefix" value="aux" />
>      </antcall>
>      <antcall target="ejb.jar">
>         <param name="jndiPrefix" value="rules" />
>      </antcall>
>      <antcall target="ejb.jar">
>         <param name="jndiPrefix" value="complexRules" />
>      </antcall>
>   </target>
>
>   <target name="generate.ejb.jars"  depends="init,jarTmpEJB,compile">
>      <!-- Generate different ejb jar base on jndi prefix. -->
>      <antcall target="ejb.jar.noprefix"/>
>      <antcall target="ejb.jar.prefix"/>
>      ...
>   </target>
>
> Thanks
>
> -----Original Message-----
> From: Lopez, William
> Sent: Thursday, July 31, 2003 12:04 AM
> To: 'Ant Users List'
> Subject: Conditional (compound) Help Please
>
>
> I have a need for a task that compares a jar to it's "list" of class files
> (found uptodate to work fine for the first part of the compare).
>
> I expect the second compare to never be true when the first is (*to meet
> the target execute condition*). The <not> part is not working like I
> thought (as a negator)...I tried the <outofdate> task but it always ends up
> executing the target...see below, 2nd example.
>
> My scenario:
> -There is another task that executes unless="noprefix_uptodate"....this
> generates/deploys the ejb jar for the non-jndi prefix ejb -Then ejb.jar is
> called (via <antcall> 3x - 1 per other jndi prefixes)...the only difference
> between these jars is the jndi prefix
>
> I'm sure there is a clean, simpler way but I can not figure it out. Thanks!
>
>   <target name="chk-ejbjndi-notuptodate">
>     <condition property="${jndiPrefix}_notuptodate">
>        <and>
>           <uptodate
> targetfile="${app.module.dir}\NO_Prefix\${ejb.jar.name}"
>
>               <srcfiles dir= "${this.ejb.build.dir}"
> includes="**/*.class"/> </uptodate>
>           <not>
>             <uptodate
> targetfile="${app.module.dir}\${jndiPrefix}\${ejb.jar.name}" >
>                <srcfiles dir= "${this.ejb.build.dir}"
> includes="**/*.class"/>
>             </uptodate>
>           </not>
>        </and>
>     </condition>
>     <propertycopy name="jndi_outofdate" from="${jndiPrefix}_notuptodate"
> silent="true">
>     <echo>${jndiPrefix} notuptodate: ${jndi_property}</echo>
>   </target>
>
>  <target name="ejb.jar" depends="chk-ejbjndi-notuptodate"
> if="jndi_outofdate">
>   ...
>  </target>
>
>
>  ==================== <outofdate> ============================== <target
> name="chk-ejbjndi-notuptodate">
>      <uptodate property="ejb_uptodate"
> targetfile="${app.module.dir}\NO_Prefix\${ejb.jar.name}" >
>        <srcfiles dir="${this.ejb.build.dir}" includes="**/*.class"/>
>      </uptodate>
>      <outofdate property="jndi_notuptodate">
>        <sourcefiles>
>          <fileset dir="${this.ejb.build.dir}" includes="**/*.class"/>
>        </sourcefiles>
>        <targetfiles>
>          <pathelement
> path="${app.module.dir}\${jndiPrefix}\${ejb.jar.name}"/>
>        </targetfiles>
>      </outofdate>
>      <if>
>        <and>
>          <isset property="ejb_uptodate"/>
>          <isset property="jndi_notuptodate"/>
>        </and>
>       <then>
>        <property name="jndi_outofdate" value="true"/>
>       </then>
>      </if>
>      <echo>${jndiPrefix} notuptodate: ${jndi_outofdate}</echo>
>   </target>
>
>   <target name="ejb.jar" depends="chk-ejbjndi-notuptodate"
> if="jndi_outofdate">
>   ...
>   </target>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
> ***************************************************************************
>*
>
> This email may contain confidential material.
> If you were not an intended recipient,
> Please notify the sender and delete all copies.
> We may monitor email to and from our network.
> ***************************************************************************
>*
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message