nicolaken 02/03/04 07:29:20 Modified: tools build-i.xml build-s.xml src/documentation/xdocs/installing index.xml Added: src/scratchpad/targets treeprocessor.xml Log: Updated interactive and scratchpad build; detailed usage inserted in documentation. Revision Changes Path 1.3 +2 -2 xml-cocoon2/tools/build-i.xml Index: build-i.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/tools/build-i.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- build-i.xml 30 Jan 2002 11:32:37 -0000 1.2 +++ build-i.xml 4 Mar 2002 15:29:20 -0000 1.3 @@ -6,8 +6,8 @@ <target name="interactive" description="Interactive Build"> <echo message="--------------------------------------------------------------"/> <echo message=" "/> - <echo message=" ${fullname} ${version} [${year}]"/> - <echo message=" "/> + <echo message=" APACHE COCOON "/> + <echo message=" "/> <echo message="--------------------------------------------------------------"/> <echo message="Building with ${ant.version}"/> <echo message="using build file ${ant.file}"/> 1.3 +11 -11 xml-cocoon2/tools/build-s.xml Index: build-s.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/tools/build-s.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- build-s.xml 30 Jan 2002 11:32:37 -0000 1.2 +++ build-s.xml 4 Mar 2002 15:29:20 -0000 1.3 @@ -6,7 +6,7 @@ <target name="scratchpad" description="Interactive Scratchpad Build"> <echo message="--------------------------------------------------------------"/> <echo message=" "/> - <echo message=" ${fullname} SCRATCHPAD ${version} [${year}]"/> + <echo message=" APACHE COCOON SCRATCHPAD"/> <echo message=" "/> <echo message="--------------------------------------------------------------"/> <echo message="Building with ${ant.version}"/> @@ -16,15 +16,15 @@ <echo message=" These are SCRATCHPAD BUILDS. They are not guaranteed to work."/> <echo message=" You have been warned. "/> <echo message=" "/> - <echo message=" schecoon ----- scheme implementation of sitemap"/> - <echo message=" --------------"/> - <echo message=" --------------"/> - <echo message=" --------------"/> - <echo message=" --------------"/> - <echo message=" --------------"/> - <echo message=" --------------"/> - <echo message=" --------------"/> - <echo message=" --------------"/> + <echo message=" "/> + <echo message=" treeprocessor- new interpreted sitemap (faster setup time)"/> + <echo message=" -"/> + <echo message=" -"/> + <echo message=" -"/> + <echo message=" -"/> + <echo message=" -"/> + <echo message=" -"/> + <echo message=" -"/> <echo message=" "/> <taskdef name="user-input" classname="UserInputTask" classpath="./tools/anttasks"/> @@ -32,7 +32,7 @@ <property name="input.selection" value=""/> <user-input name="input.selection">Please select a target </user-input> - <ant antfile="./src/scratchpad/${input.selection}/build.xml"/> + <ant antfile="./src/scratchpad/targets/${input.selection}.xml"/> </target> 1.11 +271 -22 xml-cocoon2/src/documentation/xdocs/installing/index.xml Index: index.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/installing/index.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- index.xml 3 Mar 2002 21:10:28 -0000 1.10 +++ index.xml 4 Mar 2002 15:29:20 -0000 1.11 @@ -13,6 +13,7 @@ <person name="Carsten Ziegeler" email="[EMAIL PROTECTED]"/> <person name="Vadim Gritsenko" email="[EMAIL PROTECTED]"/> <person name="Bernhard Huber" email="[EMAIL PROTECTED]"/> + <person name="Nicola Ken Barozzi" email="[EMAIL PROTECTED]"/> </authors> </header> @@ -223,34 +224,282 @@ need to rebuild Cocoon as described in 'Create the Cocoon WAR package'. </p> </s2> + + <s2 title="Running the build"> - <s2 title="Cleanup previous files"> - <p> - If you perform Cocoon upgrade, it is advised to cleanup build and working - Cocoon directory before building and deploying new version. To cleanup build - directory, simply type: - </p> - - <source> -[unix] ./build.sh clean -[win32] .\build.bat clean - </source> - - </s2> - - <s2 title="Create the Cocoon WAR package"> - <p>To do this you simply have to type:</p> - - <source> + <p>Cocoon uses <link href="http://jakarta.apache.org/ant/">Jakarta Ant</link> + for the build and installation, and comes with a build script + ([unix]./build.sh, [win32] .\build.bat) that automates the process.</p> + + <note>If you want to use build.xml directly with your copy of Ant, please + run the build sctipt at least once after every CVS checkout, to ensure that + extra initializations like jar copying are done correctly.</note> + + <note>The build script overrides the existing ANT_HOME variable.</note> + + <p>There are basically two options that can be set as parameters to + the script: <strong>targets</strong> and <strong>properties</strong>.</p> + + <s3 title="build targets"> + <p>Targets are the execution units available in + <link href="http://jakarta.apache.org/ant/">Ant</link> build files.</p> + + <p>Only one target can be specified per run, by appending it to + the script invocation:</p> + + <source> +[unix] ./build.sh target +[win32] .\build.bat target + </source> + </s3> + <s3 title="build properties"> + <p>A target can use properties, that can, or must in some cases, be specified. + Multiple properties can be set, by appending them like this to + the script invocation:</p> + + <source> +[unix] ./build.sh [target] -Dpropertyname=propertyvalue +[win32] .\build.bat [target] -Dpropertyname=propertyvalue + </source> + </s3> + + <p>The <strong>build.xml</strong> file comes with some basic important targets. If no target is specified, + the default one is used (defined in build.xml).</p> + + <note>Some targets are preliminary and their call method will change + in the future. Preliminary targets are marked as [BETA].</note> + + <p>Cocoon targets place work files and results in a build directory under + the cocoon root. The only exception are the distribution targets that build + in a directory called dist.</p> + + <s3 title="build all"> + <p>Builds all main Cocoon targets to create the <strong>cocoon.jar</strong> + package. + </p> + + <ul> + <li><strong>target:</strong> all</li> + <li><strong>required properties:</strong> none</li> + <li><strong>buildfile:</strong> build.xml</li> + </ul> + + <note>This is currently the default target.</note> + + <note>Available in interactive build.</note> + + </s3> + + <s3 title="[BETA] build interactive"> + <p>Shows common build targets and asks the user for eventual + properties that may be needed. + </p> + + <ul> + <li><strong>target:</strong> interactive</li> + <li><strong>required properties:</strong> none - asks if needed</li> + <li><strong>buildfile:</strong> tools/build-i.xml</li> + </ul> + + <p>To do this you simply have to type:</p> + + <source> +[unix] ./build.sh -buildfile tools/build-i.xml +[win32] .\build.bat -buildfile tools/build-i.xml + </source> + + <note>This is the recommended target for first-time users.</note> + + </s3> + + + <s3 title="[BETA] build installwar"> + <p>Builds and installs Cocoon war package in a specified directory. + </p> + + <ul> + <li><strong>target:</strong> installwar</li> + <li><strong>required properties:</strong> + asks the user for installation path</li> + <li><strong>buildfile:</strong> build.xml</li> + </ul> + + <note>This is the recommended target for an easy install in Tomcat.</note> + + <note>Available in interactive build.</note> + + </s3> + + <s3 title="build docs"> + <p>Builds the Cocoon documentation in html format. + </p> + + <ul> + <li><strong>target:</strong> docs</li> + <li><strong>required properties:</strong> none</li> + <li><strong>buildfile:</strong> build.xml</li> + </ul> + + <note>Available in interactive build.</note> + + </s3> + + <s3 title="build javadocs"> + <p>Builds the Cocoon javadocs in html format. + </p> + + <ul> + <li><strong>target:</strong> javadocs</li> + <li><strong>required properties:</strong> none</li> + <li><strong>buildfile:</strong> build.xml</li> + </ul> + + <note>Available in interactive build.</note> + + </s3> + + <s3 title="build printerdocs"> + <p>Builds the Cocoon documentation in html printer-friendly format. + </p> + + <ul> + <li><strong>target:</strong> printerdocs</li> + <li><strong>required properties:</strong> none</li> + <li><strong>buildfile:</strong> build.xml</li> + </ul> + + <note>Available in interactive build.</note> + + </s3> + + <s3 title="build test"> + <p>Runs Cocoon unit tests. + </p> + + <ul> + <li><strong>target:</strong> test</li> + <li><strong>required properties:</strong> none</li> + <li><strong>buildfile:</strong> build.xml</li> + </ul> + + <note>Available in interactive build.</note> + + </s3> + + <s3 title="build compile"> + <p>Compiles Cocoon source files. + </p> + + <ul> + <li><strong>target:</strong> compile</li> + <li><strong>required properties:</strong> none</li> + <li><strong>buildfile:</strong> build.xml</li> + </ul> + + <note>Available in interactive build.</note> + + </s3> + + <s3 title="build clean"> + <p>Cleans the build directory. + </p> + + <ul> + <li><strong>target:</strong> clean</li> + <li><strong>required properties:</strong> none</li> + <li><strong>buildfile:</strong> build.xml</li> + </ul> + + <note>Available in interactive build.</note> + + </s3> + + <s3 title="build dist"> + <p>Creates source and binary distributions of Cocoon. + </p> + + <ul> + <li><strong>target:</strong> dist</li> + <li><strong>required properties:</strong> none</li> + <li><strong>buildfile:</strong> build.xml</li> + </ul> + + <note>The results are in the dist directory.</note> + + </s3> + + <s3 title="build webapp"> + + <p>Creates the Cocoon WAR package. It's a non-interactive version + of installwar.</p> + + <ul> + <li><strong>target:</strong> webapp</li> + <li><strong>required properties:</strong> include.webapp.libs</li> + <li><strong>buildfile:</strong> build.xml</li> + </ul> + + <p>To do this you simply have to type:</p> + + <source> [unix] ./build.sh -Dinclude.webapp.libs=yes webapp [win32] .\build.bat -Dinclude.webapp.libs=yes webapp - </source> + </source> + + <p>this will create the "cocoon.war" file in the + './build/cocoon' directory.</p> + + </s3> + + <s3 title="[BETA] build scratchpad"> + <p>An interactive build to help alpha-testers in installing + cutting-edge code. + </p> + + <ul> + <li><strong>target:</strong> scratchpad</li> + <li><strong>required properties:</strong> none</li> + <li><strong>buildfile:</strong> tools/build-s.xml</li> + </ul> + + <p>To do this you simply have to type:</p> + + <source> +[unix] ./build.sh -buildfile tools/build-s.xml +[win32] .\build.bat -buildfile tools/build-s.xml + </source> + + <note><strong>WARNING:</strong>Scratchpad builds are <strong>not guaranteed to work</strong>. + You have been warned. + </note> + + </s3> + + <s3 title="[BETA] build try"> + <p>Makes it possible to try new build targets that have not yet made + it into the core build. These targets are in tools/builds/try.xml. + </p> + + <ul> + <li><strong>target:</strong> try</li> + <li><strong>required properties:</strong> try.target</li> + <li><strong>buildfiles:</strong> build.xml, tools/build-t.xml</li> + </ul> + + <p>To test target test-target for example, you simply have to type:</p> + + <source> +[unix] ./build.sh try -Dtry.target=test-target +[win32] .\build.bat try -Dtry.target=test-target + </source> + + <note>Targets are in tools/build-i.xml.</note> + </s3> - <p>this will create the "cocoon.war" file in the - './build/cocoon' directory.</p> </s2> - </s1> + </s1> + <s1 title="Installing Cocoon"> <p>In most servlet engines, this is just a matter of copying 1.1 xml-cocoon2/src/scratchpad/targets/treeprocessor.xml Index: treeprocessor.xml =================================================================== <project default="treeprocessor" basedir="." name="TreeProcessor build"> <!-- =================================================================== --> <!-- TreeProcessor build --> <!-- =================================================================== --> <target name="treeprocessor" description="TreeProcessor Build"> <echo message="--------------------------------------------------------------"/> <echo message=" "/> <echo message=" TreeProcessor - an interpreted sitemap for Cocoon "/> <echo message=""/> <echo message=" by Sylvian Wallez ([EMAIL PROTECTED])"/> <echo message="--------------------------------------------------------------"/> <echo message=" Usage:"/> <echo message=" in src/webapp/cocoon.xconf (at the end)"/> <echo message=" replace the sitemap component declaration (sitemap tag) with:"/> <echo message=" <sitemap class="org.apache.cocoon.treeprocessor.TreeProcessor""/> <echo message=" logger="sitemap"/>"/> <echo message=" "/> <echo message=" Recompile and install as usual."/> <echo message=" Remember to add build/cocoon/scratchpad.jar in WEB-INF/lib"/> <echo message=" "/> <echo message=" "/> <echo message=" "/> <echo message=" "/> </target> </project> <!-- End of file -->
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]