******************************************************************
* $Id: Build_mvnForum_Tomcat.txt,v 1.13 2008/01/25 11:06:47 minhnn Exp $
******************************************************************



How to build mvnForum bundled with Tomcat
=========================================================

- NOTE: before build mvnForum, make sure set JAVA_HOME to JDK 1.4

- TODO: should we create the Lucene index in the bundle ???

- Extract a new tomcat 5.0.28, and change folder to, say, mvnforum-1.1-dev-jakarta-tomcat-5.0.28-20070919
    edit tomcat_home/conf/server.xml, then in tag Connector for port 8080, add this attribute:
     URIEncoding="UTF-8"

- Edit startup.sh, change "start" to "run" (no need to change startup.bat)

- Copy context mvnforum to tomcat_home/webapps

- Remove tomcat_home/webapps/mvnforum/WEB-INF/lib/mysql-connector-java-3.1.12-bin.jar

- Copy mvnforum/sql/hsqldb to tomcat_home
    NOTE: make sure hsqldb is match with the latest sql file

- Copy hsqldb.jar to tomcat_home/shared/lib

- Edit file mvncore.xml
        <driver_class_name>org.hsqldb.jdbcDriver</driver_class_name>
        <database_url>jdbc:hsqldb:file:../hsqldb/mvnforum</database_url>
        <database_user>sa</database_user>
        
- Edit file mvnforum.xml
  <mvnforum_home>../webapps/mvnforum/WEB-INF/mvnForumHome</mvnforum_home>
  <mvnforum_log>../webapps/mvnforum/WEB-INF/mvnForumHome/log/mvnforum.log</mvnforum_log>
  <enable_portal_like_index_page>false</enable_portal_like_index_page> 

- log4j.properties
  log4j.appender.A2.File=../webapps/mvnforum/WEB-INF/mvnForumHome/log/mvnforum.log
  
- Copy file index_mvnforum.jsp to tomcat_home/ROOT
  check the true/false condition to show mvnForum enterprise/CMS

- Change Tomcat ROOT web.xml, add these lines:
    <welcome-file-list>
        <welcome-file>index_mvnforum.jsp</welcome-file>
    </welcome-file-list>

- Now zip the whole folder

- You can copy this folder to a new folder and test before releasing


If bundle with mvnForum enterprise
=========================================================
- NOTE: before release mvnForum enterprise source package, remember to delete folder 
    mvnforum_enterprise/internal_docs

- Same as above, but the folder name should be, say, mvnforum_enterprise-1.1-dev-jakarta-tomcat-5.0.28-20070919

- But do not copy mvnforum/sql/hsqldb to tomcat_home, instead, copy mvnforum_enterprise/sql/hsqldb to tomcat_home
    NOTE: make sure hsqldb is match with the latest sql file

- Copy file index_mvnforum.jsp to tomcat_home/ROOT
  NOTE: remember to enable the condition to show mvnforum_enterprise
  
- Copy context mvnforum_enterprise to tomcat_home/webapps
    NOTE: in the above section, we already copy context mvnforum, because we want 2 context at the same time

- Remove tomcat_home/webapps/mvnforum_enterprise/WEB-INF/lib/mysql-connector-java-3.1.14-bin.jar

- Edit file mvncore.xml
        <driver_class_name>org.hsqldb.jdbcDriver</driver_class_name>
        <database_url>jdbc:hsqldb:file:../hsqldb/mvnforum</database_url>
        <database_user>sa</database_user>
        
- Edit file mvnforum.xml
  <mvnforum_home>../webapps/mvnforum_enterprise/WEB-INF/mvnForumHome</mvnforum_home>
  <mvnforum_log>../webapps/mvnforum_enterprise/WEB-INF/mvnForumHome/log/mvnforum.log</mvnforum_log>
  <enable_portal_like_index_page>false</enable_portal_like_index_page> 

- Now zip the whole folder

- You can copy this folder to a new folder and test before releasing


If bundle with mvnForum portlet
=========================================================
- NOTE: before release mvnForum portlet source package, remember to delete folder 
    mvnforum_enterprise/internal_docs

- We should bundle with the enterprise edition

- Copy content of pluto_1_1-for-tomcat5 to tomcat_home

- Remove tomcat_home/common/lib/mysql-connector-java-3.1.13-bin.jar 

- Remove tomcat_home/webapps/mvnforum-portlet/WEB-INF/lib/mysql-connector-java-3.1.14-bin.jar

- enable the condition to show mvnforum_portlet in file index_mvnforum.jsp of tomcat_home/ROOT

- copy build/build-mvnforum-portlet/webapp-pluto_1_1/mvnforum-portlet/ to tomcat_home/webapps

- edit mvnforum.xml, change <member_implementation>com.mvnforum.db.jdbc.MemberDAOImplJDBC</member_implementation>

- Edit file mvncore.xml
        <driver_class_name>org.hsqldb.jdbcDriver</driver_class_name>
        <database_url>jdbc:hsqldb:file:../hsqldb/mvnforum</database_url>
        <database_user>sa</database_user>
        
- Now zip the whole folder

- You can copy this folder to a new folder and test before releasing
        

If Build mvnCMS:
=========================================================
- copy web.xml to context (because we use the task redeploy)
- copy taglibs-ad.jar to WEB-INF/lib
- Remove the driver file (mysql files)

- log4j.properties
  log4j.appender.A2.File=../webapps/mvncms/WEB-INF/mvnForumHome/log/mvnforum.log

- mvncore.xml
        <context_path>/mvncms</context_path>


- mvnforum.xml:
        <mvnforum_home>../webapps/mvncms/WEB-INF/mvnForumHome</mvnforum_home>
        <mvnforum_log>../webapps/mvncms/WEB-INF/mvnForumHome/log/mvnforum.log</mvnforum_log>
  
- mvncms.xml
        <mvncms_home>../webapps/mvncms/WEB-INF/mvnCmsHome</mvncms_home>
        <processor_impl>com.mvnsoft.mvncms.cds.standard.CDSDefaultModuleProcessor</processor_impl>

