You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Carsten Ziegeler <cz...@apache.org> on 2005/01/13 13:22:24 UTC

[RT] Update to build system: location of blocks and gump

I'm currently thinking about making the build system able to include 
blocks from "external" locations, which means blocks that are not 
directly in the cocoon directory.
I'm thinking of a simple but working solution: I guess the easiest way 
would be to just add the root directory for a block to our gump 
descriptor. Currently the build system assumes that a block is located 
at src/blocks/BLOCKNAME.
When the build system uses this information from gump.xml, we can simply 
include a "local.gump.xml" containing some more projects into the 
gump.xml and build an aggregated description that is only used by the 
build process. Gump itself is not affected as it still uses the gump.xml.

So my questions are:
- Is there a possibility in gump to define the root directory for a block?
- Does this change have any impact on other parts that I oversee?

Carsten

Re: [RT] Update to build system: location of blocks and gump

Posted by Carsten Ziegeler <cz...@apache.org>.
Nicola Ken Barozzi wrote:
> Nicola Ken Barozzi wrote:
> ...
> 
>> Because in fact our artifacts, that are searched by Gump in the 'work' 
> 
> 
> Rats, I meant 'home' :-/
> 
> "The home directory for a project is the directory which contains the 
> files referenceable by another project."
> 
>> dir, are in the 'build' dir that is nested, IOW found relative to the 
>> project 'src' dir (what we would call 'base' dir).
> 
> 
> something like
> 
> $srcdir/$home@nested/build
> 
Thanks for the info, Nicola - to be honest I'm still not sure what way 
would work. I hoped that our Mr. Gump, Stefano, could help us here?

Anyways, I will try the basedir attribute. After I added it to the 
descriptor Gump will finally tell us what it thinks about it.

Carsten

Re: [RT] Update to build system: location of blocks and gump

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Nicola Ken Barozzi wrote:
...
> Because in fact our artifacts, that are searched by Gump in the 'work' 

Rats, I meant 'home' :-/

"The home directory for a project is the directory which contains the 
files referenceable by another project."

> dir, are in the 'build' dir that is nested, IOW found relative to the 
> project 'src' dir (what we would call 'base' dir).

something like

$srcdir/$home@nested/build

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Re: [RT] Update to build system: location of blocks and gump

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Carsten Ziegeler wrote:
> Nicola Ken Barozzi wrote:
> 
>> Carsten Ziegeler wrote:
>> ...
>>> - Is there a possibility in gump to define the root directory for a 
>>> block?
>>
>> http://gump.apache.org/metadata/project.html#home
> 
> Yes, I read this and was puzzled as we define the build directory as the 
> value for "nested".

Because in fact our artifacts, that are searched by Gump in the 'work' 
dir, are in the 'build' dir that is nested, IOW found relative to the 
project 'src' dir (what we would call 'base' dir).

>> http://gump.apache.org/metadata/builder.html#Generic+Builder
>> (basedir)
>>
> Hmm, currently this is not defined. Would it break gump builds if we set 
> it (as the value then would be different from the default)?

Gump basically does a 'cd' on basedir before starting. If the build is 
not made to handle this, yes, it would break. It should not happen if 
every project had it's own build.xml. IMHO this is the correct solution.

Another solution is to pass a property to Ant in the <ant> tag in Gump.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Re: [RT] Update to build system: location of blocks and gump

Posted by Carsten Ziegeler <cz...@apache.org>.
Nicola Ken Barozzi wrote:
> Carsten Ziegeler wrote:
> ...
> 
>> - Is there a possibility in gump to define the root directory for a 
>> block?
> 
> 
> http://gump.apache.org/metadata/project.html#home

Yes, I read this and was puzzled as we define the build directory as the 
value for "nested".

> 
> http://gump.apache.org/metadata/builder.html#Generic+Builder
> (basedir)
> 
Hmm, currently this is not defined. Would it break gump builds if we set 
it (as the value then would be different from the default)?

Carsten

Re: [RT] Update to build system: location of blocks and gump

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Carsten Ziegeler wrote:
...
> - Is there a possibility in gump to define the root directory for a block?

http://gump.apache.org/metadata/project.html#home

http://gump.apache.org/metadata/builder.html#Generic+Builder
(basedir)

> - Does this change have any impact on other parts that I oversee?

Not AFAIK.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Re: [RT] Update to build system: location of blocks and gump

Posted by Geoff Howard <ge...@gmail.com>.
I could swear someone did this about a month ago?

Geoff


On Thu, 13 Jan 2005 13:22:24 +0100, Carsten Ziegeler
<cz...@apache.org> wrote:
> I'm currently thinking about making the build system able to include
> blocks from "external" locations, which means blocks that are not
> directly in the cocoon directory.
> I'm thinking of a simple but working solution: I guess the easiest way
> would be to just add the root directory for a block to our gump
> descriptor. Currently the build system assumes that a block is located
> at src/blocks/BLOCKNAME.
> When the build system uses this information from gump.xml, we can simply
> include a "local.gump.xml" containing some more projects into the
> gump.xml and build an aggregated description that is only used by the
> build process. Gump itself is not affected as it still uses the gump.xml.
> 
> So my questions are:
> - Is there a possibility in gump to define the root directory for a block?
> - Does this change have any impact on other parts that I oversee?
> 
> Carsten
>

Re: [RT] Update to build system: location of blocks and gump

Posted by Carsten Ziegeler <cz...@apache.org>.
Carsten Ziegeler wrote:
> I'm currently thinking about making the build system able to include 
> blocks from "external" locations, which means blocks that are not 
> directly in the cocoon directory.
> I'm thinking of a simple but working solution: I guess the easiest way 
> would be to just add the root directory for a block to our gump 
> descriptor. Currently the build system assumes that a block is located 
> at src/blocks/BLOCKNAME.
> When the build system uses this information from gump.xml, we can simply 
> include a "local.gump.xml" containing some more projects into the 
> gump.xml and build an aggregated description that is only used by the 
> build process. Gump itself is not affected as it still uses the gump.xml.
> 
Ok, I have finished the changes and it seems to work :) You can now 
simply add one or more "local.blocks.*.xconf" files to the root 
directory containing patches for gump.xml. Each (block) project now has 
a src directory with the location of the block. You can point the 
location to a directory outside of the cocoon directory and include your 
own blocks during the build process.

HTH
Carsten

Re: [RT] Update to build system: location of blocks and gump

Posted by Daniel Fagerstrom <da...@nada.kth.se>.
Carsten Ziegeler wrote:

> I'm currently thinking about making the build system able to include 
> blocks from "external" locations, which means blocks that are not 
> directly in the cocoon directory.

Excelent!

> I'm thinking of a simple but working solution: I guess the easiest way 
> would be to just add the root directory for a block to our gump 
> descriptor. Currently the build system assumes that a block is located 
> at src/blocks/BLOCKNAME.
> When the build system uses this information from gump.xml, we can 
> simply include a "local.gump.xml" containing some more projects into 
> the gump.xml and build an aggregated description that is only used by 
> the build process. Gump itself is not affected as it still uses the 
> gump.xml.

Sounds reasonable. You might also want to take a look at 
http://issues.apache.org/bugzilla/show_bug.cgi?id=32212, that allow for 
declaring external blocks in local.blocks.properties. The patch still 
requires changes to gump.xml, so your approach seem more convinient.

> So my questions are:
> - Is there a possibility in gump to define the root directory for a 
> block?
> - Does this change have any impact on other parts that I oversee?

Don't know.

/Daniel