WARNING: you are not looking at the live version but at an older version.

Getting started with Cocoon 2.2

You need to build the trunk of Cocoon in order to get your local repositories filled with the necessary artifacts.

The simplest way to start your own Cocoon 2.2 based project is using a Maven 2 archetype, that creates a block skeleton for you. It only contains a

  • minimal sitemap
  • a Flowscript that uses  a Spring bean
  • a view pipeline that uses JXTemplate to display values form the bean

Make sure that you have Maven 2.0.2 or above installed and then enter following command:

mvn archetype:create \
  -DarchetypeGroupId=org.apache.cocoon \
  -DarchetypeArtifactId=cocoon-22-archetype-block \
  -DarchetypeVersion=1.0.0-M2 \
  -DgroupId=com.mycompany \
  -DartifactId=myBlock \

once again for copy and paste without line feeds:
mvn archetype:create -DarchetypeGroupId=org.apache.cocoon -DarchetypeArtifactId=cocoon-22-archetype-block -DarchetypeVersion=1.0.0-M2 -DgroupId=com.mycompany -DartifactId=myBlock

The next step is changing into the myBlock directory and calling

mvn cocoon:deploy jetty6:run

After that, you can point your browser to

http://localhost:8888

and you should get a success page.

Comments (4)