cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Refondini <patrick.refond...@pobox.com>
Subject Re: How to run block built with cocoon-22-archetype-block
Date Mon, 04 Dec 2006 23:24:39 GMT
Reinhard Poetz wrote:
> Patrick Refondini wrote:
> 
>> Reinhard Poetz wrote:
>>
>>> Patrick Refondini wrote:
>>>
>>>> Is there a cocoon-22-archetype-block working with the current trunk ?
>>>
>>>
>>>
>>> no, yesterday evening I've started to work on it.
>>>
>> Great ! I'll be please to give feedback when it is available.
> 
> 
> please try (IIRC, the only thing you forgot was the blocks-fw-impl 
> dependency)
Indeed blocks-fw-impl was missing !


I have tested referencing the a testblock from a testwebapp as follow:

Created testblock:

mvn archetype:create -DarchetypeGroupId=org.apache.cocoon 
-DarchetypeArtifactId=cocoon-22-archetype-block 
-DarchetypeVersion=1.0.0-M4-SNAPSHOT -DgroupId=ch.extentis 
-DartifactId=testblock

Installed testblock

Created testwebapp

mvn archetype:create -DarchetypeGroupId=org.apache.cocoon 
-DarchetypeArtifactId=cocoon-22-archetype-webapp 
-DarchetypeVersion=1.0.0-SNAPSHOT -DgroupId=ch.extentis 
-DartifactId=testwebapp

Added testblock dependency to testwebapp POM:

<dependency>
   <groupId>ch.extentis</groupId>
   <artifactId>testblock</artifactId>
   <version>1.0-SNAPSHOT</version>
</dependency>

Added the following to testwebapp sitemap:

<!--  Reference any block by its blockContextURL / mount path ?  --> 

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


Then after
mvn package jetty:run

I could get testblock answer from localhost:8888/testblock/


Is this the right way to proceed for referencing blocks from a webapp ? 
I just discovered blockcontext: syntax lately.

TIA,

Patrick




> 
>> What else can a user do to help ? Updating related documentation ? 
>> I'll have a look to the FAQ.
> 
> 
> Documentation is always welcome! It would be great to have a second 
> getting started document ("Getting started in 5 minutes") that explains 
> how to connect to another block and how to use inheritance.
> 


Mime
View raw message