cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Poetz <reinh...@apache.org>
Subject Re: Cocoon 2.2 - Build and deployment with Maven2
Date Mon, 12 Dec 2005 14:38:50 GMT

After working on the deployer and learning more about the Maven2 internals, I 
want to share 2 thougths:


I've already raised the question whether it is possible to merge block.xml and 
pom.xml. For now it's not as dependencies in pom.xml can't carry all the 
necessary information for us. Maven 1.1 models had support for properties 
elements, but they have been dropped in Maven 2.0 (Does anybody know the reason 
for it?). I also mentioned my concerns about tieing us to closely to Maven.

I think the solution for this is very simple: Our contract is block.xml.
As soon as a Maven pom.xml can give us all the required information and people 
use it as build descriptor, block.xml can be *automatically* generated for them 
during the build lifecycle and they don't have to care for it anymore. People 
that don't want to use Maven, have to provide a hand-crafted block.xml.

Going this way we are not blocked by getting the missing Maven features and 
blocks don't get tied to Maven which would make a future replacement of Maven 
very difficult.


                                      - o -


A second thought: As outlined in one of my previous mails, a Cocoon block will 
become a valid jar file, for example with following content:

ROOT
  +-- block.xml
  +-- pom.xml
  +-- sitemap.xmap
  +-- org
   |  +--myProject
   |     +-- MyJavaflowController.class
   +-- app
       +-- formTemplate.jx
       +-- image.gif
       +-- formDefinition.xml

At deployment this file is extracted into e.g. /WEB-INF/blocks/0000001. I wonder 
if this can cause problems as a lot of resources become part of the classpath 
but only MyJavaflowController.class should be.

If it is a problem we could provide two artifacts, one JAR file containing the 
classes and one that contains the resources which is extracted into 
/WEB-INF/blocks/0000001 but not added to the classpath. ... but this makes the 
build and the deployment more complicated for our users ...

Ideas/opinions?


-- 
Reinhard Pötz           Independent Consultant, Trainer & (IT)-Coach 

{Software Engineering, Open Source, Web Applications, Apache Cocoon}

                                        web(log): http://www.poetz.cc
--------------------------------------------------------------------

Mime
View raw message