You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Jeremy Quinn <je...@media.demon.co.uk> on 2000/11/07 19:06:35 UTC

Re: New TagLib, votes please

>> > Option 4
>> > 	Install as in Option 1, without Sun's JARs, using Ant to conditionally
>> > compile.


Does anyone know if it is possible to set up a dual class dependency for
conditional compilation in the version of Ant used for Cocoon1?

I need to test for two separate packages

	javax.activation ...
	javax.mail ...

I can do something like this for one package dependency, but can't work out
how to handle two.


	<available property="mail.present" classname="javax.mail.Message"/>

  <target name="prepare-mailer" depends="init" if="mail.present">
    <copydir src="${src.dir}"
             dest="${build.src}"
             includes="**/mailer/**"
             filtering="on"/>
  </target>


thanks for any help

regards Jeremy
-- 
   ___________________________________________________________________

   Jeremy Quinn                                           Karma Divers
                                                       webSpace Design
                                            HyperMedia Research Centre

   <ma...@mac.com>     		 <http://www.media.demon.co.uk>
    <phone:+44.[0].20.7737.6831>        <pa...@sms.genie.co.uk>

Re: New TagLib, votes please

Posted by Stefan Bodewig <bo...@bost.de>.
Jeremy Quinn <je...@media.demon.co.uk> wrote:

> At 09:47 +0100 08/11/00, Stefan Bodewig wrote:

>>and make sure you are using Ant 1.2alpha2 or later.

> Robin, do you happen to know which version we have for Cocoon 1?

ant -version should tell you. Latest released version is Ant 1.2.

Stefan

Re: New TagLib, votes please

Posted by Jeremy Quinn <je...@media.demon.co.uk>.
At 09:47 +0100 08/11/00, Stefan Bodewig wrote:
>>>>>> "JQ" == Jeremy Quinn <je...@media.demon.co.uk> writes:
>
> JQ> Does anyone know if it is possible to set up a dual class
> JQ> dependency for conditional compilation in the version of Ant used
> JQ> for Cocoon1?
>
>Yes, use a dummy target in between

[snip]

Thanks for your replies

>and make sure you are using Ant 1.2alpha2 or later.

Robin, do you happen to know which version we have for Cocoon 1?

Thanks

regards Jeremy
-- 
   ___________________________________________________________________

   Jeremy Quinn                                           Karma Divers
                                                       webSpace Design
                                            HyperMedia Research Centre

   <ma...@mac.com>     		 <http://www.media.demon.co.uk>
    <phone:+44.[0].20.7737.6831>        <pa...@sms.genie.co.uk>

Re: New TagLib, votes please

Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "JQ" == Jeremy Quinn <je...@media.demon.co.uk> writes:

 JQ> Does anyone know if it is possible to set up a dual class
 JQ> dependency for conditional compilation in the version of Ant used
 JQ> for Cocoon1?

Yes, use a dummy target in between

<target name="check1">
  <available property="package1.is.there" classname="package1.class" />
</target>

<target name="check2" depends="check1" if="package1.is.there">
  <available property="both.are.there" classname="package2.class" />
</target>

and make sure you are using Ant 1.2alpha2 or later.

We could start a discussion on whether the limitation inside Ant to
allow for only one property in if/unless is to hard, but I think this
is not the place to do so.

Stefan

Re: New TagLib, votes please

Posted by Ross Burton <ro...@lineone.net>.
On Tue, 7 Nov 2000, Jeremy Quinn wrote:
> Does anyone know if it is possible to set up a dual class dependency for
> conditional compilation in the version of Ant used for Cocoon1?
> 
> I need to test for two separate packages
> 
> 	javax.activation ...
> 	javax.mail ...
> 
> I can do something like this for one package dependency, but can't work out
> how to handle two.
> 
> 
> 	<available property="mail.present" classname="javax.mail.Message"/>
> 
>   <target name="prepare-mailer" depends="init" if="mail.present">
>     <copydir src="${src.dir}"
>              dest="${build.src}"
>              includes="**/mailer/**"
>              filtering="on"/>
>   </target>

I did make a patch to Ant way back when C2 was interpretting the pipeline
to make Ant deal with the if="" like it does with depends="" (i.e. as a
List, not a String) but it was rejected by developers.  I think the reason
was that the patch was the start of boolean expressions (in that case the
comma was an implicit AND), and if they started along that road then
somebody else would want OR and NOT...

I think the response was to make a dummy task which has if="mail.jar",
then prepare-mailer depends on dummy and also has if="activation.jar".  Or
wait until Ant 2...  I'm not sure about this however, so you may want to
search the Ant archives.  My only postings, so they should be easy to
find.

Ross Burton