cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <giac...@apache.org>
Subject Try to get Block Archetypes working
Date Sun, 05 Nov 2006 14:21:41 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all

I'm trying to get the archetypes running again and checked with the
webapp one.

It builds without errors and it seems to have the correct structure:

./src/main/webapp/sitemap.xmap
./src/main/webapp/WEB-INF/applicationContext.xml
./src/main/webapp/WEB-INF/cocoon
./src/main/webapp/WEB-INF/cocoon/log4j.xconf
./src/main/webapp/WEB-INF/web.xml
./src/main/webapp/welcome.xml
./src/main/resources
./pom.xml

After a 'mvn install' the target directory look like this:

target/cocoon-webapp/sitemap.xmap
target/cocoon-webapp/META-INF
target/cocoon-webapp/WEB-INF/lib/cocoon-bootstrap-1.0.0-M2-SNAPSHOT.jar
target/cocoon-webapp/WEB-INF/applicationContext.xml
target/cocoon-webapp/WEB-INF/cocoon/lib/...
target/cocoon-webapp/WEB-INF/cocoon/log4j.xconf
target/cocoon-webapp/WEB-INF/web.xml
target/cocoon-webapp/welcome.xml
target/cocoon-webapp.war
target/classes

As there is no viewable dependency in the POM of the webapp archetype
I've added the template sample block to it as well as adding

      <map:match pattern="blocks/*/**">
        <map:mount uri-prefix="blocks/{1}" src="blocks/{1}/"/>
      </map:match>

into the pipeline of the sitemap.xmap to make any block available. The
puzzling thing is that until now one doesn't see any blocks anymore in the
target/cocoon-webapp (remember, blocks now are unpacked at runtime, not at
build time). Ans as Leszek mentioned in an earlier mail, blocks get expanded
including version string (i.e. cocoon-template-sample-1.0.0-SNAPSHOT)

The target directory after a 'mvn jetty6:run' look like:

./target/cocoon-webapp/blocks/cocoon-template-sample-1.0.0-SNAPSHOT/view/caching1.jx
./target/cocoon-webapp/blocks/cocoon-template-sample-1.0.0-SNAPSHOT/view/caching2.jx
./target/cocoon-webapp/blocks/cocoon-template-sample-1.0.0-SNAPSHOT/view/caching3.jx
./target/cocoon-webapp/blocks/cocoon-template-sample-1.0.0-SNAPSHOT/view/caching4.jx
./target/cocoon-webapp/blocks/cocoon-template-sample-1.0.0-SNAPSHOT/sitemap.xmap
./target/cocoon-webapp/blocks/cocoon-template-sample-1.0.0-SNAPSHOT/template.xsamples
./target/cocoon-webapp/blocks/cocoon-template-sample-1.0.0-SNAPSHOT/welcome.xml
./target/cocoon-webapp/sitemap.xmap
./target/cocoon-webapp/META-INF
./target/cocoon-webapp/WEB-INF/lib/cocoon-bootstrap-1.0.0-M2-SNAPSHOT.jar
./target/cocoon-webapp/WEB-INF/applicationContext.xml
./target/cocoon-webapp/WEB-INF/cocoon/lib/...
./target/cocoon-webapp/WEB-INF/cocoon/log4j.xconf
./target/cocoon-webapp/WEB-INF/web.xml
./target/cocoon-webapp/welcome.xml
./target/cocoon-webapp.war
./target/classes

Pointing the browser to
http://localhost:8888/blocks/cocoon-template-sample-1.0.0-SNAPSHOT/view/caching1
reveals that the template blocks relies on the samples directory in the
cocoon-webapp module. So copying over that directory directly to
target/cocoon-webapp/ seemed to help and to produce the correct sample page.

So from my POV the webapp archetype seems still to work with the new refactored
directory layout.

Ciao


- --
Giacomo Pati
Otego AG, Switzerland - http://www.otego.com
Orixo, the XML business alliance - http://www.orixo.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFTfN0LNdJvZjjVZARAsTlAKCTkzy89E6EC5Kjlzx/IgSkePMBBwCfaNz0
pJZa0XIKEcnXc6ufKfX2NZo=
=RW4d
-----END PGP SIGNATURE-----

Mime
View raw message