cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <>
Subject Building trunk - Maven is your friend
Date Tue, 28 Feb 2006 20:55:18 GMT
After some thinking I think I have a simple solution to our problem
about how to build trunk with m2: it's simple, Maven can do this for us!

The Maven war plugin is able to assemble the webapp by combining the
contents of several war projects. So if we change all of our blocks
projects (that have samples or web resources) from "jar" to "war" and
then add the dependency to the war project in the pom in cocoon-webapp,
Maven does everything for us. I just tried this with the
cocoon-session-fw-sample block and it seems to work. Though I did not
get everything working. See below

Now - as always - there are some (minor) problems:
- Currently Maven requires that a war has a web.xml: This requires to
add a dummy web.xml to each sample block; this web.xml is later on
ignored as the web.xml from the cocoon-webapp is used. I guess if we go
this way, we can ask the maven guys to provide some option to make
web.xml optional.
- We have to restructure the directory layout of our blocks a little
bit: all resources for the webapp should go to src/main/webapp. So, for
example a block with a configuration (no sample block) has:
src/main/webapp/WEB-INF/conf with the configuration files while a sample
block might have a src/main/webapp/samples/blocks/BLOCKNAME/ directory.
- This seems to require the development version of the webapp plugin and
I wasn't able to include two webapps (session-fw-impl and session-fw).
Though looking at the code, it should work, m2 refused to do this, but
I had a week network connection, so it might be due to this?; I don't
have time today to invest here further, but I'm sure it should work,
so this should be a viable solution.

I think someone recently raised the question, how we distinguish between
sample and and functionality blocks. I think for now we can go with a
naming convention: if you want the sample, you depend on the sample
project, if not you depend on the impl.

Carsten Ziegeler - Open Source Group, S&N AG

View raw message