cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francesco Chicchiriccò <ilgro...@apache.org>
Subject Re: [C3] Working with archetypes [Was Re: parent of parent artifact?]
Date Fri, 16 Mar 2012 16:55:15 GMT
Fixing instructions...

On 16/03/2012 15:05, Francesco Chicchiriccò wrote:
> Reported from scratch, to avoid confusion.
>
> 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 add this to mywebapp/pom.xml, right before <build>...</build>:
>
> <dependencies>
> <dependency>
> <groupId>com.mycompany</groupId>
> <artifactId>mysite</artifactId>
> <version>${project.version}</version>
> </dependency>
> </dependencies>
>
> then, from inside myparent directory:
>
> mvn clean package

This must rather be "mvn clean install" if you want to launch webapp as 
indicated below.

> Now you can finally run:
>
> cd mywebapp
> mvn jetty:run
>
> You can also deploy the generated 
> mywebapp/target/mywebapp-1.0-SNAPSHOT.war to an external container, 
> like as Tomcat.
>
> Regards.
-- 
Francesco Chicchiriccò

Apache Cocoon PMC and Apache Syncope PPMC Member
http://people.apache.org/~ilgrosso/


Mime
View raw message