You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Sébastien Geindre <se...@meteo.fr> on 2007/03/15 18:32:26 UTC

Packaging cocoon 2.1.10 web application ??

Hello all !!

i wonder how your organize your source in order to have an easy 
packaging  and deployment of a cocoon application ?

Do you use build.sh shell command with ant generation of cocoon.war with 
all your stuff inside ??

Imagine you have a webapp call 'project1' with sitemaps, xsl, 
flowscript, ressources, java class ...

How do you organize it ?

Thanks.

-- 
Sébastien Geindre
DPREVI/AERO/DEV
sebastien.geindre@meteo.fr
05 61 07 84 93




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Packaging cocoon 2.1.10 web application ??

Posted by Bertrand Delacretaz <bd...@apache.org>.
On 3/19/07, Sébastien Geindre <se...@meteo.fr> wrote:

> ...>> http://wiki.apache.org/cocoon/YourCocoonBasedProjectAnt16...
> Thanks both of you.
> So i tried, but it does not seem to be compatible with cocoon(2.1.10....

This build example is a fairly old one, you might have more luck with
BrickCms, http://wiki.apache.org/cocoon/BricksCms. It's based on
YourCocoonBasedProjectAnt16, only more complete and with some
improvements.

I just tested BricksCms against the current BRANCH_2_1_X code and it
works for me.

-Bertrand

Re: Packaging cocoon 2.1.10 web application ??

Posted by Sébastien Geindre <se...@meteo.fr>.
Bertrand Delacretaz a écrit :
> On 3/17/07, Thomas Scheithauer <co...@gmx.de> wrote:
>
>> ...Might that help you?
>>
>> http://wiki.apache.org/cocoon/YourCocoonBasedProjectAnt16...
Thanks both of you.
So i tried, but it does not seem to be compatible with cocoon(2.1.10.
I've got the following error :
[exec] /home/geindre/cocoon-2.1.10/tools/targets/init-build.xml:155: 
srcdir "/home/geindre/cocoon-2.1.10/${tools.src}/anttasks" does not exist!
the variable tools.src is not defined, and i do not know the ant task 
the build system needs....

Any help ?

>
> Or  http://wiki.apache.org/cocoon/BricksCms which is a more complete 
> example.
>
> -Bertrand



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Packaging cocoon 2.1.10 web application ??

Posted by Bertrand Delacretaz <bd...@apache.org>.
On 3/17/07, Thomas Scheithauer <co...@gmx.de> wrote:

> ...Might that help you?
>
> http://wiki.apache.org/cocoon/YourCocoonBasedProjectAnt16...

Or  http://wiki.apache.org/cocoon/BricksCms which is a more complete example.

-Bertrand

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Packaging cocoon 2.1.10 web application ??

Posted by Thomas Scheithauer <co...@gmx.de>.
Am 16.03.2007 um 12:05 schrieb Sébastien Geindre:

>
>>
>> From webapps/cocoon, "../.." resolved to the top level Tomcat  
>> directory.
>>
>> For me, and probably most people, Tomcat rebuilds or updates are a  
>> lot less
>> frequent than Cocoon rebuilds, so once in place, that file doesn't  
>> change much.
>> Cocoon and Tomcat live in my /usr/local/java directory, but the  
>> mount-table
>> mounts sitemaps in my home directory.  You shouldn't have to worry  
>> about
>> merging your app with new builds of cocoon.
>
> I also use mount-table.xml but how do you do with new java classes ?
> I can imagine to deliver :
> cocoon.war
> mount-table.xml
> myProject
> Have a configuration document which deals with global variables
>
> But tell them to copy classes file, no, i could not.
>
> How can i omit to copy them into cocoon/web-inf/classes ?

Might that help you?

http://wiki.apache.org/cocoon/YourCocoonBasedProjectAnt16






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Packaging cocoon 2.1.10 web application ??

Posted by Sébastien Geindre <se...@meteo.fr>.
>
> From webapps/cocoon, "../.." resolved to the top level Tomcat directory.
>
> For me, and probably most people, Tomcat rebuilds or updates are a lot 
> less
> frequent than Cocoon rebuilds, so once in place, that file doesn't 
> change much.
> Cocoon and Tomcat live in my /usr/local/java directory, but the 
> mount-table
> mounts sitemaps in my home directory.  You shouldn't have to worry about
> merging your app with new builds of cocoon.

I also use mount-table.xml but how do you do with new java classes ?
I can imagine to deliver :
cocoon.war
mount-table.xml
myProject
Have a configuration document which deals with global variables

But tell them to copy classes file, no, i could not.

How can i omit to copy them into cocoon/web-inf/classes ?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Packaging cocoon 2.1.10 web application ??

Posted by Sébastien Geindre <se...@meteo.fr>.
Thank you for your answer.
More precisely i need to deliver the product to the client as the 
simplest way.
The best should be a war file, included cocoon and my own application.

How can i build it easily ?

thank you.

Steven D. Majewski a écrit :
>
> On Mar 15, 2007, at 1:32 PM, Sébastien Geindre wrote:
>
>> Hello all !!
>>
>> i wonder how your organize your source in order to have an easy 
>> packaging  and deployment of a cocoon application ?
>>
>> Do you use build.sh shell command with ant generation of cocoon.war 
>> with all your stuff inside ??
>>
>> Imagine you have a webapp call 'project1' with sitemaps, xsl, 
>> flowscript, ressources, java class ...
>>
>> How do you organize it ?
>>
>> Thanks.
>
>
> I use Cocoon running under Tomcat on my laptop for development.
>
> In the root sitemap is:
>
>     <!--+
>         | Find a match in the "mount-table.xml" file, if present. It 
> allows to mount other
>         | directories without touching this main sitemap (and thus 
> loosing changes on rebuild).
>         |
>         | Note that other mount-tables can be added here using the 
> xpatch ant task
>         | (see src/confpatch/mount-table.xmap)
>         +-->
>     <map:match pattern="../../mount-table.xml" type="mount-table">
>       <map:mount src="{src}" uri-prefix="{uri-prefix}"/>
>     </map:match>
>
>
> From webapps/cocoon, "../.." resolved to the top level Tomcat directory.
>
> For me, and probably most people, Tomcat rebuilds or updates are a lot 
> less
> frequent than Cocoon rebuilds, so once in place, that file doesn't 
> change much.
> Cocoon and Tomcat live in my /usr/local/java directory, but the 
> mount-table
> mounts sitemaps in my home directory.  You shouldn't have to worry about
> merging your app with new builds of cocoon.
>
> If you use {contextpath:.} to pass a real path from the sitemap to any 
> components
> that need them you should not need to hardwire any absolute paths in 
> your cocoon
> app.  ( And I sometimes have duplicate copies -- one of the production 
> branch of the
> app and another test branch -- mounted by the mount-table. )
>
> I don't know how the files are arranged on the production server, but 
> set up this
> way, it doesn't matter. ( We are moving to a redundant cluster 
> environment, and I
> don't even have login access to the production servers:  I check 
> changes into
> subversion after testing on my laptop, and post-commit scripts on the 
> subversion
> server copy the updates to the web server. )
>
> I was also experimenting with producing a stand-alone version on a 
> CD-ROM using the
> standalone-demo/jetty build of cocoon. In this case, everything 
> relocated properly.
>
>
>
> The only glitch:
>   I try to stick to relative URLs, but there are some cases where I 
> can't.
>   I've been passing a base-url to some components as:
>
>     value="http://{request:serverName}:{request:serverPort}/{request:contextPath}" 
>
>
>   This works, but the production server is proxied thru apache and 
> squid ( and I don't
>   know what else! ;-) and this gives URLs like:
>
>         http://real.host:8080/cocoon/my-app/...
>
>   where what I really need is something like:
>
>         http://virtual.host/my-app/...
>
>
>   So, for now, I've got some inconsistent hacks around this problem,
>   while I look for a better way of constructing the right URLs.
>   ( And one of my inconsistent hacks is screwing up the ability to run
>      a test and a production version side by side -- some pages in
>      .../cocoon/my-test/...   are linking back to .../cocoon/my-app/... )
>
>
> -- Steve Majewski / UVA Alderman Library
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>


-- 
Sébastien Geindre
DPREVI/AERO/DEV
sebastien.geindre@meteo.fr
05 61 07 84 93




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Packaging cocoon 2.1.10 web application ??

Posted by "Steven D. Majewski" <sd...@virginia.edu>.
On Mar 15, 2007, at 1:32 PM, Sébastien Geindre wrote:

> Hello all !!
>
> i wonder how your organize your source in order to have an easy  
> packaging  and deployment of a cocoon application ?
>
> Do you use build.sh shell command with ant generation of cocoon.war  
> with all your stuff inside ??
>
> Imagine you have a webapp call 'project1' with sitemaps, xsl,  
> flowscript, ressources, java class ...
>
> How do you organize it ?
>
> Thanks.


I use Cocoon running under Tomcat on my laptop for development.

In the root sitemap is:

     <!--+
         | Find a match in the "mount-table.xml" file, if present. It  
allows to mount other
         | directories without touching this main sitemap (and thus  
loosing changes on rebuild).
         |
         | Note that other mount-tables can be added here using the  
xpatch ant task
         | (see src/confpatch/mount-table.xmap)
         +-->
     <map:match pattern="../../mount-table.xml" type="mount-table">
       <map:mount src="{src}" uri-prefix="{uri-prefix}"/>
     </map:match>


 From webapps/cocoon, "../.." resolved to the top level Tomcat  
directory.

For me, and probably most people, Tomcat rebuilds or updates are a  
lot less
frequent than Cocoon rebuilds, so once in place, that file doesn't  
change much.
Cocoon and Tomcat live in my /usr/local/java directory, but the mount- 
table
mounts sitemaps in my home directory.  You shouldn't have to worry about
merging your app with new builds of cocoon.

If you use {contextpath:.} to pass a real path from the sitemap to  
any components
that need them you should not need to hardwire any absolute paths in  
your cocoon
app.  ( And I sometimes have duplicate copies -- one of the  
production branch of the
app and another test branch -- mounted by the mount-table. )

I don't know how the files are arranged on the production server, but  
set up this
way, it doesn't matter. ( We are moving to a redundant cluster  
environment, and I
don't even have login access to the production servers:  I check  
changes into
subversion after testing on my laptop, and post-commit scripts on the  
subversion
server copy the updates to the web server. )

I was also experimenting with producing a stand-alone version on a CD- 
ROM using the
standalone-demo/jetty build of cocoon. In this case, everything  
relocated properly.



The only glitch:
   I try to stick to relative URLs, but there are some cases where I  
can't.
   I've been passing a base-url to some components as:

	value="http://{request:serverName}:{request:serverPort}/ 
{request:contextPath}"

   This works, but the production server is proxied thru apache and  
squid ( and I don't
   know what else! ;-) and this gives URLs like:

		http://real.host:8080/cocoon/my-app/...

   where what I really need is something like:

		http://virtual.host/my-app/...


   So, for now, I've got some inconsistent hacks around this problem,
   while I look for a better way of constructing the right URLs.
   ( And one of my inconsistent hacks is screwing up the ability to run
      a test and a production version side by side -- some pages in
      .../cocoon/my-test/...   are linking back to .../cocoon/my- 
app/... )


-- Steve Majewski / UVA Alderman Library








---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org