Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Cocoon Wiki" for change 
notification.

The following page has been changed by PhilippSchmidt:
http://wiki.apache.org/cocoon/HowToRunTheTrunk

The comment on the change is:
 

New page:
==  ==
- TARGET-AUDIENCE: beginner '''*advanced*'''  expert[[BR]]
- COCOON-RELEASES: 2.2-dev [[BR]]
- DOCUMENT-STATUS: '''*draft*''' reviewed released[[BR]]
----

=== What you will get from this page ===

This will show you how to start Cocoon in OGSi mode.

=== Technical prerequisites ===

 1. maven 2.0.2 or better 
 1. eclipse 3.2RC1a or better

=== Necessary Steps ===

 1. checkout the complete trunk
 1. from the ''./trunk'' run
 {{{
 $mvn clean install -Dmaven.test.skip=true }}}
 Call this until you get '''BUILD SUCCESSFUL''' - sometimes donwloads from maven
 repositories are temporarily unaccessible and cause the build to fail.

==== HOW TO START THE COCOON WEBAPP (CLASSIC MODE) ====

This starts Cocoon as a servlet in jetty like the 2.X versions.

 1. go to ''./trunk/core/cocoon-webapp'' and run {{{
  $ mvn cocoon:deploy
  $ mvn jetty6:run}}}

 1. point your browser to http://localhost:8888/ or 
http://localhost:8888/apps/cocoon-deployer-plugin-demo/test

==== HOW TO START THE COCOON WEBAPP IN (OGSI MODE) ====

 1. from ''./trunk'' run {{{
  $mvn eclipse:clean }}} first to remove any left over eclipse files. Then run 
{{{
  $mvn eclipse:eclipse }}}

 1. Declare the '''M2_REPO''' classpath in your workspace. You can do this by 
running the following command {{{
  $mvn -Declipse.workspace=<path-to-eclipse-workspace> eclipse:add-maven-repo 
}}} or do this manually.

 1. go to ''./trunk/core/cocoon-core'' and run {{{
  $mvn c-eclipse:eclipse -o. }}} This makes the project an PDE project. This 
means that Eclipse offers tools to support development based on OSGi. 

 1. Go to Eclipse and make sure you haven't mounted the trunk as project 
already. Do '''''[File-Import]->[Existing projects into workspace]''''', then 
point to your ''./trunk'' directory. [[BR]] Add following projects to your 
workspace:
  * cocoon-core
  * cocoon-blocks-fw-impl
  * cocoon-licences

 1. Add the Equinox target platform to your workspace: 
'''''[Window]->[Preferences]->[Plug-In Development]->[Target Platform]''''' and 
choose ''./cocoon/trunk/tools/equinox-target-platform'' as base directory for 
the new target platform.
   
 1. Start Cocoon by '''''[Run]->[Run]->[Equinox OSGI Framework]''''' and create 
a new instance.

 1. Run it by hitting the '''''[Run]''''' button

 1. point your browser to http://localhost/sitemap-test/test (the first reponse 
produces an error because nothing is returned, but after a refresh, everything 
works fine.)

=== Links to other information sources ===

http://maven.apache.org [[BR]]
http://www.eclipse.org [[BR]]
http://cocoon.apache.org/community/contrib.html#svnhowto [[BR]]
http://svn.apache.org/repos/asf/cocoon/trunk/README.txt [[BR]]
http://maven.apache.org/plugins/maven-eclipse-plugin/ [[BR]]
OsgiTipsAndTricks [[BR]]

----
===  page metadata ===
- AUTHOR: PhilippSchmidt [[BR]]
- AUTHOR-CONTACT: mailto:[EMAIL PROTECTED] [[BR]]
- REVIEWED-BY: [[BR]]
- REVIEWER-CONTACT: [[BR]]