cziegeler 02/01/30 01:29:22 Modified: . build.xml Added: . INSTALL.bin INSTALL.src tools build-i.xml build-s.xml build-t.xml Removed: . INSTALL build-i.xml build-s.xml build-t.xml Log: Added different INSTALL files and moved additional build scripts out of place into the tools directory. Revision Changes Path 1.149 +2 -2 xml-cocoon2/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/build.xml,v retrieving revision 1.148 retrieving revision 1.149 diff -u -r1.148 -r1.149 --- build.xml 25 Jan 2002 11:15:24 -0000 1.148 +++ build.xml 30 Jan 2002 09:29:22 -0000 1.149 @@ -1320,7 +1320,6 @@ <fileset dir="."> <include name="README"/> <include name="legal/*"/> - <include name="INSTALL"/> <include name="WARNING"/> <include name="*.bat"/> <include name="*.sh"/> @@ -1329,6 +1328,7 @@ <include name="*.properties"/> </fileset> </copy> + <copy file="INSTALL.src" tofile="${dist.src.dir}/INSTALL" filtering="on"/> <chmod perm="+x" file="${dist.src.dir}/run.sh"/> <chmod perm="+x" file="${dist.src.dir}/build.sh"/> @@ -1415,11 +1415,11 @@ <fileset dir="."> <include name="README"/> <include name="legal/*"/> - <include name="INSTALL"/> <include name="WARNING"/> <include name="KEYS"/> </fileset> </copy> + <copy file="INSTALL.bin" tofile="${dist.bin.dir}/INSTALL" filtering="on"/> <!-- Build the war file --> <jar jarfile="${dist.bin.dir}/${name}.war" basedir="${dist.bin.dir}/webapp" includes="**"/> 1.1 xml-cocoon2/INSTALL.bin Index: INSTALL.bin =================================================================== *-----------------------------* | I N S T A L L | *-----------------------------* You have downloaded Cocoon and you don't like to read verbose docs, right? Great, this file is for you. 1) Have your Servlet 2.2 compatible servlet engine installed. If you don't know how to do this, well, stop right here and move to the Apache Tomcat project (http://jakarta.apache.org/tomcat/) then come back when you are done. Done? Ok, let's go on. 2) Set your JAVA_HOME enviornment You have to set your JAVA_HOME enviornment to point to the root directory of the Java Development Kit installed on your machine. To do this simply type: [unix] JAVA_HOME=/path/to/java/ [win32] SET JAVA_HOME=c:\path\to\java your mileage may vary, but you know how to setup enviornments, right? 3) Create the Cocoon WAR package. 3a) Automatic install. To create the package and automatically install it in your servlet container, do [unix] ./build.sh -Dinclude.webapp.libs=yes -Dinstall.war=$TOMCAT_HOME/webapps install [win32] .\build.bat -Dinclude.webapp.libs=yes -Dinstall.war=%TOMCAT_HOME%\webapps install This creates the "cocoon.war" file in '$TOMCAT_HOME/webapps' which is the absolute path to the location where the "cocoon.war" file should be deployed. It also changes all references to that directory in the included samples so that i.e. the database samples will work properly. Continue with 5) 3b) Manual install. To do this you simply have to type, depending on your operating system [unix] ./build.sh -Dinclude.webapp.libs=yes -Dinstall.war=$TOMCAT_HOME/webapps webapp [win32] .\build.bat -Dinclude.webapp.libs=yes -Dinstall.war=%TOMCAT_HOME%\webapps webapp This will create the "cocoon.war" file in the './build/cocoon' directory. It also changes all references to that directory in the included samples so that i.e. the database samples will work properly. TOMCAT_HOME points to the directory where tomcat is installed (note: you don't need to set it in the enviornment, it's there only to show you). For more information on Tomcat 3.2.1 see the FAQ below. 4) Install the WAR package in your servlet container. There is no standard way to do this, but in most servlet engines, this is just a matter of copying the war file in a specific directory and the engine will take care of installing it when restarted. For Apache Tomcat, you have to copy the WAR archive into the '/webapps' directory, so do [unix] cp ./build/cocoon/cocoon.war $TOMCAT_HOME/webapps/cocoon.war [win32] copy .\build\cocoon\cocoon.war %TOMCAT_HOME%\webapps\cocoon.war 5) Restart the servlet engine. 6) Access the URI 'http://localhost/cocoon/' with your favorite browser 7) Wait a few seconds (Cocoon needs to compile parts of itself when launched) 8) Say hello to Cocoon :) FAQ --- 1) Why does nothing happen when I access 'http://localhost/cocoon/'? You might want to check a few things: - is your server listening to port 80? if not, you have to call the right port like in 'http://localhost:8080/cocoon/'. Note that Apache Tomcat binds by default to port 8080, NOT 80. - did your servlet engine install the WAR file? you can check by making sure the WAR file was unpacked or connecting to the administration tools of your servlet engine. - did you restart the servlet engine? if not, do it. 2) Why does Cocoon take so long to start? Cocoon compiles sitemaps into java classes to increase runtime performance, this is done only at startup and only if the sitemap file is modified, for all the other requests the compiled sitemap is executed. See question #7 for information on how to pre-compile the sitemap and the XSP's. 3) Can I improve startup-time by precompiling the sitemap and XSP's? Sure, follow the instructions: a) Set the "work-directory" parameter in web.xml as follows: <init-param> <param-name>work-directory</param-name> <param-value>WEB-INF/classes</param-value> </init-param> b) Set the auto-reload to false in your cocoon.xconf file as follows: <parameter name="auto-reload" value="false"/> c) Use "-Dcompile.xsp=yes" in your build command line when you are building your WAR file. For example: ./build.sh -Dcompile.xsp=yes -Dinclude.webapp.libs=yes -Dinstall.war=$TOMCAT_HOME/webapps install 4) Why is cocoon.war so big? Cocoon.war includes all the libraries that it requires to run. They are several megabytes of Java classes and it also includes the JDK javac compiler which must be present in the war file to allow page compilation without classloading problems. 5) I get a java.lang.VerifyError when accessing 'http://localhost/cocoon/'. What's wrong? Make sure you do not have a Cocoon 1.x jar in your servlet container lib/ directory. 6) I get an Exception when accessing Cocoon the first time. What's wrong? Cocoon requires a JAXP 1.1 compliant parser. Recent servlet engines (like Tomcat 3.2.1) use older xml parsers. You have to replace the xml parser with a newer one (e.g. the Xerces 1.3.0). For Tomcat 3.2.1 simply remove the jaxp.jar and the parser.jar from the tomcat/lib directory and copy the xerces.jar to this directory and rename it to parser.jar. Before you restart Tomcat make sure to remove the tomcat/work directory beforehand. 7) I'm still stuck, what do I do? Read the Cocoon documentation included in the distribution. This file is just a quick and dirty way to get you started but the docs contain much more detailed information as well as FAQs and indications on how to contact us. Happy hacking with Apache Cocoon. The Apache XML Project http://xml.apache.org/ 1.1 xml-cocoon2/INSTALL.src Index: INSTALL.src =================================================================== *-----------------------------* | I N S T A L L | *-----------------------------* You have downloaded Cocoon and you don't like to read verbose docs, right? Great, this file is for you. 1) Have your Servlet 2.2 compatible servlet engine installed. If you don't know how to do this, well, stop right here and move to the Apache Tomcat project (http://jakarta.apache.org/tomcat/) then come back when you are done. Done? Ok, let's go on. 2) Set your JAVA_HOME enviornment You have to set your JAVA_HOME enviornment to point to the root directory of the Java Development Kit installed on your machine. To do this simply type: [unix] JAVA_HOME=/path/to/java/ [win32] SET JAVA_HOME=c:\path\to\java your mileage may vary, but you know how to setup enviornments, right? 3) Create the Cocoon WAR package. 3a) Automatic install. To create the package and automatically install it in your servlet container, do [unix] ./build.sh -Dinclude.webapp.libs=yes -Dinstall.war=$TOMCAT_HOME/webapps install [win32] .\build.bat -Dinclude.webapp.libs=yes -Dinstall.war=%TOMCAT_HOME%\webapps install This creates the "cocoon.war" file in '$TOMCAT_HOME/webapps' which is the absolute path to the location where the "cocoon.war" file should be deployed. It also changes all references to that directory in the included samples so that i.e. the database samples will work properly. Continue with 5) 3b) Manual install. To do this you simply have to type, depending on your operating system [unix] ./build.sh -Dinclude.webapp.libs=yes -Dinstall.war=$TOMCAT_HOME/webapps webapp [win32] .\build.bat -Dinclude.webapp.libs=yes -Dinstall.war=%TOMCAT_HOME%\webapps webapp This will create the "cocoon.war" file in the './build/cocoon' directory. It also changes all references to that directory in the included samples so that i.e. the database samples will work properly. TOMCAT_HOME points to the directory where tomcat is installed (note: you don't need to set it in the enviornment, it's there only to show you). For more information on Tomcat 3.2.1 see the FAQ below. 4) Install the WAR package in your servlet container. There is no standard way to do this, but in most servlet engines, this is just a matter of copying the war file in a specific directory and the engine will take care of installing it when restarted. For Apache Tomcat, you have to copy the WAR archive into the '/webapps' directory, so do [unix] cp ./build/cocoon/cocoon.war $TOMCAT_HOME/webapps/cocoon.war [win32] copy .\build\cocoon\cocoon.war %TOMCAT_HOME%\webapps\cocoon.war 5) Restart the servlet engine. 6) Access the URI 'http://localhost/cocoon/' with your favorite browser 7) Wait a few seconds (Cocoon needs to compile parts of itself when launched) 8) Say hello to Cocoon :) FAQ --- 1) Why does nothing happen when I access 'http://localhost/cocoon/'? You might want to check a few things: - is your server listening to port 80? if not, you have to call the right port like in 'http://localhost:8080/cocoon/'. Note that Apache Tomcat binds by default to port 8080, NOT 80. - did your servlet engine install the WAR file? you can check by making sure the WAR file was unpacked or connecting to the administration tools of your servlet engine. - did you restart the servlet engine? if not, do it. 2) Why does Cocoon take so long to start? Cocoon compiles sitemaps into java classes to increase runtime performance, this is done only at startup and only if the sitemap file is modified, for all the other requests the compiled sitemap is executed. See question #7 for information on how to pre-compile the sitemap and the XSP's. 3) Can I improve startup-time by precompiling the sitemap and XSP's? Sure, follow the instructions: a) Set the "work-directory" parameter in web.xml as follows: <init-param> <param-name>work-directory</param-name> <param-value>WEB-INF/classes</param-value> </init-param> b) Set the auto-reload to false in your cocoon.xconf file as follows: <parameter name="auto-reload" value="false"/> c) Use "-Dcompile.xsp=yes" in your build command line when you are building your WAR file. For example: ./build.sh -Dcompile.xsp=yes -Dinclude.webapp.libs=yes -Dinstall.war=$TOMCAT_HOME/webapps install 4) Why is cocoon.war so big? Cocoon.war includes all the libraries that it requires to run. They are several megabytes of Java classes and it also includes the JDK javac compiler which must be present in the war file to allow page compilation without classloading problems. 5) I get a java.lang.VerifyError when accessing 'http://localhost/cocoon/'. What's wrong? Make sure you do not have a Cocoon 1.x jar in your servlet container lib/ directory. 6) I get an Exception when accessing Cocoon the first time. What's wrong? Cocoon requires a JAXP 1.1 compliant parser. Recent servlet engines (like Tomcat 3.2.1) use older xml parsers. You have to replace the xml parser with a newer one (e.g. the Xerces 1.3.0). For Tomcat 3.2.1 simply remove the jaxp.jar and the parser.jar from the tomcat/lib directory and copy the xerces.jar to this directory and rename it to parser.jar. Before you restart Tomcat make sure to remove the tomcat/work directory beforehand. 7) I'm still stuck, what do I do? Read the Cocoon documentation included in the distribution. This file is just a quick and dirty way to get you started but the docs contain much more detailed information as well as FAQs and indications on how to contact us. Happy hacking with Apache Cocoon. The Apache XML Project http://xml.apache.org/ 1.1 xml-cocoon2/tools/build-i.xml Index: build-i.xml =================================================================== <project default="interactive" basedir="." name="Test build"> <!-- =================================================================== --> <!-- Interactive build --> <!-- =================================================================== --> <target name="interactive" description="Interactive Build"> <echo message="--------------------------------------------------------------"/> <echo message=" "/> <echo message=" ${fullname} ${version} [${year}]"/> <echo message=" "/> <echo message="--------------------------------------------------------------"/> <echo message="Building with ${ant.version}"/> <echo message="using build file ${ant.file}"/> <echo message="--------------------------------------------------------------"/> <echo message=" "/> <echo message=" These are the most common build targets."/> <echo message=" You can also invoke them directly; see build.xml for more info. "/> <echo message=" "/> <echo message=" installwar --- installs war package"/> <echo message=" docs --------- generates the docs"/> <echo message=" javadocs ----- generates the API documentation"/> <echo message=" printer-docs - generates the printer friendly docs"/> <echo message=" test --------- performes the jUnit tests"/> <echo message=" compile ------ compiles the source code "/> <echo message=" clean -------- cleans the build directory"/> <echo message=" "/> <echo message=" "/> <taskdef name="user-input" classname="UserInputTask" classpath="./anttasks"/> <property name="input.selection" value="compile"/> <user-input name="input.selection">Please select a target </user-input> <!-- to be used if targets are in the same file <antcall target="${input.selection}"/>--> <ant target="${input.selection}" antfile="../build.xml"/> </target> </project> <!-- End of file --> 1.1 xml-cocoon2/tools/build-s.xml Index: build-s.xml =================================================================== <project default="scratchpad" basedir="." name="Scratchpad build"> <!-- =================================================================== --> <!-- Interactive scratchpad builds --> <!-- =================================================================== --> <target name="scratchpad" description="Interactive Scratchpad Build"> <echo message="--------------------------------------------------------------"/> <echo message=" "/> <echo message=" ${fullname} SCRATCHPAD ${version} [${year}]"/> <echo message=" "/> <echo message="--------------------------------------------------------------"/> <echo message="Building with ${ant.version}"/> <echo message="using build file ${ant.file}"/> <echo message="--------------------------------------------------------------"/> <echo message=" "/> <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=" "/> <taskdef name="user-input" classname="UserInputTask" classpath="./anttasks"/> <property name="input.selection" value=""/> <user-input name="input.selection">Please select a target </user-input> <ant antfile="../src/scratchpad/${input.selection}/build.xml"/> </target> </project> <!-- End of file --> 1.1 xml-cocoon2/tools/build-t.xml Index: build-t.xml =================================================================== <!-- build-t.xml ... these are trial build targets which are currently undergoing testing. When ready they can be moved into the main build.xml --> <project default="patchqueue" basedir="." name="Trial builds"> <!-- =================================================================== --> <!-- Initialization target --> <!-- =================================================================== --> <target name="trial-init"> <property name="build.patchqueue" value="${build.dir}/patchqueue"/> <property name="tools.resources.dir" value="${tools.dir}/resources"/> </target> <!-- =================================================================== --> <!-- Gets pending patches from bugzilla and cleans the resultant html --> <!-- =================================================================== --> <target name="prepare-patchqueue" depends="trial-init" description="Patch queue 2 mail"> <mkdir dir="${build.patchqueue}"/> <get src="http://nagoya.apache.org/bugzilla/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&email1=&emailtype1=substring&emailassigned_to1=1&email2=&emailtype2=substring&emailreporter2=1&bugidtype=include&bug_id=&changedin=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&product=Cocoon+2&short_desc=%5BPATCH%5D&short_desc_type=anywordssubstr&long_desc=&long_desc_type=allwordssubstr&bug_file_loc=&bug_file_loc_type=allwordssubstr&keywords=&keywords_type=anywords&field0-0-0=noop&type0-0-0=noop&value0-0-0=&cmdtype=doit&namedcmd=cocoon+patch+queue&newqueryname=&order=Reuse+same+sort+as+last+time" dest="${build.patchqueue}/bugzillapatchqueue.html" verbose="true" usetimestamp="true" ignoreerrors="true"/> <taskdef name="jtidy" classname="JTidyTask" classpath="${tools.dir}/anttasks"/> <jtidy src="${build.patchqueue}/bugzillapatchqueue.html" dest="${build.patchqueue}/bugzillapatchqueue.xhtml" log="${build.patchqueue}/bugzillapatchqueue.log" summary="true" warn="true"/> </target> <!-- =================================================================== --> <!-- Transforms bugzilla patches html into xml --> <!-- =================================================================== --> <target name="patchqueue-xml" depends="prepare-patchqueue"> <copy file="${tools.resources.dir}/stylesheets/bugzilla2patchqueue.xsl" tofile="${build.patchqueue}/bugzilla2patchqueue.xsl"/> <style basedir="${build.patchqueue}" destdir="${build.patchqueue}" includes="bugzillapatchqueue.xhtml" extension=".xml" style="${tools.resources.dir}/stylesheets/bugzilla2patchqueue.xsl"/> </target> <!-- =================================================================== --> <!-- Makes patches.xml for xdocs using bugzilla patches xml --> <!-- =================================================================== --> <target name="patchqueue-xdocs" depends="patchqueue-xml"> <copy file="${tools.resources.dir}/stylesheets/patchqueue2xdocs.xsl" tofile="${build.patchqueue}/patchqueue2xdocs.xsl"/> <style basedir="${build.patchqueue}" destdir="${build.patchqueue}" includes="bugzillapatchqueue.xml" extension=".xdoc" style="${tools.resources.dir}/stylesheets/patchqueue2xdocs.xsl"/> <copy file="${build.patchqueue}/bugzillapatchqueue.xdoc" tofile="${docs.dir}/patches.xml"/> </target> <!-- =================================================================== --> <!-- Sends a notification of the current patch queue to the mailing list --> <!-- =================================================================== --> <target name="patchqueue" depends="patchqueue-xdocs"> <copy file="${tools.resources.dir}/stylesheets/patchqueue2text4dev.xsl" tofile="${build.patchqueue}/patchqueue2text4dev.xsl"/> <style basedir="${build.patchqueue}" destdir="${build.patchqueue}" includes="bugzillapatchqueue.xml" extension=".txt" style="${tools.resources.dir}/stylesheets/patchqueue2text4dev.xsl"/> </target> <!-- =================================================================== --> <!-- Sends a notification of the current patch queue to the mailing list --> <!-- =================================================================== --> <target name="patchqueue-notify" depends="patchqueue"> <mail from="[EMAIL PROTECTED]" tolist="[EMAIL PROTECTED]" mailhost="192.4.0.155" subject="DO NOT REPLY [PATCH QUEUE] Summary ${TODAY}" files="${build.patchqueue}/bugzillapatchqueue.txt"/> </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]