Francesco,
I've been following your instructions below, starting from C). It all
seems to work well, but when I get down to "mvn jetty:run", I get the
following error:
[ERROR] Failed to execute goal
org.mortbay.jetty:maven-jetty-plugin:6.1.26:run (
default-cli) on project theWebapp: Webapp source directory
C:\Users\HuttarL\Docu
ments\work\c3\theParent\theWebapp\target\theWebapp-1.0-SNAPSHOT does not
exist -
> [Help 1]
(I changed "my" to "the" in folder names... minor cosmetic detail.)
I look, and it's true:
theParent\theWebapp\target\
does not contain a folder named "theWebapp-1.0-SNAPSHOT". It only
contains a folder named "classes".
But I don't understand the mvn process well enough to know why such a
folder is expected, or how to fix the problem.
If anyone wants to look at the full "mvn -e -X" stack trace and debug
info, it's here:
http://www.huttar.net/tmp/mvnerrors.txt
Any help is appreciated!
Lars
On 3/8/2012 3:49 AM, Francesco Chicchiriccò wrote:
C) If you want to develop a complete C3 web application
You need to generate a multimodule maven project [2] with the
following structure:
myparent/
mysite/
mywebapp/
Basically, you will need this when either having multiple blocks on a
single webapp or when you want to deploy on an external web container
(say Tomcat).
In order to generate such multimodule project you need to
mvn archetype:generate \
-DarchetypeGroupId=org.apache.cocoon.archetype-parent \
-DarchetypeArtifactId=cocoon-archetype-parent \
-DarchetypeVersion=3.0.0-beta-1-SNAPSHOT \
-DgroupId=com.mycompany \
-DartifactId=myparent \
-Dversion=1.0-SNAPSHOT \
-DarchetypeRepository=https://repository.apache.org/content/repositories/snapshots/
then
cd myparent
mvn archetype:generate \
-DarchetypeGroupId=org.apache.cocoon.archetype-block \
-DarchetypeArtifactId=cocoon-archetype-block \
-DarchetypeVersion=3.0.0-beta-1-SNAPSHOT \
-DgroupId=com.mycompany \
-DartifactId=mysite \
-Dversion=1.0-SNAPSHOT \
-DarchetypeRepository=https://repository.apache.org/content/repositories/snapshots/
mvn archetype:generate \
-DarchetypeGroupId=org.apache.cocoon.archetype-webapp \
-DarchetypeArtifactId=cocoon-archetype-webapp \
-DarchetypeVersion=3.0.0-beta-1-SNAPSHOT \
-DgroupId=com.mycompany \
-DartifactId=mywebapp \
-Dversion=1.0-SNAPSHOT \
-DarchetypeRepository=https://repository.apache.org/content/repositories/snapshots/
Now you can finally
cd mywebapp
mvn jetty:run
I hope this helps.
Please indicate if there is something to complete / correct.
Regards.
[1] http://cocoon.apache.org/3.0/download.html
[2] http://maven.apache.org/guides/mini/guide-multiple-modules.html
--
Francesco Chicchiriccò
Apache Cocoon PMC and Apache Syncope PPMC Member
http://people.apache.org/~ilgrosso/