How to mount the Cocoon 2.2 projects in Eclipse
After following the Working with Cocoon 2.2 from trunk page you can mount the projects in Eclipse.
From the directory where you installed Cocoon trunk, we refer to it as /trunk, run
mvn eclipse:clean
first to remove any left over eclipse files. Then run
mvn -P allblocks eclipse:eclipse
This creates classpath and .project files for each module.
Next start Eclipse and make sure you haven't got trunk mounted as a project already. Also remove .classpath and .project files possibly remaining in /trunk from a previous project mount. Do File-Import->Existing projects into workspace, then point to your /trunk directory and it should detect the newly created blocks as projects.
You can also get Eclipse to download the sources of dependent libraries and attach them to the jars in Eclipse :
$ mvn -DdownloadSources=true eclipse:eclipse
For further information about the Maven Eclipse plugin visit http://maven.apache.org/plugins/maven-eclipse-plugin/.