nicolaken 2002/08/28 10:47:16
Modified: . build.xml module.xml properties.xml
Added: src/blocks/fop/java/org/apache/cocoon/components/renderer
RendererFactory.java
Log:
Initial support for the move of block code to the blocks dir, and
relative build process.
Moved Fop there for analysis of the system prior to general commitment.
Revision Changes Path
1.260 +61 -15 xml-cocoon2/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/build.xml,v
retrieving revision 1.259
retrieving revision 1.260
diff -u -r1.259 -r1.260
--- build.xml 27 Aug 2002 13:20:10 -0000 1.259
+++ build.xml 28 Aug 2002 17:47:15 -0000 1.260
@@ -110,7 +110,7 @@
<property file="${user.home}/.ant.properties"/>
<!--
- these are here only for those who use jikes compiler. For other
+ these are here only for those who use jikes @namer. For other
developers this part makes no difference.
-->
<property name="build.compiler.emacs" value="on"/>
@@ -424,11 +424,11 @@
<available classpathref="classpath"
property="svg.present"
classname="org.apache.batik.transcoder.Transcoder"/>
-
+<!--
<available classpathref="classpath"
property="fop.present"
classname="org.apache.fop.apps.Driver"/>
-
+-->
<available classpathref="classpath"
property="tidy.present"
classname="org.w3c.tidy.Tidy"/>
@@ -578,8 +578,9 @@
value="Batik is required for the svg serializers."/>
</antcall>
</target>
-
+
<!-- Outputs a warning if org.apache.fop.* classes are missing during compilation
-->
+<!--
<target name="fop-warn" unless="fop.present" depends="optional-tests">
<antcall target="op-warning">
<param name="thing" value="FOP"/>
@@ -589,7 +590,7 @@
value="FOP is required for the fo2pdf, fo2ps and fo2pcl serializer."/>
</antcall>
</target>
-
+-->
<!-- Outputs a warning if org.w3c.tidy.* classes are missing during compilation
-->
<target name="tidy-warn" unless="tidy.present" depends="optional-tests">
<antcall target="op-warning">
@@ -737,7 +738,7 @@
<!-- Print out warnings for optional components -->
<!-- =================================================================== -->
<target name="optional-warnings"
- depends="bsf-warn, rhino-warn, jfor-warn, xmldb-warn, php-warn,
naming-warn, svg-warn, fop-warn, tidy-warn, maybeupload-warn, lucene-warn, deli-warn,
velocity-warn, hsqldb-warn, resolver-warn, jisp-warn, pizza-warn, poi-warn,
commons-logging-warn, jxpath-warn, httpclient-warn">
+ depends="bsf-warn, rhino-warn, jfor-warn, xmldb-warn, php-warn,
naming-warn, svg-warn, tidy-warn, maybeupload-warn, lucene-warn, deli-warn,
velocity-warn, hsqldb-warn, resolver-warn, jisp-warn, pizza-warn, poi-warn,
commons-logging-warn, jxpath-warn, httpclient-warn">
</target>
@@ -792,11 +793,11 @@
<exclude name="**/svg.*"
unless="svg.present"/>
<exclude name="**/components/transcoder/**.java"
unless="svg.present"/>
<exclude name="**/components/url/Parsed**ProtocolHandler.java"
unless="svg.present"/>
-
+<!--
<exclude name="**/FOP*" unless="fop.present"/>
<exclude name="**/renderer/*" unless="fop.present"/>
<exclude name="**/fop.*" unless="fop.present"/>
-
+-->
<exclude name="**/CompiledJavascript*" unless="rhino.compiler.present"/>
<exclude name="**/javascript/Javascript*"
unless="rhino.interpreter.present"/>
<exclude name="**/javascript/javascript*"
unless="rhino.interpreter.present"/>
@@ -905,7 +906,7 @@
<!-- =================================================================== -->
<target name="generate-java-code" depends="generate-java-code-check"
unless="generate-java-code.notrequired">
- <style basedir="${java.dir}/org/apache/cocoon/components/browser"
+ <xslt basedir="${java.dir}/org/apache/cocoon/components/browser"
destdir="${build.src}/org/apache/cocoon/components/browser"
includes="BrowserImpl.xml"
extension=".java"
@@ -916,7 +917,7 @@
<!-- =================================================================== -->
<!-- Compiles the source directory -->
<!-- =================================================================== -->
- <target name="compile" depends="prepare-src-main"
+ <target name="compile-core" depends="prepare-src-main"
description="Compiles the source code">
<copy todir="${build.dest}">
<fileset dir="${build.src}">
@@ -975,7 +976,7 @@
<!-- =================================================================== -->
<target name="all" depends="package" description="Default target (calls the
'package' target)"/>
- <target name="package" depends="compile" description="Generates the jar packages">
+ <target name="package" depends="compile-core" description="Generates the jar
packages">
<jar jarfile="${build.dir}/${name}.jar" manifest="${build.src}/Manifest.mf">
<fileset dir="${build.dest}">
<include name="org/**"/>
@@ -1003,7 +1004,7 @@
<mkdir dir="${build.context}"/>
<mkdir dir="${build.context}/images"/>
<mkdir dir="${build.docs}"/>
- <mkdir dir="${build.dir}/work"/>
+ <mkdir dir="${build.work}"/>
<!-- make filtered copy of XML docs -->
<copy todir="${build.context}" filtering="on">
@@ -1162,6 +1163,23 @@
extension="xconf"
configuration="${build.war}/WEB-INF/cocoon.xconf"/>
+ <!-- Invoke the XConfTool to add entries for block components -->
+ <xconf-tool directory="${build.blocks.root}"
+ extension="xmap"
+ configuration="${build.war}/sitemap.xmap"/>
+
+ <xconf-tool directory="${build.blocks.root}"
+ extension="xpipe"
+ configuration="${build.war}/sitemap.xmap"/>
+
+ <xconf-tool directory="${build.blocks.root}"
+ extension="samplesxpipe"
+ configuration="${build.war}/samples/sitemap.xmap"/>
+
+ <xconf-tool directory="${build.blocks.root}"
+ extension="xconf"
+ configuration="${build.war}/WEB-INF/cocoon.xconf"/>
+
<!-- Invoke the XConfTool to add optional entries for demos -->
<xconf-tool directory="${build.war}"
extension="xpipe"
@@ -1267,6 +1285,11 @@
<target name="prepare-webapp-libs" depends="package, copy-webapp-libs"
if="include.webapp.libs">
<copy file="${build.dir}/${name}.jar"
tofile="${build.war}/WEB-INF/lib/${name}-${version}.jar"/>
+ <copy todir="${build.war}/WEB-INF/lib">
+ <fileset dir="${build.dir}">
+ <include name="**/*-block.jar"/>
+ </fileset>
+ </copy>
</target>
<!-- =================================================================== -->
@@ -1397,7 +1420,7 @@
<copy file="announcement.xml" tofile="${build.context}\xdocs\announcement.xml"
filtering="on"/>
- <style basedir="${build.context}\xdocs"
+ <xslt basedir="${build.context}\xdocs"
destdir="${build.dir}"
style="${build.context}\stylesheets\announcement2txt.xsl"
includes="announcement.xml"
@@ -1976,13 +1999,36 @@
<replace file="${build.dir}/current-jars.xml"
token="${file.separator}" value="/"/>
- <style in="${lib.dir}/jars.xml" out="${build.dir}/jars.xml"
+ <xslt in="${lib.dir}/jars.xml" out="${build.dir}/jars.xml"
processor="trax"
style="${tools.dir}/src/check-jars.xsl">
<param name="current-files"
expression="../../${build.dir}/current-jars.xml"/>
- </style>
+ </xslt>
</target>
+
+
+ <!-- =================================================================== -->
+ <!-- Compile also all blocks that are specified in properties.xml -->
+ <!-- =================================================================== -->
+ <target name="compile" depends="init">
+
+ <property name="compile.project" value="all"/>
+
+ <delete file="${build.work}/blocks-build.xml"/>
+
+ <xslt in="module.xml"
+ out="${build.work}/blocks-build.xml"
+ processor="trax"
+ style="${tools.dir}/src/blocks-build.xsl"/>
+
+ <ant antfile="${build.work}/blocks-build.xml"
+ inheritAll="true"
+ inheritRefs="true"
+ target="${compile.project}"/>
+
+ </target>
+
</project>
1.2 +60 -40 xml-cocoon2/module.xml
Index: module.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/module.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- module.xml 27 Aug 2002 11:45:56 -0000 1.1
+++ module.xml 28 Aug 2002 17:47:15 -0000 1.2
@@ -1,3 +1,4 @@
+<?xml version="1.0"?>
<module name="xml-cocoon2">
<url href="http://xml.apache.org/cocoon/cocoon2.html"/>
@@ -16,47 +17,46 @@
<depend property="avalonapi.jar" project="jakarta-avalon"/>
</ant>
- <depend project="jakarta-ant" inherit="runtime"/>
- <depend project="xml-xerces"/>
- <depend project="xml-xalan2"/>
- <depend project="xml-batik"/>
- <depend project="jakarta-avalon-excalibur"/>
- <depend project="excalibur-cli"/>
- <depend project="excalibur-naming"/>
- <depend project="excalibur-sourceresolve"/>
- <depend project="excalibur-xmlutil"/>
- <depend project="excalibur-store"/>
- <depend project="jakarta-regexp"/>
- <depend project="commons-httpclient"/>
- <depend project="commons-collections"/>
- <depend project="commons-jxpath"/>
- <depend project="excalibur-pool"/>
- <depend project="excalibur-datasource"/>
- <depend project="excalibur-component"/>
- <depend project="excalibur-logger"/>
- <depend project="excalibur-collections"/>
+ <depend project="jakarta-ant" inherit="runtime" version="supplied"/>
+ <depend project="xml-xerces" version="supplied"/>
+ <depend project="xml-xalan2" version="supplied"/>
+ <depend project="xml-batik" version="supplied"/>
+ <depend project="jakarta-avalon-excalibur" version="supplied"/>
+ <depend project="excalibur-cli" version="supplied"/>
+ <depend project="excalibur-naming" version="supplied"/>
+ <depend project="excalibur-sourceresolve" version="supplied"/>
+ <depend project="excalibur-xmlutil" version="supplied"/>
+ <depend project="excalibur-store" version="supplied"/>
+ <depend project="jakarta-regexp" version="supplied"/>
+ <depend project="commons-httpclient" version="supplied"/>
+ <depend project="commons-collections" version="supplied"/>
+ <depend project="commons-jxpath" version="supplied"/>
+ <depend project="excalibur-pool" version="supplied"/>
+ <depend project="excalibur-datasource" version="supplied"/>
+ <depend project="excalibur-component" version="supplied"/>
+ <depend project="excalibur-logger" version="supplied"/>
+ <depend project="excalibur-collections" version="supplied"/>
- <depend project="jdom"/>
- <depend project="bsf"/>
- <depend project="jakarta-velocity"/>
- <depend project="jakarta-lucene"/>
- <depend project="hsqldb"/>
- <depend project="castor"/>
-
- <option project="xml-commons-resolver"/>
- <option project="xml-fop"/>
- <option project="jtidy"/>
- <option project="phpservlt"/>
- <option project="jakarta-servletapi-4"/>
- <option project="rhino"/>
- <option project="xmldb"/>
- <option project="jndi"/>
- <option project="xmldb"/>
- <option project="xml-axis"/>
- <option project="jisp"/>
+ <depend project="jdom" version="supplied"/>
+ <depend project="bsf" version="supplied"/>
+ <depend project="jakarta-velocity" version="supplied"/>
+ <depend project="jakarta-lucene" version="supplied"/>
+ <depend project="hsqldb" version="supplied"/>
+ <depend project="castor" version="supplied"/>
+
+ <option project="xml-commons-resolver" version="supplied"/>
+ <option project="jtidy" version="supplied"/>
+ <option project="phpservlt" version="supplied"/>
+ <option project="jakarta-servletapi-4" version="supplied"/>
+ <option project="rhino" version="supplied"/>
+ <option project="xmldb" version="supplied"/>
+ <option project="jndi" version="supplied"/>
+ <option project="xmldb" version="supplied"/>
+ <option project="xml-axis" version="supplied"/>
+ <option project="jisp" version="supplied"/>
<!-- <option project="jakarta-poi"/> -->
- <option project="commons-logging"/>
- <option project="jakarta-slide" ids="kernel" />
+ <option project="commons-logging" version="supplied"/>
+ <option project="jakarta-slide" ids="kernel" version="supplied"/>
<work nested="build/cocoon/classes"/>
<work nested="tools/anttasks"/>
@@ -76,6 +76,26 @@
to="[EMAIL PROTECTED]"/>
</project>
+ <project name="fop-block">
+ <package>org.apache.cocoon</package>
+
+ <ant target="block">
+ <property name="block-name" value="fop"/>
+ </ant>
+
+ <depend project="xml-cocoon2"/>
+ <depend project="xml-fop" version="supplied"/>
+
+ <work nested="tools/anttasks"/>
+ <home nested="build/cocoon"/>
+
+ <jar name="fop-block.jar"/>
+
+ <nag from="Nicola Ken Barozzi <[EMAIL PROTECTED]>"
+ to="[EMAIL PROTECTED]"/>
+
+ </project>
+
<project name="jisp">
<url href="http://www.coyotegulch.com/jisp/"/>
<description>
@@ -84,5 +104,5 @@
<home nested="lib/optional"/>
<jar name="jisp_1_0_2.jar"/>
</project>
-
+
</module>
1.2 +9 -1 xml-cocoon2/properties.xml
Index: properties.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/properties.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- properties.xml 27 Aug 2002 13:05:56 -0000 1.1
+++ properties.xml 28 Aug 2002 17:47:15 -0000 1.2
@@ -43,6 +43,7 @@
<webapp dir="./src/webapp" />
<resource dir="./src/resources" />
<context dir="./src/documentation" />
+ <blocks dir="./src/blocks" />
<scratchpad
dir="./src/scratchpad"
@@ -61,7 +62,8 @@
xdocs="./build/cocoon/xdocs"
war="./build/cocoon/webapp"
javadocs="./build/cocoon/javadocs"
- context="./build/cocoon/documentation">
+ context="./build/cocoon/documentation"
+ work="./build/cocoon/work">
<scratchpad
dir="./build/cocoon/scratchpad"
@@ -72,6 +74,9 @@
printer="./build/cocoon/printer-docs"
loglevel="ERROR" />
+ <blocks
+ root="./build/cocoon/blocks" />
+
</build>
<dist
@@ -96,7 +101,10 @@
</samples>
<blocks>
+ <fop include="true"/>
</blocks>
+
</cocoon>
+
</properties>
1.1
xml-cocoon2/src/blocks/fop/java/org/apache/cocoon/components/renderer/RendererFactory.java
Index: RendererFactory.java
===================================================================
/*
============================================================================
The Apache Software License, Version 1.1
============================================================================
Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. The end-user documentation included with the redistribution, if any, must
include the following acknowledgment: "This product includes software
developed by the Apache Software Foundation (http://www.apache.org/)."
Alternately, this acknowledgment may appear in the software itself, if
and wherever such third-party acknowledgments normally appear.
4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
used to endorse or promote products derived from this software without
prior written permission. For written permission, please contact
[EMAIL PROTECTED]
5. Products derived from this software may not be called "Apache", nor may
"Apache" appear in their name, without prior written permission of the
Apache Software Foundation.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This software consists of voluntary contributions made by many individuals
on behalf of the Apache Software Foundation and was originally created by
Stefano Mazzocchi <[EMAIL PROTECTED]>. For more information on the Apache
Software Foundation, please see <http://www.apache.org/>.
*/
package org.apache.cocoon.components.renderer;
import org.apache.fop.render.Renderer;
/**
* Apache FOP Renderer factory.
* When given a MIME type, find a Renderer which supports that MIME type.
* @author <a href="mailto:[EMAIL PROTECTED]">Davanum Srinivas</a>
* @version CVS $Id: RendererFactory.java,v 1.1 2002/08/28 17:47:16 nicolaken Exp $
*/
public interface RendererFactory {
/**
* Create a transcoder for a specified MIME type.
* @param mimeType The MIME type of the destination format
* @return A suitable renderer, or <code>null> if one cannot be found
*/
Renderer createRenderer(String mimeType) ;
}
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]