Question

Is it possible to create a default Apache Cocoon project and then move it to MyEclipse as a standalone application?

I would really like to achieve this as I would be able to deploy and debug the application (basically do ALL work) in MyEclipse. No longer be dependent on pom.xml, hot deployment of dependent jars without shut down and restart, being able to create a packed deployment with a click and so on.

What do I do to achieve this? Any tips/advise would really be appreciated.

Was it helpful?

Solution

Try this:

Create a directory for your project (actually, you'll be creating two projects) and switch to it.

Enter the command:

mvn archetype:generate -DarchetypeCatalog=http://cocoon.apache.org

choose artifact 2 to create a sample block answer other questions appropriately

Enter the command:

mvn archetype:generate -DarchetypeCatalog=http://cocoon.apache.org

choose artifact 3 to create a cocoon web app answer other questions appropriately

Import maven projects into ME, File->Import->Maven4MyEclipse->Existing Maven Projects (use the parent directory, created above, as the base for import (copy it if you want to keep the original pristine as importing will actually use the project folder in place). Ignore errors.

In MyEclipse, edit the webapp pom and add the dependency as defined for the block project (you may be able to use content assist - Ctrl-Space - in each field after typing in the first few characters for groupid, artifactid and version). Save the pom.

Open the webap project properties (right click, select Properties) then go to the MyEclipse->Web page and Deployment tab. Deselect "Use workbench default settings" for Web Project Deployment Policy and select the JAR... choice. Click OK.

You should now be able to deploy using MyEclipse - try deploying to the inbuilt Tomcat server and use http://localhost:8080/cocoon-webapp/block1/ to reach your block in a web browser (change "block1" to whatever you called your new block).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top