Return-Path:
First, make sure that you have Maven 2.0.6 or above installed. You c=
an check
--- this by calling from command line. If this doesn't work for you, read the
+++ First, make sure that you have Maven 2.0.6 or above i=
nstalled.
+++ You can check this by calling mvn --version from command line. If this =
doesn't
+++ work for you, read the
Maven
in 5 Minutes tutorial. Next create a new directory which will be the root directory of your=
Cocoon
--- application. For this tutorial, let's name it getting-started-app=
tt>.
--- Change into it and invoke the cocoon-22-archetype-webapp arche=
type: Change into it and invoke the cocoon-22-archetype-webapp ar=
chetype:
+++ For copy and paste without line feeds: For your convenience you can create a parent pom for the two Maven m=
odules.
+++ For your convenience you can create a parent pom for the three Maven=
modules.
Create a file getting-started-app/pom.xml with following conte=
nt:Creating a Cocoon web application
=20
--- mvn --version
---=20
--- mvn archetype:create
-DarchetypeGroupId=3Dorg.apache.cocoon
-DarchetypeArtifactId=3Dcocoon-22-archetype-webapp
--- -DarchetypeVersion=3D1.0.0-M2
+++ -DarchetypeVersion=3D1.0.0-RC1
-DgroupId=3Dcom.mycompany
-DartifactId=3DmyCocoonWebapp
=20
mvn archetype:create -DarchetypeGroupId=3Dorg.apache.cocoon
--- -DarchetypeArtifactId=3Dcocoon-22-archetype-webapp -DarchetypeVersion=
=3D1.0.0-M2
+++ -DarchetypeArtifactId=3Dcocoon-22-archetype-webapp -DarchetypeVersion=
=3D1.0.0-RC1
-DgroupId=3Dcom.mycompany -DartifactId=3DmyCocoonWebapp=
p>
=20
Using a block within the web application
(35 equal lines skipped)
=20
Creating a parent pom
=20
--- <project xmlns=3D"http://maven.apache.org/POM/4.0.0"=20
(12 equal lines skipped)
<modules>
<module>myCocoonWebapp</module&g=
t;
<module>myBlock1</module>
--- </modules>
+++ <module>myBlock2</module>
+++ =C2=A0</modules>
</project>
=20
(3 equal lines skipped)
according to the dependency graph, in the correct order.
If you want to inherit information (e.g. plugin configurations, prop= erties, --- etc.) from the new parent pom to the two modules, you have to add the p= arent --- element to getting-started-app/myCocoonWebapp/pom.xml and --- getting-started-app/myBlock1/pom.xml:
+++ etc.) from the new parent pom to its child modules, you have to add the= parent +++ element to getting-started-app/myCocoonWebapp/pom.xml , +++ getting-started-app/myBlock1/pom.xml and +++ getting-started-app/myBlock2/pom.xml: =20<project xmlns=3D"http://maven.apache.org/POM/4.0.0"=20 xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"=20 (34 equal lines skipped)