You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Sylvain Wallez <sy...@anyware-tech.com> on 2003/03/07 17:36:12 UTC

Re: The new build system

Martin Holz wrote:

>Stefano Mazzocchi <st...@apache.org> writes:
>
>  
>
>>Martin Holz wrote:
>>    
>>
>>>Stefano Mazzocchi <st...@apache.org> writes:
>>>
>>>      
>>>
>>>>The new build system has landed on CVS.
>>>>        
>>>>
>>>[...]
>>>      
>>>
>>>> read BUILD.txt
>>>> cp blocks.properties local.blocks.properties
>>>> cp build.properties local.build.properties
>>>> [modify the local copies as you like, leaving the original intact]
>>>> build webapp [this will generate the webapp]
>>>>        
>>>>
>>>Does overriding boolean properties work? If I set
>>>      
>>>
>>>"exclude.webapp.samples=false"
>>>in local.build.properties a target like <target
>>>name="prepare-webapp-samples" depends="package-samples"
>>>unless="exclude.webapp.samples"> won't be executed. "unless" does
>>>not test, if the variable has the value of "true" or "false".
>>>      
>>>
>>>It tests, if the value is defined.  At least, that's what the
>>>documentation for ant 1.5 says.
>>>      
>>>
>>>The only way to execute the target is removing the definition from
>>>local.build.properties
>>>      
>>>
>>>and build.properties. The result will be failed build, but that's a other story.
>>>      
>>>
>>You don't have to set things to false, you have to uncomment them!
>>    
>>
>
>In local.build.properties? This would not help, since they
>are defined in build.properties, which is read by build.xml
>immediately   after  local.build.properties. You would have to uncomment 
>them in build.properties.
>
>Martin
>  
>

Failed on the same problem today. For those targets that we want to 
exclude in the default build, having a "exclude.xxx=true" in 
build.properties requires to modify this CVS-managed file to allow 
building "xxx", which obviously isn't good.

So I tried to go the other way and change to "include.xxx" properties 
along with <target name="xxx" if="include.xxx"> : this works just fine 
if I put "include.xxx=" in local.build.properties without changing 
build.properties.

Is this the way to go (I wouldn't like to break the build) ?

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



Re: The new build system

Posted by Sylvain Wallez <sy...@anyware-tech.com>.
Bernhard Huber wrote:

>>> fixed it for me introducing:
>>> <property file="blocks.properties"/>
>>> <condition property="unless.exclude.XXX">
>>>  <istrue value="${exclude.XXX}"/>
>>> </condition>
>>>
>>> and using
>>> <target ... unless="${unless.exclude.XXX}">
>>>
>>> this way you can set exclude.XXX in your local.build.properties to 
>>> true, or false as you like it.
>>
>>
>> However, I think it's not applicable for block excludes since it 
>> would require to change the build file for each new block. Or can we 
>> generate automatically a set of exist/not-exist properties from a set 
>> of true/false properties (custom task, XSLT, etc ?). 
>
>
> well, i didn't fully catch the working of tools/src/blocks-build.xsl, 
> yet, but your requirement should be solvable
> in this xsl a la
> <condition property="unless.exclude.{$block-name}">
>  <istrue value="exlcude.{$block-name}"/>
> </condition>
> this may - didn't checked it yet - solve your request.
> bye bernhard 


You're absolutely right, since block build isn't handled by the main 
build.xml

Thanks,
Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



Re: The new build system

Posted by Bernhard Huber <be...@a1.net>.
>
>
>> fixed it for me introducing:
>> <property file="blocks.properties"/>
>> <condition property="unless.exclude.XXX">
>>  <istrue value="${exclude.XXX}"/>
>> </condition>
>>
>> and using
>> <target ... unless="${unless.exclude.XXX}">
>>
>> this way you can set exclude.XXX in your local.build.properties to 
>> true, or false as you like it.
>
> However, I think it's not applicable for block excludes since it would 
> require to change the build file for each new block. Or can we 
> generate automatically a set of exist/not-exist properties from a set 
> of true/false properties (custom task, XSLT, etc ?). 

well, i didn't fully catch the working of tools/src/blocks-build.xsl, 
yet, but your requirement should be solvable
in this xsl a la
<condition property="unless.exclude.{$block-name}">
  <istrue value="exlcude.{$block-name}"/>
</condition>
this may - didn't checked it yet - solve your request.
bye bernhard



Re: The new build system

Posted by Sylvain Wallez <sy...@anyware-tech.com>.
Bernhard Huber wrote:

>>
>> Failed on the same problem today. For those targets that we want to 
>> exclude in the default build, having a "exclude.xxx=true" in 
>> build.properties requires to modify this CVS-managed file to allow 
>> building "xxx", which obviously isn't good.
>>
>> So I tried to go the other way and change to "include.xxx" properties 
>> along with <target name="xxx" if="include.xxx"> : this works just 
>> fine if I put "include.xxx=" in local.build.properties without 
>> changing build.properties.
>>
> fixed it for me introducing:
> <property file="blocks.properties"/>
> <condition property="unless.exclude.XXX">
>  <istrue value="${exclude.XXX}"/>
> </condition>
>
> and using
> <target ... unless="${unless.exclude.XXX}">
>
> this way you can set exclude.XXX in your local.build.properties to 
> true, or false as you like it.


Good idea !

However, I think it's not applicable for block excludes since it would 
require to change the build file for each new block. Or can we generate 
automatically a set of exist/not-exist properties from a set of 
true/false properties (custom task, XSLT, etc ?).

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }




Re: The new build system

Posted by Bernhard Huber <be...@a1.net>.
>
> Failed on the same problem today. For those targets that we want to 
> exclude in the default build, having a "exclude.xxx=true" in 
> build.properties requires to modify this CVS-managed file to allow 
> building "xxx", which obviously isn't good.
>
> So I tried to go the other way and change to "include.xxx" properties 
> along with <target name="xxx" if="include.xxx"> : this works just fine 
> if I put "include.xxx=" in local.build.properties without changing 
> build.properties.
>
fixed it for me introducing:
<property file="blocks.properties"/>
<condition property="unless.exclude.XXX">
  <istrue value="${exclude.XXX}"/>
</condition>

and using
<target ... unless="${unless.exclude.XXX}">

this way you can set exclude.XXX in your local.build.properties to true, 
or false as you like it.




Re: The new build system

Posted by Stefano Mazzocchi <st...@apache.org>.
Sylvain Wallez wrote:
> Stefano Mazzocchi wrote:
> 
>> Sylvain Wallez wrote:
>>
>>> Do you mean that "in the future", the default will be for the build 
>>> system to exclude nothing ?
>>>
>>> Can't "the future" be right now and then let the user choose what he 
>>> wants to exclude using its local.build.properties instead of patching 
>>> build.properties ?
>>>
>>> Sylvain
>>
>>
>>
>> the current excluded things are those that don't work.
>>
> I'm on the way to make some of them work ;-)

Great! Thanks.



Re: The new build system

Posted by Sylvain Wallez <sy...@anyware-tech.com>.
Stefano Mazzocchi wrote:

> Sylvain Wallez wrote:
>
>> Do you mean that "in the future", the default will be for the build 
>> system to exclude nothing ?
>>
>> Can't "the future" be right now and then let the user choose what he 
>> wants to exclude using its local.build.properties instead of patching 
>> build.properties ?
>>
>> Sylvain
>
>
> the current excluded things are those that don't work.
>
I'm on the way to make some of them work ;-)

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



Re: The new build system

Posted by Stefano Mazzocchi <st...@apache.org>.
Sylvain Wallez wrote:
> Stefano Mazzocchi wrote:
> 
>> Sylvain Wallez wrote:
>>
>>> Failed on the same problem today. For those targets that we want to 
>>> exclude in the default build, having a "exclude.xxx=true" in 
>>> build.properties requires to modify this CVS-managed file to allow 
>>> building "xxx", which obviously isn't good.
>>
>>
>>
>> the exclude.* stuff that is not commented out in the build.properties 
>> will be in the future so the problem goes away.
> 
> 
> 
> Do you mean that "in the future", the default will be for the build 
> system to exclude nothing ?
> 
> Can't "the future" be right now and then let the user choose what he 
> wants to exclude using its local.build.properties instead of patching 
> build.properties ?
> 
> Sylvain
> 

the current excluded things are those that don't work.


Re: The new build system

Posted by Sylvain Wallez <sy...@anyware-tech.com>.
Stefano Mazzocchi wrote:

> Sylvain Wallez wrote:
>
>> Failed on the same problem today. For those targets that we want to 
>> exclude in the default build, having a "exclude.xxx=true" in 
>> build.properties requires to modify this CVS-managed file to allow 
>> building "xxx", which obviously isn't good.
>
>
> the exclude.* stuff that is not commented out in the build.properties 
> will be in the future so the problem goes away.


Do you mean that "in the future", the default will be for the build 
system to exclude nothing ?

Can't "the future" be right now and then let the user choose what he 
wants to exclude using its local.build.properties instead of patching 
build.properties ?

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



Re: The new build system

Posted by Stefano Mazzocchi <st...@apache.org>.
Sylvain Wallez wrote:
> Martin Holz wrote:
> 
>> Stefano Mazzocchi <st...@apache.org> writes:
>>
>>  
>>
>>> Martin Holz wrote:
>>>   
>>>
>>>> Stefano Mazzocchi <st...@apache.org> writes:
>>>>
>>>>     
>>>>
>>>>> The new build system has landed on CVS.
>>>>>       
>>>>
>>>> [...]
>>>>     
>>>>
>>>>> read BUILD.txt
>>>>> cp blocks.properties local.blocks.properties
>>>>> cp build.properties local.build.properties
>>>>> [modify the local copies as you like, leaving the original intact]
>>>>> build webapp [this will generate the webapp]
>>>>>       
>>>>
>>>> Does overriding boolean properties work? If I set
>>>>     
>>>> "exclude.webapp.samples=false"
>>>> in local.build.properties a target like <target
>>>> name="prepare-webapp-samples" depends="package-samples"
>>>> unless="exclude.webapp.samples"> won't be executed. "unless" does
>>>> not test, if the variable has the value of "true" or "false".
>>>>     
>>>> It tests, if the value is defined.  At least, that's what the
>>>> documentation for ant 1.5 says.
>>>>     
>>>> The only way to execute the target is removing the definition from
>>>> local.build.properties
>>>>     
>>>> and build.properties. The result will be failed build, but that's a 
>>>> other story.
>>>>     
>>>
>>> You don't have to set things to false, you have to uncomment them!
>>>   
>>
>>
>> In local.build.properties? This would not help, since they
>> are defined in build.properties, which is read by build.xml
>> immediately   after  local.build.properties. You would have to 
>> uncomment them in build.properties.
>>
>> Martin
>>  
>>
> 
> Failed on the same problem today. For those targets that we want to 
> exclude in the default build, having a "exclude.xxx=true" in 
> build.properties requires to modify this CVS-managed file to allow 
> building "xxx", which obviously isn't good.

the exclude.* stuff that is not commented out in the build.properties 
will be in the future so the problem goes away.