cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robby Pelssers <Robby.Pelss...@nxp.com>
Subject RE: parent of parent artifact?
Date Thu, 08 Mar 2012 09:36:46 GMT
Notes Cocoon 3 quick start guide:
------------------------------------

Check out latest sources from trunk.  In my case i checked them trunk out to 
c:/development/workspaces/cocoon3/trunk

Next change directory into that folder and run mvn install:

nxp10009@NXL01262 /c/development/workspaces/cocoon3/trunk
$ mvn install

Now would be a good time to get a coffee break as maven will download lots of dependencies
to your local maven repository.

If the project builds fine you will see following output:

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache Cocoon 3: Parent ........................... SUCCESS [5:19.105s]
[INFO] Apache Cocoon 3: Utilities ........................ SUCCESS [1:04.795s]
[INFO] Apache Cocoon 3: Pipeline ......................... SUCCESS [6.807s]
[INFO] Apache Cocoon 3: SAX .............................. SUCCESS [2:07.826s]
[INFO] Apache Cocoon 3: CLI .............................. SUCCESS [1:50.956s]
[INFO] Apache Cocoon 3: Sitemap .......................... SUCCESS [51.180s]
[INFO] Apache Cocoon 3: Controller ....................... SUCCESS [2.032s]
[INFO] Apache Cocoon 3: Servlet .......................... SUCCESS [27.873s]
[INFO] Apache Cocoon 3: Optional ......................... SUCCESS [2:24.414s]
[INFO] Apache cocoon 3: Databases integration components . SUCCESS [15.561s]
[INFO] Apache Cocoon 3: Monitoring ....................... SUCCESS [5.112s]
[INFO] Apache Cocoon 3: REST support ..................... SUCCESS [36.879s]
[INFO] Apache Cocoon 3: Profiling ........................ SUCCESS [18.912s]
[INFO] Apache cocoon 3: Optional REST components ......... SUCCESS [48.551s]
[INFO] Apache Cocoon 3: String Templates ................. SUCCESS [18.687s]
[INFO] Apache Cocoon 3: Shiro integration ................ SUCCESS [15.846s]
[INFO] Apache Cocoon 3: StAX ............................. SUCCESS [20.924s]
[INFO] Apache Cocoon 3: Wicket Integration ............... SUCCESS [34.500s]
[INFO] Apache Cocoon 3: All dependencies ................. SUCCESS [0.955s]
[INFO] Apache Cocoon 3: Databases sample integration ..... SUCCESS [19.855s]
[INFO] Apache Cocoon 3: Sample ........................... SUCCESS [28.252s]
[INFO] Apache Cocoon 3: Shiro sample integration ......... SUCCESS [3.460s]
[INFO] Apache Cocoon 3: Root ............................. SUCCESS [0.118s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19:12.546s
[INFO] Finished at: Thu Mar 08 09:50:26 CET 2012
[INFO] Final Memory: 49M/127M
[INFO] ------------------------------------------------------------------------


The archetypes are not built and installed yet so let's manually install those first.

nxp10009@NXL01262 /c/development/workspaces/cocoon3/trunk/cocoon-archetype-block
$ mvn install

nxp10009@NXL01262 /c/development/workspaces/cocoon3/trunk/cocoon-archetype-webapp
$ mvn install

Now let's start using the maven archetypes we juist built to quickly create a cocoon block
and cocoon webapp project.
**********************************************************************************************
nxp10009@NXL01262 /c/development/workspaces/cocoon3
$ mvn archetype:generate \
> -DgroupId=pelssers.cocoon \
> -DartifactId=demoblock \
> -Dversion=1.0-SNAPSHOT \
> -DpackageName=com.pelssers \
> -DarchetypeGroupId=org.apache.cocoon.archetype-block \
> -DarchetypeArtifactId=cocoon-archetype-block \
> -DarchetypeVersion=3.0.0-beta-1-SNAPSHOT \
> -DinteractiveMode=false


[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom <<<
[INFO]
[INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Batch mode
[INFO] Archetype repository missing. Using the one from [org.apache.cocoon.archetype-block:cocoon-archetype-block:3.0.0-alpha-3]
found in catalog remote
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Old (1.x) Archetype: cocoon-archetype-block:3.0.0-beta-1-SNAPSHOT
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: pelssers.cocoon
[INFO] Parameter: packageName, Value: pelssers.cocoon
[INFO] Parameter: package, Value: pelssers.cocoon
[INFO] Parameter: artifactId, Value: demoblock
[INFO] Parameter: basedir, Value: c:\development\workspaces\cocoon3
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] project created from Old (1.x) Archetype in dir: c:\development\workspaces\cocoon3\demoblock
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.044s
[INFO] Finished at: Thu Mar 08 10:29:03 CET 2012
[INFO] Final Memory: 7M/19M
[INFO] ------------------------------------------------------------------------



You should see that a demoblock has been created in your filesystem:

nxp10009@NXL01262 /c/development/workspaces/cocoon3
$ ls -la
total 10
drwxr-xr-x    4 nxp10009 Administ        0 Mar  8 10:29 .
drwxr-xr-x   13 nxp10009 Administ     4096 Mar  8 09:19 ..
drwxr-xr-x    4 nxp10009 Administ     4096 Mar  8 10:29 demoblock
drwxr-xr-x   34 nxp10009 Administ    12288 Mar  8 09:30 trunk
**********************************************************************************************

Next we will also generate a webapp project using the maven archetype

nxp10009@NXL01262 /c/development/workspaces/cocoon3
$ mvn archetype:generate \
>  -DgroupId=pelssers.cocoon \
>  -DartifactId=demoApp \
>  -Dversion=1.0-SNAPSHOT \
>  -DpackageName=com.pelssers \
>  -DarchetypeGroupId=org.apache.cocoon.archetype-webapp \
>  -DarchetypeArtifactId=cocoon-archetype-webapp \
>  -DarchetypeVersion=3.0.0-beta-1-SNAPSHOT \
>  -DinteractiveMode=false
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom <<<
[INFO]
[INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Batch mode
[INFO] Archetype repository missing. Using the one from [org.apache.cocoon.archetype-webapp:cocoon-archetype-webapp:3.0.0-alpha-3]
found in catalog remote
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Old (1.x) Archetype: cocoon-archetype-webapp:3.0.0-beta-1-SNAPSHOT
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: pelssers.cocoon
[INFO] Parameter: packageName, Value: pelssers.cocoon
[INFO] Parameter: package, Value: pelssers.cocoon
[INFO] Parameter: artifactId, Value: demoApp
[INFO] Parameter: basedir, Value: c:\development\workspaces\cocoon3
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] project created from Old (1.x) Archetype in dir: c:\development\workspaces\cocoon3\demoApp
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.188s
[INFO] Finished at: Thu Mar 08 10:31:54 CET 2012
[INFO] Final Memory: 7M/19M
[INFO] ------------------------------------------------------------------------
**********************************************************************************************

Check again if the demoApp has been created:
nxp10009@NXL01262 /c/development/workspaces/cocoon3
$ ls -la
total 10
drwxr-xr-x    5 nxp10009 Administ        0 Mar  8 10:31 .
drwxr-xr-x   13 nxp10009 Administ     4096 Mar  8 09:19 ..
drwxr-xr-x    3 nxp10009 Administ        0 Mar  8 10:31 demoApp
drwxr-xr-x    4 nxp10009 Administ     4096 Mar  8 10:29 demoblock
drwxr-xr-x   34 nxp10009 Administ    12288 Mar  8 09:30 trunk


In fact it would have been better if I also created a parent pom project using the cocoon-archetype-parent
archetype. But at least you're now able to e.g. modify the pom from
your demoApp and include e.g. that demoblock as a dependency.

I will try to write a nice blog in the next few weeks and explain much more detailed how to
get up and running in 1 hour.

Robby

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message