Dark theme | Light theme

September 5, 2008

Running the Cocoon 2.2 samples

Because Cocoon 2.2 now uses Maven we don't have to download the source code anymore. But if we want to see the samples web application we still do have to download the source code. We can checkout or export the source code from We must have Maven 2.0.9 installed and in our path before we can continue. Now we can go the directory where we put the source code. We must first set the environment variable MAVEN_OPTS and give it the value -Xmx256m. This is to make sure Maven can compile all Cocoon sources. Then we type:

mvn -P allblocks install -Dmaven.test.skip=true

With this command all Cocoon code and samples are compiled. We don't need the tests to be executed for our sample web application. Once Maven is finished, we must go to the directory core/cocoon-webapp. We can now start the samples web application by typing:

mvn -P allblocks jetty:run

In our web browser we open http://localhost:8888/ and we get our sample application start screen. If we click on the samples link we get an overview page of all the samples of all the blocks of Cocoon 2.2.