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 2006/02/12 15:29:24 UTC

Unified directory layout for trunk?

I was just looking briefly at the current directory layout of trunk and
it seems that we are currently using different layouts for the blocks.
Most blocks follow the layout suggested recently while others like the
databases or the xmldb do not. Is this supposed to change?

Carsten
-- 
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

Re: Unified directory layout for trunk?

Posted by Carsten Ziegeler <cz...@apache.org>.
Jean-Baptiste Quenot schrieb:
> * Jean-Baptiste Quenot:
> 
>> Also, I  cannot manage  to find anything  in src/blocks  where I
>> left the samples, still in need for M10N.  Has it been removed?
> 
> OK, you  removed the  svn:externals to blocks.   Got it.   Need to
> checkout whole Cocoon.
Or you can checkout just the xmldb directory from the blocks:

http://svn.apache.org/repos/asf/cocoon/blocks/xmldb/trunk/

Carsten
-- 
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

Re: Unified directory layout for trunk?

Posted by Jean-Baptiste Quenot <jb...@apache.org>.
* Jean-Baptiste Quenot:

> Also, I  cannot manage  to find anything  in src/blocks  where I
> left the samples, still in need for M10N.  Has it been removed?

OK, you  removed the  svn:externals to blocks.   Got it.   Need to
checkout whole Cocoon.
-- 
Jean-Baptiste Quenot
http://caraldi.com/jbq/

Re: M10N of xmldb and databases blocks

Posted by Jean-Baptiste Quenot <jb...@apache.org>.
* Jorg Heymans:

> Jean-Baptiste Quenot wrote:
>
> > > But where  do I  put web.xml, cocoon.xconf  and sitemap.xmap
> > > customizations?  Is there a M10N documentation available?
> >
> > Please help.   I don't know where  to put the xpatch  files, I
> > know that it works differently  now, but cannot manage to find
> > an example.
>
> Additional   xconf    configuration   should   be    picked   up
> automatically, there is a mechanism in place for this already.
>
> HTH, sorry for being so vague :(

As you say, all this is very  vague for me too.  Who could explain
in detail  how xconf, xweb  and xmap customizations are  made now?
We don't use XConfToolTask anymore, right?
-- 
Jean-Baptiste Quenot
http://caraldi.com/jbq/

Re: M10N of xmldb and databases blocks

Posted by Jean-Baptiste Quenot <jb...@apache.org>.
* Carsten Ziegeler:

> In fact,  there shouldn't  be any  patches to  web.xml required,
> everything  can  be configured  through  properties  - apart  of
> course from adding own servlets, filters or listeners.

Yes, we need  to add the Xindice servlet to  web.xml for the xmldb
block, unless we want to drop it  as I never heard of people using
it.
-- 
Jean-Baptiste Quenot
http://caraldi.com/jbq/

Re: M10N of xmldb and databases blocks

Posted by Carsten Ziegeler <cz...@apache.org>.
Jean-Baptiste Quenot schrieb:
> * Daniel Fagerstrom:
> 
>> Why  does the  DB  driver need  to be  configured  as a  servlet
>> init-parameter in the first place,  couldn't it be configured in
>> some component instead?
> 
> AFAICT  the required  database drivers  need to  be loaded  early.
> There  is a  mechanism in  the  CocoonServlet to  load classes  at
> initialization.   The  classes  to  load  are  determined  by  the
> 'load-class' init-param.
You can configure this as a property in some properties file stored in
WEB-INF/properties. So there shouldn't be the need for a patch to web.xml.
A property "org.apache.cocoon.classloader.load.classes.MYOWNKEY=MYCLASS"
should work.

In fact, there shouldn't be any patches to web.xml required, everything
can be configured through properties - apart of course from adding own
servlets, filters or listeners.

Carsten

-- 
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

Re: M10N of xmldb and databases blocks

Posted by Jean-Baptiste Quenot <jb...@apache.org>.
* Daniel Fagerstrom:

> Why  does the  DB  driver need  to be  configured  as a  servlet
> init-parameter in the first place,  couldn't it be configured in
> some component instead?

AFAICT  the required  database drivers  need to  be loaded  early.
There  is a  mechanism in  the  CocoonServlet to  load classes  at
initialization.   The  classes  to  load  are  determined  by  the
'load-class' init-param.
-- 
Jean-Baptiste Quenot
http://caraldi.com/jbq/

Re: M10N of xmldb and databases blocks

Posted by Daniel Fagerstrom <da...@nada.kth.se>.
Jorg Heymans skrev:
> Jean-Baptiste Quenot wrote:
> 
>>> But  where  do  I  put web.xml,  cocoon.xconf  and  sitemap.xmap
>>> customizations?  Is there a M10N documentation available?
>> Please help.  I  don't know where to put the  xpatch files, I know
>> that  it works  differently  now,  but cannot  manage  to find  an
>> example.
> 
> I'm a bit out of touch with the block activity lately so don't shoot me
> if i'm wrong, but i think this is the first block needing web.xml
> modifications for the block to work. I can't remember the mechanism of
> how this is supposed to work being discussed. Presumably the deployer
> would pick up the necessary modifications and somehow patch these into
> the running web.xml.

Why does the DB driver need to be configured as a servlet init-parameter 
in the first place, couldn't it be configured in some component instead?

/Daniel


Re: M10N of xmldb and databases blocks

Posted by Jorg Heymans <jh...@domek.be>.
Jean-Baptiste Quenot wrote:

>> But  where  do  I  put web.xml,  cocoon.xconf  and  sitemap.xmap
>> customizations?  Is there a M10N documentation available?
> 
> Please help.  I  don't know where to put the  xpatch files, I know
> that  it works  differently  now,  but cannot  manage  to find  an
> example.

I'm a bit out of touch with the block activity lately so don't shoot me
if i'm wrong, but i think this is the first block needing web.xml
modifications for the block to work. I can't remember the mechanism of
how this is supposed to work being discussed. Presumably the deployer
would pick up the necessary modifications and somehow patch these into
the running web.xml.

Additional xconf configuration should be picked up automatically, there
is a mechanism in place for this already.

HTH, sorry for being so vague :(

Jorg


Re: M10N of xmldb and databases blocks

Posted by Jean-Baptiste Quenot <jb...@apache.org>.
* Jean-Baptiste Quenot:

> But  where  do  I  put web.xml,  cocoon.xconf  and  sitemap.xmap
> customizations?  Is there a M10N documentation available?

Please help.  I  don't know where to put the  xpatch files, I know
that  it works  differently  now,  but cannot  manage  to find  an
example.
-- 
Jean-Baptiste Quenot
http://caraldi.com/jbq/

Re: Unified directory layout for trunk?

Posted by Jean-Baptiste Quenot <jb...@apache.org>.
* Carsten Ziegeler:

> Jean-Baptiste Quenot wrote:
>
> > Carsten,
> >
> > I'm  wondering  where  to  put  the  mock  classes  for  block
> > databases.  Where did you put portal's mock classes?
>
> The portals block has no mocks in 2.2 :) I think you're approach
> for the mocks is valid. What do others think?

OK, I created cocoon-databases and put impl and mocks within.

> > Concerning cocoon-xmldb, apart from the samples, what's wrong?
>
> So all you have  to do, is create this impl  module and move the
> sources into the appropriate directory.

OK.

But  where  do  I   put  web.xml,  cocoon.xconf  and  sitemap.xmap
customizations?  Is there a M10N documentation available?
-- 
Jean-Baptiste Quenot
http://caraldi.com/jbq/

Re: Unified directory layout for trunk?

Posted by Jorg Heymans <jh...@domek.be>.
Carsten Ziegeler wrote:

>> I'm wondering where  to put the mock classes  for block databases.
>> Where did you put portal's mock classes?
> The portals block has no mocks in 2.2 :) I think you're approach for the
> mocks is valid. What do others think?
>

Initially, I thought we could keep all our mocks in ./cocoon-mocks. This
would avoid the overhead of having to create and manage a separate
block/pom for the sake of a few empty classes.

Jean-Baptiste's approach however works equally well.


Jorg


Re: Unified directory layout for trunk?

Posted by Carsten Ziegeler <cz...@apache.org>.
Jean-Baptiste Quenot wrote:
> Carsten,
> 
> I'm wondering where  to put the mock classes  for block databases.
> Where did you put portal's mock classes?
The portals block has no mocks in 2.2 :) I think you're approach for the
mocks is valid. What do others think?

> 
> Also, I cannot manage to find  anything in src/blocks where I left
> the samples, still in need for M10N.  Has it been removed?
Don't know - if it has you have to find the last revision containing the
stuff.

> 
> Concerning cocoon-xmldb, apart from the samples, what's wrong?
For example compare the cocoon-template block with the cocoon-xmldb
block. The template block contains a module for the implementation
containing the source. It also uses the suggest m2 layout
(src/main/java). So all you have to do, is create this impl module and
move the sources into the appropriate directory.
For the samples, you can create a samples modules. Have a look at the
authentication-fw block for an example.

HTH
Carsten

-- 
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

Re: Unified directory layout for trunk?

Posted by Jean-Baptiste Quenot <jb...@apache.org>.
Carsten,

I'm wondering where  to put the mock classes  for block databases.
Where did you put portal's mock classes?

Also, I cannot manage to find  anything in src/blocks where I left
the samples, still in need for M10N.  Has it been removed?

Concerning cocoon-xmldb, apart from the samples, what's wrong?
-- 
Jean-Baptiste Quenot
http://caraldi.com/jbq/

Re: Unified directory layout for trunk?

Posted by Jean-Baptiste Quenot <jb...@apache.org>.
* Carsten Ziegeler:

> Upayavira schrieb:
>
> > Carsten Ziegeler wrote:
> >
> >> I was just looking briefly at the current directory layout of
> >> trunk  and it  seems that  we are  currently using  different
> >> layouts  for  the  blocks.   Most blocks  follow  the  layout
> >> suggested  recently while  others like  the databases  or the
> >> xmldb do not. Is this supposed to change?
> >
> > My  impression  is  that  this is  a  proposed  layout,  we're
> > waiting to see  how the few converted classes  work out before
> > converting any of the rest.
>
> Yes, I know -  but the problem imho is that  some of the already
> converted blocks do not use  the proposed layout, so basically -
> using some  hard words  - we  already have  a mess  wrt directly
> layout :(

I'm responsible  for this mess  on the xmldb and  database blocks,
sorry ;-)

In fact, the only reason the  old location for these two blocks is
still present  is because  of the  samples.  I  only took  care of
mavenizing the implementations.

I will take a look at it.
-- 
Jean-Baptiste Quenot
http://caraldi.com/jbq/

Re: Unified directory layout for trunk?

Posted by Carsten Ziegeler <cz...@apache.org>.
Upayavira schrieb:
> Carsten Ziegeler wrote:
>> I was just looking briefly at the current directory layout of trunk and
>> it seems that we are currently using different layouts for the blocks.
>> Most blocks follow the layout suggested recently while others like the
>> databases or the xmldb do not. Is this supposed to change?
> 
> My impression is that this is a proposed layout, we're waiting to see
> how the few converted classes work out before converting any of the rest.
>
Yes, I know - but the problem imho is that some of the already converted
blocks do not use the proposed layout, so basically - using some hard
words - we already have a mess wrt directly layout :(

Carsten

-- 
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

Re: Unified directory layout for trunk?

Posted by Upayavira <uv...@odoko.co.uk>.
Carsten Ziegeler wrote:
> I was just looking briefly at the current directory layout of trunk and
> it seems that we are currently using different layouts for the blocks.
> Most blocks follow the layout suggested recently while others like the
> databases or the xmldb do not. Is this supposed to change?

My impression is that this is a proposed layout, we're waiting to see
how the few converted classes work out before converting any of the rest.

How are we getting on with tat evaluation?

Are we ready for volunteers to convert the rest?

Upayavira