cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <gkossakow...@apache.org>
Subject Re: Archetypes, blocks, webapps ...
Date Tue, 17 Apr 2007 11:52:54 GMT
Andrew Savory napisaƂ(a):
> Hi,
> 
> On 16 Apr 2007, at 20:17, Grzegorz Kossakowski wrote:
> 
>> Apparently, it's different, webapp is used to... assembly a webapp,
>> run a webapp etc. However, in C2.2 every Cocoon webapp consists of set
>> of blocks. Webapp gives you infrastructure to assembly your blocks
>> into WAR file, it also gives you infrastructure to run (with help of
>> jetty) your application.
> 
> Right ... in which case, wouldn't it make sense to have an archetype for
> 'simple' applications, that effectively calls the webapp and block
> archetypes? It seems like there's currently a *lot* of work to do even
> for creating a simple publishing site, with no custom code.

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?

>>
>> That's right. Thinking about it further, I wonder if we could provide
>> more meaningful message that webapp is empty so it cannot do any thing
>> useful and one has to create block and start hacking there?
> 
> That would be very good.

I've created issue for it:
https://issues.apache.org/jira/browse/COCOON-2045

> 
> 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?

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/

Mime
View raw message