Welcome to the Daisy CMS! http://www.daisycms.org === BUILDING DAISY FROM SOURCE === There are two scenarios: 1. You only want to build a Daisy binary distribution (= the same as can be downloaded) 2. You want to set up a development environment (= for incremental buidling and testing) The second scenario is a bit more work the first time (you need to create databases, set up configuration, ...) but once that's done you can make changes to the code, quickly rebuild and test. So this scenario is intended for people who want to work on Daisy itself. >>> If you (only) want to build a binary distribution: - first build the repository server by following the instructions in this file, skip all sections marked "[skip when building dist only]" - then build the frontend by following the instructions in applications/daisywiki/README.txt - then assemble the distribution by following the instructions in distro/core/README.txt >>> If you run into problems during the source build: - You are welcome to ask for help on the Daisy mailing list. (please mention applicable details such as Daisy version, operating system, ...) - General feedback on confusing instructions (even if you found out how to do it in the end) is also welcome. +---------------------------------------------------------------+ | Conventions | +---------------------------------------------------------------+ Throughout these instructions we use to refer to the root of the source tree. +---------------------------------------------------------------+ | Maven installation | +---------------------------------------------------------------+ Maven is the tool used to build Daisy. >> download version 1.0 from http://maven.apache.org Maven 2 will not work! >> copy a Xalan jar file to MAVEN_HOME/lib/endorsed. You can e.g. download it from here: http://www.ibiblio.org/maven/xalan/jars/xalan-2.7.0.jar >> Spaces problem on Windows: Apparently there is a problem somewhere if the local maven repository is located in a directory with spaces in the name (default location is ~/.maven). Since this is by default the case on Windows, users of that OS should work around this by creating a build.properties file in their home directory (usually c:\document and settings\USERNAME\) with the following property in it: maven.home.local=d:\\some_directory +---------------------------------------------------------------+ | Torque Maven plugin installation | +---------------------------------------------------------------+ We use the Apache Torque generator to generate database-specific SQL scripts from an XML definition. >> Install the Torque Maven plugin by executing (in any directory): maven plugin:download -DartifactId=maven-torque-plugin -DgroupId=torque -Dversion=3.1.1 -Dmaven.repo.remote=http://mirrors.ibiblio.org/pub/mirrors/maven +---------------------------------------------------------------+ | Installing Daisy Maven plugins | +---------------------------------------------------------------+ Daisy has some Maven plugins of itself required for the build process. >> Go to >> Execute: cd tools/genscript-plugin maven plugin:install -Dmaven.repo.remote=http://mirrors.ibiblio.org/pub/mirrors/maven cd ../../tools/recode-plugin maven plugin:install -Dmaven.repo.remote=http://mirrors.ibiblio.org/pub/mirrors/maven cd ../../tools/versioninfo-plugin maven plugin:install -Dmaven.repo.remote=http://mirrors.ibiblio.org/pub/mirrors/maven +---------------------------------------------------------------+ | Compiling | +---------------------------------------------------------------+ >> Go to >> Execute: maven -Dmaven.repo.remote=http://cocoondev.org/repository,http://mirrors.ibiblio.org/pub/mirrors/maven (If the iBiblio Maven repository is down or very slow, consider using a Maven 1 repository mirror like http://mirrors.sunsite.dk/maven/ Just substitute this URL with the iBiblio one.) Background info: Daisy is separated in a number of different subprojects, the above command will built them all and put the result of them (an "artifact" jar) in your local maven repository (~/.maven/repository/) Note: the -Dmaven.repo.remote argument only needs to be specified the first time you perform a build, after the first build all required artifacts will be installed in the local Maven repository. +---------------------------------------------------------------+ | Creating the MySQL database | | [skip when building dist only] | +---------------------------------------------------------------+ Required MySQL version: 4.1.7 or higher, or 5 final or higher MySQL version 4.0 and earlier will not work correctly! >> login as root user to MySQL: mysql -uroot -pYourSecretPassword (drop the -p if the root user has no password) >> on the MySQL prompt, execute: DROP DATABASE daisydev_repository; CREATE DATABASE daisydev_repository charset utf8; GRANT ALL ON daisydev_repository.* TO daisy@"%" IDENTIFIED BY "daisy"; GRANT ALL ON daisydev_repository.* TO daisy@localhost IDENTIFIED BY "daisy"; DROP DATABASE daisydev_activemq; CREATE DATABASE daisydev_activemq charset utf8; GRANT ALL ON daisydev_activemq.* TO activemq@"%" IDENTIFIED BY "activemq"; GRANT ALL ON daisydev_activemq.* TO activemq@localhost IDENTIFIED BY "activemq"; (The localhost entries are necessary because otherwise the default access rights for anonymous users @localhost will take precedence.) +---------------------------------------------------------------+ | Configuring and initializing the repository server | | [skip when building dist only] | +---------------------------------------------------------------+ >> Go to /install >> Execute: daisy-repository-init-dev (linux: ./daisy-repository-init-dev) Note the "-dev" suffix !!! This program will ask a number of parameters, which for a development environment you can best leave to their defaults, thus simply press enter on each question. +---------------------------------------------------------------+ | Running the Repository server | | [skip when building dist only] | +---------------------------------------------------------------+ >> Change to the directory repository/server >> Execute: On Linux: ./start-repository On Windows: set MAVEN_HOME_LOCAL={maven.home.local as defined above} start-repostiory.bat Note: on Linux, if your Maven repository directory is in a non-standard location, you will have to edit the start-repository script and modify the value of the -r argument. Note: this script: - opens a debug port on port 8001 - allows JMX access using jconsole +---------------------------------------------------------------+ | Running testcases | | > optional, requires dev environment scenario | | > just FYI, not needed to do this right now | +---------------------------------------------------------------+ There is a set of automated testcasing verifying various parts of the repository functionality. For information on running these, see the file repository/test/README.txt +---------------------------------------------------------------+ | Repository API documentation | | [skip when building dist only] | +---------------------------------------------------------------+ To view the repository API documentation, execute the following command in the root of the daisy source tree: maven daisy-javadoc Then you can view the javadoc by opening target/javadoc/index.html in your browser. +---------------------------------------------------------------+ | Building and running the Cocoon-based DaisyWiki Application | +---------------------------------------------------------------+ Once you have successfully build the repository server (and in case of the development setup scenario, have also run it), you can go on to build the Daisy Wiki web fronted: See applications/daisywiki/README.txt