Browse files

- moved docbook build to reference directory

git-svn-id: http://red5.googlecode.com/svn/java/server/trunk@4209 1b6495e4-3631-0410-8e05-8f51eee8b9cc
  • Loading branch information...
1 parent 496e875 commit fc9c098877acb1a3386d711bfdc00c54d81af11a electroteque committed Mar 24, 2011
Showing with 3 additions and 214 deletions.
  1. +0 −5 build.properties
  2. +3 −209 build.xml
View
5 build.properties
@@ -53,10 +53,5 @@ svn.url=http://red5.googlecode.com/svn/
svn.login=
svn.password=
-trac.url=http://trac.red5.org/login/xmlrpc
-trac.username=
-trac.password=
-trac.page=Documentation/UsersReferenceManual
-
# Items to exclude when building the server war
server.war.excludes=**/*.jsp,org/slf4j/**,org/red5/classloading/**,org/red5/server/script/**,org/red5/server/jetty/**,org/red5/server/tomcat/**,org/red5/server/midi/**,org/red5/server/net/rtmpt/*Loader.java,org/red5/server/net/rtmps/*Loader.java,org/red5/server/net/servlet/RTMPTServlet.java,org/red5/server/net/servlet/StatisticsServlet.java,org/red5/server/net/servlet/ZAMFGatewayServlet.java,org/red5/server/ContextLoader.java,org/red5/server/DebugPooledByteBufferAllocator.java,org/red5/server/Bootstrap.java,org/red5/logging/ContextLoggingListener.java,org/red5/logging/Derby*.java,org/red5/logging/Log*.java,org/red5/logging/W3CAppender.java
View
212 build.xml
@@ -1046,217 +1046,11 @@
<arg line="-J-Djava.util.logging.config.file=${config.dir}/management.logging.properties -J-Djava.security.manager -J-Djava.security.policy=${config.dir}/red5.policy -J-Djavax.net.ssl.trustStore=${config.dir}/truststore.jmx -J-Djavax.net.ssl.trustStorePassword=password -J-Djavax.net.ssl.keyStore=${config.dir}/keystore.jmx -J-Djavax.net.ssl.keyStorePassword=password -J-Dssl.debug=true -J-Djava.security.debug=ssl service:jmx:rmi:///jndi/rmi://localhost:9999/red5"/>
</exec>
</target>
- <!-- XSLT task because default is not customizable -->
- <macrodef name="dbxslt">
- <attribute name="xincludes" default="true"/>
- <attribute name="out" default=""/>
- <attribute name="in" default=""/>
- <attribute name="style" default=""/>
- <attribute name="basedir" default="${doc.ref.dir}"/>
- <attribute name="params" default=""/>
- <sequential>
- <condition property="xslt.out" value="" else="-o @{out}">
- <length string="@{out}" trim="true" length="0"/>
- </condition>
- <condition property="xslt.xincludes" value="-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl -Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XIncludeParserConfiguration"
- else="">
- <equals arg1="@{xincludes}" arg2="true"/>
- </condition>
- <java classname="com.icl.saxon.StyleSheet" fork="true" dir="@{basedir}" classpathref="doc.lib.classpath">
- <jvmarg line="${xslt.xincludes}"/>
- <jvmarg value="-Dxslthl.config=file://${basedir}/${doc.ref.dir}/lib/docbook-xsl-ns/highlighting/xslthl-config.xml"/>
- <jvmarg value="-Xms128m"/>
- <jvmarg value="-Xmx512m"/>
- <arg line="${xslt.out} @{in} @{style} @{params}"/>
- </java>
- </sequential>
- </macrodef>
- <macrodef name="wiki2docbook">
- <attribute name="host" default=""/>
- <attribute name="username" default=""/>
- <attribute name="password" default=""/>
- <attribute name="dir" default="${basedir}/${doc.ref.dir}"/>
- <attribute name="parent-page" default=""/>
- <attribute name="page" default=""/>
- <attribute name="type" default="chapter"/>
- <attribute name="basePath" default="Documentation/UsersReferenceManual"/>
-
- <sequential>
- <!--
- <condition property="wiki.page" value="" else="-s @{page}">
- <equals arg1="@{page}" arg2=""/>
- </condition>
-
- <condition property="wiki.parent-page" value="" else="-P @{parent-page}">
- <equals arg1="@{parent-page}" arg2=""/>
- </condition>
-
- <echo>${wiki.parent-page}</echo>
- <echo>@{page}</echo>
- -->
-
- <java classname="org.red5.trac.TracWiki2DocbookClient" fork="true" dir="@{dir}" classpathref="doc.lib.classpath">
- <arg value="-h @{host}"/>
- <arg value="-u @{username}"/>
- <arg value="-p @{password}"/>
- <arg value="-d @{dir}"/>
- <arg value="-t @{type}"/>
- <arg value="-b @{basePath}"/>
- <arg value="@{page}"/>
- <jvmarg value="-Xmx512m"/>
- </java>
-
-
- </sequential>
- </macrodef>
- <!-- FOP Task because default cannot send memory args -->
- <macrodef name="fop-pdf">
- <attribute name="basedir" default="."/>
- <attribute name="fofile" default=""/>
- <attribute name="outfile" default=""/>
- <sequential>
- <java classname="org.apache.fop.cli.Main" dir="@{basedir}" fork="true" failonerror="true"
- classpathref="doc.lib.classpath">
- <sysproperty key="java.awt.headless" value="true"/>
- <jvmarg value="-Xms128m"/>
- <jvmarg value="-Xmx512m"/>
- <jvmarg value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog"/>
- <arg value="-fo"/>
- <arg path="@{fofile}"/>
- <arg value="-pdf"/>
- <arg path="@{outfile}"/>
- </java>
- </sequential>
- </macrodef>
- <!-- Check if Docbook libraries are installed -->
- <target name="doc-prepare" description="Extra preparation for the documentation" unless="doc.prepare">
- <path id="doc.lib.classpath">
- <fileset dir="${basedir}/${doc.ref.lib}/docbook">
- <include name="*.jar"/>
- </fileset>
- <fileset dir="${basedir}/${doc.ref.lib}/tracwiki2docbook">
- <include name="*.jar"/>
- </fileset>
- </path>
- <sequential>
- <get src="http://red5.electroteque.org/doc/reference/docbook-reference-libs.tar.bz2"
- dest="${basedir}/${doc.ref.dir}/docbook-reference-libs.tar.bz2"
- verbose="true"
- usetimestamp="true"/>
-
- <untar compression="bzip2" src="${basedir}/${doc.ref.dir}/docbook-reference-libs.tar.bz2" dest="${basedir}/${doc.ref.dir}/" overwrite="false"/>
- </sequential>
-
-
- <property name="doc.prepare" value="true"/>
- </target>
- <!-- Clean doc source -->
- <target name="doc-clean" unless="doc.prepare">
- <delete dir="${basedir}/${doc.ref.dir}/pdf"/>
- <delete dir="${basedir}/${doc.ref.dir}/html"/>
- <delete dir="${basedir}/${doc.ref.dir}/html_single"/>
- </target>
- <target name="doc-wiki2docbook" description="Compile reference documentation in PDF format" unless="doc.wiki2docbook">
- <!-- Build fo file -->
-
- <wiki2docbook
- host="${trac.url}"
- username="${trac.username}"
- password="${trac.password}"
- page="-P ${trac.page}"
- basePath="Documentation/UsersReferenceManual"
- dir="${basedir}/${doc.ref.dir}/src/"
- />
-
- <wiki2docbook
- host="${trac.url}"
- username="${trac.username}"
- password="${trac.password}"
- page="-s Changelog"
- dir="${basedir}/${doc.ref.dir}/src/"
- type="appendix"
- />
-
- <wiki2docbook
- host="${trac.url}"
- username="${trac.username}"
- password="${trac.password}"
- page="-P Codecs"
- basePath="Codecs"
- dir="${basedir}/${doc.ref.dir}/src/"
- type="appendix"
- />
-
- <property name="doc.wiki2docbook" value="true"/>
-
- </target>
+
+
- <!-- PDF Documentation -->
- <target name="doc-pdf" description="Compile reference documentation in PDF format">
- <delete dir="${basedir}/${doc.ref.dir}/pdf"/>
- <antcall target="doc-prepare" inheritAll="true" inheritRefs="true"/>
- <antcall target="doc-wiki2docbook" inheritAll="true" inheritRefs="true"/>
- <!-- Build fo file -->
- <mkdir dir="${basedir}/${doc.ref.dir}/pdf"/>
- <dbxslt basedir="${basedir}/${doc.ref.dir}/src" in="${basedir}/${doc.ref.dir}/src/index.xml"
- out="${basedir}/${doc.ref.dir}/src/docbook_fop.tmp" style="${basedir}/${doc.ref.dir}/styles/fopdf.xsl"/>
- <!-- Build pdf -->
- <fop-pdf basedir="${basedir}/${doc.ref.dir}/src" fofile="${basedir}/${doc.ref.dir}/src/docbook_fop.tmp"
- outfile="${basedir}/${doc.ref.dir}/pdf/red5-reference-0.9.pdf"/>
- <delete file="${doc.ref.dir}/src/docbook_fop.tmp"/>
- </target>
- <!-- HTML Site Documentation -->
- <target name="doc-html" description="Compile reference documentation in HTML format">
- <delete dir="${basedir}/${doc.ref.dir}/html"/>
- <delete dir="${basedir}/${doc.ref.dir}/html_single"/>
- <antcall target="doc-prepare" inheritAll="true" inheritRefs="true"/>
- <antcall target="doc-wiki2docbook" inheritAll="true" inheritRefs="true"/>
-
- <mkdir dir="${basedir}/${doc.ref.dir}/html"/>
- <mkdir dir="${basedir}/${doc.ref.dir}/html/images"/>
- <copy todir="${basedir}/${doc.ref.dir}/html/images">
- <fileset dir="${basedir}/${doc.ref.dir}/src/images">
- <include name="*.gif"/>
- <include name="*.svg"/>
- <include name="*.jpg"/>
- <include name="*.png"/>
- </fileset>
- </copy>
- <copy todir="${basedir}/${doc.ref.dir}/html/" failonerror="false">
- <fileset dir="${basedir}/${doc.ref.dir}/styles/">
- <include name="*.css"/>
- <include name="*.js"/>
- </fileset>
- </copy>
- <dbxslt basedir="${basedir}/${doc.ref.dir}/html/" in="${basedir}/${doc.ref.dir}/src/index.xml"
- style="${basedir}/${doc.ref.dir}/styles/html_chunk.xsl"/>
- </target>
- <!-- HTML Single Documentation -->
- <target name="doc-html-single" depends="doc-prepare" description="Compile reference documentation in single page HTML format">
- <mkdir dir="${basedir}/${doc.ref.dir}/html"/>
- <mkdir dir="${doc.ref.dir}/html_single/images"/>
- <copy todir="${basedir}/${doc.ref.dir}/html_single/images">
- <fileset dir="${basedir}/${doc.ref.dir}/src/images">
- <include name="*.gif"/>
- <include name="*.svg"/>
- <include name="*.jpg"/>
- <include name="*.png"/>
- </fileset>
- </copy>
- <copy todir="${basedir}/${doc.ref.dir}/html_single/" file="${basedir}/${doc.ref.dir}/styles/html.css"
- failonerror="false"/>
- <dbxslt basedir="${basedir}/${doc.ref.dir}/html_single/" in="${basedir}/${doc.ref.dir}/src/index.xml"
- out="${basedir}/${doc.ref.dir}/html_single/index.html" style="${basedir}/${doc.ref.dir}/styles/html.xsl"/>
- </target>
- <!-- Build all documentation formats -->
- <target name="doc-all" depends="doc-prepare,doc-wiki2docbook, doc-pdf, doc-html" description="Generate all reference documentation">
- <sequential>
- <antcall target="doc-clean" inheritAll="true" inheritRefs="true"/>
- <antcall target="doc-pdf" inheritAll="true" inheritRefs="true"/>
- <antcall target="doc-html" inheritAll="true" inheritRefs="true"/>
- </sequential>
- </target>
+
<!--
Requirements:
1. Go here: http://subclipse.tigris.org/svnant.html

0 comments on commit fc9c098

Please sign in to comment.