On 28/07/2011 18:39, Lars Huttar wrote:
On 7/1/2011 2:19 AM, Francesco Chicchiriccò wrote:
On 30/06/2011 18:55, Andre Juffer wrote:
Simo,

how much of Cocoon 2.2's functionality is still available in Cocoon
3. Using sitemaps in the 2.2 way is actually rather convenient in a
number of cases. I assume that this all is still possible with
cocoon 3?

Hi Andre,
the "good old way" to pipelines is still there in Cocoon 3, even
though it is - at least at the moment - provided with less components
(generators / transformers / serializers) that 2.1 and 2.2.

To have an idea about Cocoon 3 features, I suggest you to take a
quick look at the sources of C3 sample block [1] and C3 sample web
application [2]: if you are familiar with 2.2, you should get easily
into the code.

Moreover, consider that archetypes are also available, so you can
start your own block with:

mvn archetype:generate \
    -DarchetypeGroupId=org.apache.cocoon.archetype-block \
    -DarchetypeArtifactId=cocoon-archetype-block \

-DarchetypeRepository=https://repository.apache.org/content/repositories/snapshots
\
    -DarchetypeVersion=3.0.0-beta-1-SNAPSHOT

launch it with

mvn package jetty:run

and access it at http://localhost:8888/

Finally, C3 provides a native integration with Wicket in which you
can use either the new (java) and old (XML) approach: look at this
blog entry [3] for more details.

Cheers.

[1] https://svn.apache.org/repos/asf/cocoon/cocoon3/trunk/cocoon-sample/
[2]
https://svn.apache.org/repos/asf/cocoon/cocoon3/trunk/cocoon-sample-webapp/
[3]
http://chicchiricco.blogspot.com/2011/06/build-rich-xml-enabled-applications.html

Thanks for your patience as I try to wrap my head around the
conceptual model of Cocoon blocks and Maven artifacts.

To build beta-1-SNAPSHOT artifacts, do I need to first install Cocoon
beta-1-SNAPSHOT? My guess is, no: Cocoon (beta-1-SNAPSHOT) *is* one of
the artifacts you can generate. Right?

However, when I run the above "mvn archetype:generate" command, with
all the -D options, I get the following error:

[ERROR] The goal you specified requires a project to execute but there
is no POM
 in this directory (C:\Program Files\Apache Software Foundation).
Please verify
you invoked Maven from the correct directory. -> [Help 1]

This happens because in the command above I did not specify all the parameters: namely, groupId and artifactId are missing. These two properties define YOUR project, the one that you are generating from that archetype, and also the name of the directory that the archetype will create.

In order to have something equivalent to the command specified in Cocoon 3's download page, you should use instead

mvn archetype:generate \
    -DarchetypeGroupId=org.apache.cocoon.archetype-block \
    -DarchetypeArtifactId=cocoon-archetype-block \

-DarchetypeRepository=https://repository.apache.org/content/repositories/snapshots \
    -DarchetypeVersion=3.0.0-beta-1-SNAPSHOT \
    -DgroupId=com.mycompany \
    -DartifactId=mysample

Please also note that you are *not* building beta-1-SNAPSHOT artifacts, but you are building your project, generated from an archetype that refers to Cocoon 3 beta-1-SNAPSHOT artifacts. In fact, you can easily see that artifacts are available at maven repository at https://repository.apache.org/content/repositories/snapshots/org/apache/cocoon/.

These artifacts are automatically built and deployed via Apache's Jenkins CI.

Anyway, I wouldn't suggest to use SNAPSHOT artifacts (either modules and archetypes) for nothing but exploring, studying, testing, ...

Regards.

--
Francesco Chicchiriccò

Apache Cocoon Committer and PMC Member
http://people.apache.org/~ilgrosso/


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to