Author: jasha
Date: Wed Jan  2 07:16:55 2013
New Revision: 1427690

URL: http://svn.apache.org/viewvc?rev=1427690&view=rev
Log:
RAVE-864 document custom project using the archetype
use cargo:run instead of cargo:start

Added:
    rave/site/trunk/content/images/screenshot_custom_project.png   (with props)
Modified:
    rave/site/trunk/content/documentation/rave-extensions.mdtext
    rave/site/trunk/content/ide-settings-and-debugging.mdtext
    rave/site/trunk/content/source.mdtext

Modified: rave/site/trunk/content/documentation/rave-extensions.mdtext
URL: 
http://svn.apache.org/viewvc/rave/site/trunk/content/documentation/rave-extensions.mdtext?rev=1427690&r1=1427689&r2=1427690&view=diff
==============================================================================
--- rave/site/trunk/content/documentation/rave-extensions.mdtext (original)
+++ rave/site/trunk/content/documentation/rave-extensions.mdtext Wed Jan  2 
07:16:55 2013
@@ -18,42 +18,71 @@ Notice:    Licensed to the Apache Softwa
 
 One of the (main) goals of Apache Rave is to create an extendible platform. 
This document is to help Apache Rave users (developers) to customize Apache 
Rave based on needs.
 
-To get you started we have created a Sandbox and created a vanilla extension 
that shows how to implement CustomUserService and to personalize login page 
look and feel.
-The main objective of the vanilla extension is to provide reusable build 
environment with minimal required dependencies.
-Extension developers will be able to use the POM file provide and add 
additional project dependencies. 
+To get you started we have created a Maven archetype that generates a Rave 
project. This project shows how to use a custom (Spring) component and to 
customize the look and feel.
+Extension developers will be able to use the POM file provide and add 
additional project dependencies.
 
 ## Prerequisites
 
-The current version of Apache Rave must be in your local Maven repository.  To 
do this, [check out Apache Rave from SVN][1] and build with "mvn clean install".
+  - Java SE 6 or higher
+  - Apache Maven 3+ (version 3.0.3 or later is *required*) [Download][3] and 
[install][4]
 
-## Vanilla Extension Location
+A Maven archetype will be available to generate a custom Rave project for the 
0.19 release (January 2013) and future releases.
+You can also build this archetype from the latest (snapshot) code. To do this, 
[check out Apache Rave from SVN][1] and build with "mvn clean install".
 
-    svn co 
http://svn.apache.org/repos/asf/rave/sandbox/rave-extensions/rave-vanilla-extension
-    cd rave-vanilla-extension
-    mvn clean install
-    
-    cd rave-vanilla-extension-portal
-    mvn cargo:start 
-
-or
-    
-    mvn cargo:start -f rave-vanilla-extension-portal/pom.xml
+## Generate custom Rave project
 
-## Best Practices
+In your console or terminal navigate to the folder where you store your 
projects. The archetype will create the folder of the project inside this 
folder. Then type:
 
-- Add new javascript functions to new file or copy existing functions to new 
file and customize them and change imports based on your need. Reason is, 
changes/fixes in rave libraries should come to your project.
-- If you are are customizing css or adding new css methods add new files so 
that changes in default css files will come to your portal
-- Report any bug or issue to [Apache Rave JIRA][2]
+    mvn archetype:generate -DarchetypeGroupId=org.apache.rave 
-DarchetypeArtifactId=rave-custom-project-archetype
+
+Maven will try to download the `rave-custom-project-archetype`. Then asks you 
to define the custom project's groupId, artifactId etc. The default values are:
+
+    groupId: org.example
+    artifactId: myraveproject
+    version: 1.01.00-SNAPSHOT
+    package: org.example
+    projectName: My Rave Project
+
+### Run the project
+
+If you use the defaults, the project is called `myraveproject` and its portal 
module `myraveproject-portal`
+
+    cd myraveproject
+    mvn install
+
+    cd myraveproject-portal
+    mvn cargo:run
+
+You can now navigate to the portal on http://localhost:8080
 
-## Customizations
+## Custom project
 
-  - User Service : Extension implements rave UserService interface as 
CustomUserService. To use CustomUserService for login you need to update
-Application Security context provided in 
~/src/main/webapp/WEB-INF/applicationContext-security.xml and add name for 
customUserService. 
-  
-  - Login page : This is just to demonstrate that if you have your own login 
page and style sheets you can copy them to right location and they will be 
-included in portal war along with other portal files. If you will have the 
same files name as in portal war, they will be replaced with your version of 
files.
+The project will have the following structure:
 
+![Project structure](/images/screenshot_custom_project.png)
+
+### Customizations
+
+  - User Service : implements Rave UserService interface as CustomUserService. 
To use CustomUserService for
+  login a `customUserService` bean has been defined in the Application 
Security context provided in
+  
`./myraveportal-portal/src/main/webapp/WEB-INF/applicationContext-security.xml`.
+
+  - [LDAP authentication][5] has been removed from the project by excluding 
its dependencies in
+  the pom.xml file and removing the LDAP configuration in 
`./myraveportal-portal/src/main/webapp/WEB-INF/applicationContext-security.xml`.
+
+  - Look and feel : This is to demonstrate that your own look and feel can be 
given to the portal by adding styles to
+  `./myraveportal-portal/src/main/webapp/static/css/custom.css`
+
+  - There is also a separate module to override the OpenSocial provider 
(Apache Shindig), but it builds the same configuration as the standard release.
+
+### Best Practices
+
+- Add new javascript functions to new file or copy existing functions to new 
file and customize them and change imports based on your need. Reason is, 
changes/fixes in rave libraries should come to your project.
+- If you are are customizing css or adding new css methods add new files so 
that changes in default css files will come to your portal
+- Report any bug or issue to [Apache Rave JIRA][2]
 
- 
 [1]: ../source.html
-[2]: https://issues.apache.org/jira/browse/RAVE
\ No newline at end of file
+[2]: https://issues.apache.org/jira/browse/RAVE
+[3]: http://maven.apache.org/download.html
+[4]: http://maven.apache.org/download.html#Installation
+[5]: ldap-authentication.html
\ No newline at end of file

Modified: rave/site/trunk/content/ide-settings-and-debugging.mdtext
URL: 
http://svn.apache.org/viewvc/rave/site/trunk/content/ide-settings-and-debugging.mdtext?rev=1427690&r1=1427689&r2=1427690&view=diff
==============================================================================
--- rave/site/trunk/content/ide-settings-and-debugging.mdtext (original)
+++ rave/site/trunk/content/ide-settings-and-debugging.mdtext Wed Jan  2 
07:16:55 2013
@@ -54,7 +54,7 @@ There are a few different ways to do thi
 
 The OSS [Eclipse FileSync][6] plugin can automatically synchronize (re)source 
changes
 (e.g. .jsp, .css, .js) made in the Eclipse IDE directly to the runtime tomcat 
deployment
-started (separately) through maven cargo:start. And you can attach the Eclipse 
debugger
+started (separately) through maven cargo:run. And you can attach the Eclipse 
debugger
 to the cargo started Tomcat instance (see above) as remote application on 
default port 8000.
     
 The [maven-filesync-plugin][7] is pre-configured to generate default Eclipse 
FileSync
@@ -93,7 +93,7 @@ Then you need to follow these steps:
   * Right click on the rave-shindig project and select Properties
   * Open the "Deployment Assembly" property
   * Press Add, select Directive Type "Folder", and select the
-    target/rave-shindig-0.1-incubating-SNAPSHOT folder.
+    target/rave-shindig-<version>-SNAPSHOT folder.
     (do a "mvn install" in rave-project first for this folder to be available)
   * configure the correct Context root paths for rave-portal
     ("portal") and rave-shindig ("/") in their Eclipse project

Added: rave/site/trunk/content/images/screenshot_custom_project.png
URL: 
http://svn.apache.org/viewvc/rave/site/trunk/content/images/screenshot_custom_project.png?rev=1427690&view=auto
==============================================================================
Binary file - no diff available.

Propchange: rave/site/trunk/content/images/screenshot_custom_project.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Modified: rave/site/trunk/content/source.mdtext
URL: 
http://svn.apache.org/viewvc/rave/site/trunk/content/source.mdtext?rev=1427690&r1=1427689&r2=1427690&view=diff
==============================================================================
--- rave/site/trunk/content/source.mdtext (original)
+++ rave/site/trunk/content/source.mdtext Wed Jan  2 07:16:55 2013
@@ -64,11 +64,11 @@ To run a local Tomcat instance with rave
 
   - navigate to the rave-portal subdirectory and invoke:
   
-    `mvn cargo:start`
+    `mvn cargo:run`
 
      *If you are behind a proxy, then you can specify it with the following 
command*
 
-   *`mvn -Dcargo.args="-Dhttp.proxyHost=PROXYHOST -Dhttp.proxyPort=PROXYPORT 
-Dhttp.nonProxyHosts=NONPROXYHOST" cargo:start`*
+   *`mvn -Dcargo.args="-Dhttp.proxyHost=PROXYHOST -Dhttp.proxyPort=PROXYPORT 
-Dhttp.nonProxyHosts=NONPROXYHOST" cargo:run`*
  
   - open url http://localhost:8080/portal in a browser
   - press Ctrl-C in the console to stop Tomcat again


Reply via email to