"Fossies" - the Fresh Open Source Software Archive 
Member "daisy-2.4.2/README.txt" (16 Dec 2010, 8868 Bytes) of package /linux/www/old/daisy-2.4.2-src.tar.gz:
As a special service "Fossies" has tried to format the requested text file into HTML format (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
1 Welcome to the Daisy CMS!
2 http://www.daisycms.org
3
4 === BUILDING DAISY FROM SOURCE ===
5
6 There are two scenarios:
7
8 1. You only want to build a Daisy binary distribution
9 (= the same as can be downloaded)
10
11 2. You want to set up a development environment
12 (= for incremental building and testing)
13
14 The second scenario is a bit more work the first time (you need
15 to create databases, set up configuration, ...) but once that's done
16 you can make changes to the code, quickly rebuild and test. So this
17 scenario is intended for people who want to work on Daisy itself.
18
19 >>> If you (only) want to build a binary distribution:
20
21 - first build the repository server by following the instructions in
22 this file, skip all sections marked "[skip when building dist only]"
23
24 - then assemble the distribution by following the instructions in
25 distro/core/README.txt
26
27
28 >>> If you run into problems during the source build:
29
30 - You are welcome to ask for help on the Daisy mailing list.
31 (please mention applicable details such as Daisy version,
32 operating system, ...)
33
34 - General feedback on confusing instructions (even if you found out how
35 to do it in the end) is also welcome.
36
37
38 +---------------------------------------------------------------+
39 | Conventions |
40 +---------------------------------------------------------------+
41
42 Throughout these instructions we use <daisy-src> to refer to the root
43 of the source tree.
44
45
46 +---------------------------------------------------------------+
47 | Maven installation |
48 +---------------------------------------------------------------+
49
50 Maven 2 is the tool used to build Daisy.
51
52 >> download version 2.2.1 or newer from http://maven.apache.org/
53
54 Note: - Maven 2.1.0 or older will not work.
55 - Other version prior to 2.2.1 have not been tested
56 - Maven 1 will not work.
57 - to install Maven, just extract the download somewhere
58 and add its bin directory to the PATH environment variable
59
60
61 +---------------------------------------------------------------+
62 | Compiling |
63 +---------------------------------------------------------------+
64
65 >> Go to <daisy-src>
66
67 >> Set the MAVEN_OPTS environment variable, it should at least contain -Xmx512M,
68 or the build may fail with a java.lang.OutOfMemoryError. e.g.
69
70 export MAVEN_OPTS=-Xmx512m
71
72 or
73
74 set MAVEN_OPTS=-Xmx512m on windows
75
76 >> Execute:
77
78 mvn install -Pcocoon.download,cocoon.get,webapp,dev
79
80 Notes: - If downloading of dependencies is slow, consider using a
81 Maven repository mirror (instead of repo1.maven.org),
82 see the instructions here on how to do this:
83 http://maven.apache.org/settings.html#Repositories
84
85 - Background info: Daisy is separated in a number of different
86 subprojects, executing the above command builds them all and put the result
87 of them (an "artifact" jar) in your local maven
88 repository (~/.m2/repository/)
89
90 - The flags -Pcocoon.get and -Pwebapp are only
91 the first time and after running mvn clean.
92 They make sure that the daisywiki application is built completely
93
94 - See <daisy-src>/applications/daisywiki/README.txt for more detailed
95 information on building the daisywiki application.
96
97 - If the build fails with "taskdef class org.apache.torque.task.TorqueDataModelTask cannot be found', cd to the <daisy-src>/install directory and execute 'mvn install'. This is due to a known bug in maven.
98
99 +---------------------------------------------------------------+
100 | Creating the MySQL database |
101 | [skip when building dist only] |
102 +---------------------------------------------------------------+
103
104 Required MySQL version: 4.1.7 or higher, or 5 final or higher
105 MySQL version 4.0 and earlier will not work correctly!
106
107 >> login as root user to MySQL:
108
109 mysql -uroot -pYourSecretPassword
110
111 (drop the -p if the root user has no password)
112
113 >> on the MySQL prompt, execute:
114
115 DROP DATABASE daisydev_repository;
116 CREATE DATABASE daisydev_repository charset utf8;
117 GRANT ALL ON daisydev_repository.* TO daisy@"%" IDENTIFIED BY "daisy";
118 GRANT ALL ON daisydev_repository.* TO daisy@localhost IDENTIFIED BY "daisy";
119
120 DROP DATABASE daisydev_activemq;
121 CREATE DATABASE daisydev_activemq charset utf8;
122 GRANT ALL ON daisydev_activemq.* TO activemq@"%" IDENTIFIED BY "activemq";
123 GRANT ALL ON daisydev_activemq.* TO activemq@localhost IDENTIFIED BY "activemq";
124
125 (The localhost entries are necessary because otherwise the default access
126 rights for anonymous users @localhost will take precedence.)
127
128 +---------------------------------------------------------------+
129 | Configuring and initializing the repository server |
130 | [skip when building dist only] |
131 +---------------------------------------------------------------+
132
133 >> Go to <daisy-src>/install/target
134
135 >> Execute:
136
137 daisy-repository-init-dev -d install.properties
138
139 have a look at the install.properties file to see if you want to change
140 something but usually the defaults are just fine for development.
141
142 daisy-repository-init-dev -i install.properties
143
144 (linux: ./daisy-repository-init-dev)
145
146 Note the "-dev" suffix !!!
147
148 +---------------------------------------------------------------+
149 | Running the Repository server |
150 | [skip when building dist only] |
151 +---------------------------------------------------------------+
152
153 >> Change to the directory <daisy-src>/repository/server
154
155 >> Execute:
156
157 On Linux:
158 ./start-repository
159
160 On Windows:
161 start-repository.bat
162
163 Note: on Linux, if your Maven repository directory is in a non-standard
164 location, you will have to edit the start-repository script and
165 modify the value of the -r argument.
166
167 Note: this script:
168 - opens a debug port on port 8001
169 - allows JMX access using jconsole
170
171
172 +---------------------------------------------------------------+
173 | Running testcases |
174 | > optional, requires dev environment scenario |
175 | > just FYI, not needed to do this right now |
176 +---------------------------------------------------------------+
177
178 There is a set of automated testcasing verifying various parts of the
179 repository functionality. For information on running these, see the file
180 repository/test/README.txt
181
182
183 +---------------------------------------------------------------+
184 | More build hints |
185 +---------------------------------------------------------------+
186
187 Performing a clean build
188 ------------------------
189
190 If things don't work even when starting over (e.g. errors about methods
191 not being found etc.) doing a clean build is the solution.
192
193 To do a clean build:
194
195 Go to <daisy-src> and execute
196
197 mvn clean
198
199 What this actually does is removing all 'target' subdirectories. After doing
200 "mvn clean", perform the build in the usual way.
201
202 Generating IDE project files
203 ----------------------------
204
205 [ not perfect yet ]
206
207 First build Daisy (including the Wiki), then run:
208
209 For eclipse:
210 mvn eclipse:eclipse -Pdev -Dmaven.eclipse.src.download=false -Dmaven.eclipse.javadoc.download=false -Dmaven.compile.target=1.5 -Dmaven.compile.source=1.5
211
212 For Intellij IDEA (>= 9.0):
213 No need to generate project files, just go to
214 File, Open Project and select the pom.xml file
215
216 If you are working on a subversion checkout, you can avoid the .project etc.
217 files showing up when doing "svn status" by editing ~/.subversion/conf and
218 adding the following to the global-ignores property:
219 *.iml *.ipr *.iws .classpath .project .settings
220
221 What to rebuild/restart when making changes
222 -------------------------------------------
223
224 If you make changes to code used in the repository server:
225
226 * execute 'mvn install' in <daisy-src>/repository and in <daisy-src>/services
227 * restart the repository server
228
229 If you are making changes only in one specific subproject, you
230 can also execute 'mvn install' in that specific subproject.
231
232 If you make Java-code changes to the Wiki:
233
234 * execute 'mvn install' in <daisy-src>/applications/daisywiki/frontend
235 * execute 'mvn install -PdeployResources' in <daisy-src>/applications/daisywiki/runtime
236 * restart the wiki
237
238 If you make resource-only (= XSLT, CSS, images, ...) changes to the Wiki:
239
240 * execute 'mvn install -PdeployResources' in
241 <daisy-src>/applications/daisywiki/runtime
242 * restart the wiki (not always necessary, depends on caching)
243
244