cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Savory <and...@luminas.co.uk>
Subject Re: Archetypes, blocks, webapps ...
Date Tue, 17 Apr 2007 12:48:14 GMT
Hi,

On 17 Apr 2007, at 12:52, Grzegorz Kossakowski wrote:

> I don't think it's "a *lot*" of work. All you have to do is to type  
> two commands:
> mvn archetype:create -DarchetypeGroupId=org.apache.cocoon - 
> DarchetypeArtifactId=cocoon-22-archetype-webapp - 
> DarchetypeVersion=1.0.0-M2
> -DgroupId=com.mycompany -DartifactId=myCocoonWebapp
>
> mvn archetype:create -DarchetypeGroupId=org.apache.cocoon - 
> DarchetypeArtifactId=cocoon-22-archetype-block - 
> DarchetypeVersion=1.0.0-M5
> -DgroupId=com.mycompany -DartifactId=myBlock1
>
> and add information about dependency to the myCocoonWebapp/pom.xml  
> file (three lines of XML). Then you are done and can start coding your
> application. Is it that much compared to the situation in C2.1  
> where there were no archetypes and you had to provide skeleton for  
> your
> sitemap by hand?

Well, consider the simplest (not necessarily best-practise but I'm  
sure quite common) case in 2.1:

./build.sh webapp
cp mount-table.xml.sample to mount-table.xml
edit mount-table.xml
... start developing sitemap etc ...

I suppose it's all relative. Those big scary mvn lines make it seem  
like a lot, even if it isn't. And what you end up with is a template  
application, and not a template publishing framework.

The emphasis with the demo is to show content from a Spring bean, and  
not for example a simple XML transformation. There's not even any  
XSLT in sight. This is a pretty dramatic change for what used to be a  
publishing framework.

I guess ultimately if it bothers me so much, I should scratch the  
itch and write a new archetype ;-)

>> But blocks still seem kinda heavyweight to me, if all I want is XML,
>> XSLT, sitemap ....
>
> I cannot follow you here. Compared to the C2.1, additional steps  
> you need to perform is creating webapp and adding dependency to  
> your block
> in webapp's pom. Creating block is actually similar to creating  
> directory with empty sitemap in C2.1.
> Do I miss something that involves more effort?

No, I guess there's not much difference ... just new things to learn  
and make sure they're documented.


Thanks,

Andrew.
--
Andrew Savory, Managing Director, Sourcesense UK
Tel: +44 (0)870 741 6658  Fax: +44 (0)700 598 1135
Web: http://www.sourcesense.com/



Mime
View raw message