You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Jakob Praher <jp...@yahoo.de> on 2003/03/19 15:27:42 UTC

build blocks - minor thing - and patch

hi all,

I found the following problem when compiling the whole cocoon-2.1-dev:

blocks that have no configuration files in their /conf directory result
in no "conf" directory at all in the ${build.blocks}/name directory.

this again results in a NullPointerException in the XConfTool ant task,
since it assumes that the directory exists.

one could solve it by:

a) patching the XConfTool to check if the path realy exists
b) patching the blocks-build.xsl to not only copy all from ${blocks} to
${build.blocks} but also create the conf file manually if there are no
conf files in it.
c) excluding the ant-call to "{$block-name}-patches" from a block which
has no conf files.

I have chosen to use b) - attached see my small patch. 

thanks

-- Jakob


Re: build blocks - minor thing - and patch

Posted by Jakob Praher <jp...@yahoo.de>.
Am Mit, 2003-03-19 um 17.17 schrieb Stefano Mazzocchi:
> Jakob Praher wrote:
> 
> > Index: blocks-build.xsl
> > ===================================================================
> > RCS file: /home/cvspublic/xml-cocoon2/tools/src/blocks-build.xsl,v
> > retrieving revision 1.26
> > diff -u -r1.26 blocks-build.xsl
> > --- blocks-build.xsl	3 Mar 2003 14:03:34 -0000	1.26
> > +++ blocks-build.xsl	19 Mar 2003 14:30:21 -0000
> > @@ -123,6 +123,7 @@
> >        <target name="{$block-name}-prepare">
> >           <mkdir dir="{string('${build.blocks}')}/{$block-name}/dest"/>
> >  
> > +         <mkdir dir="{string('${build.blocks}')}/{$block-name}/conf">
> >           <copy filtering="on" todir="{string('${build.blocks}')}/{$block-name}/conf">
> >              <fileset dir="{string('${blocks}')}/{$block-name}/conf">
> >                 <include name="**/*.x*" />
> 
> Applied.
> 
> Next time, at least, make it well formed ;-)
sorry - was too fast again ;-)



Re: build blocks - minor thing - and patch

Posted by Stefano Mazzocchi <st...@apache.org>.
Jakob Praher wrote:

> Index: blocks-build.xsl
> ===================================================================
> RCS file: /home/cvspublic/xml-cocoon2/tools/src/blocks-build.xsl,v
> retrieving revision 1.26
> diff -u -r1.26 blocks-build.xsl
> --- blocks-build.xsl	3 Mar 2003 14:03:34 -0000	1.26
> +++ blocks-build.xsl	19 Mar 2003 14:30:21 -0000
> @@ -123,6 +123,7 @@
>        <target name="{$block-name}-prepare">
>           <mkdir dir="{string('${build.blocks}')}/{$block-name}/dest"/>
>  
> +         <mkdir dir="{string('${build.blocks}')}/{$block-name}/conf">
>           <copy filtering="on" todir="{string('${build.blocks}')}/{$block-name}/conf">
>              <fileset dir="{string('${blocks}')}/{$block-name}/conf">
>                 <include name="**/*.x*" />

Applied.

Next time, at least, make it well formed ;-)