]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
FOP-2733: Drop dependency on Avalon-Framework
authorSimon Steiner <ssteiner@apache.org>
Tue, 22 Jan 2019 11:53:31 +0000 (11:53 +0000)
committerSimon Steiner <ssteiner@apache.org>
Tue, 22 Jan 2019 11:53:31 +0000 (11:53 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1851806 13f79535-47bb-0310-9956-ffa450edef68

73 files changed:
fop-core/pom.xml
fop-core/src/main/java/org/apache/fop/activity/ContainerUtil.java [new file with mode: 0644]
fop-core/src/main/java/org/apache/fop/activity/Initializable.java [new file with mode: 0644]
fop-core/src/main/java/org/apache/fop/apps/FOUserAgent.java
fop-core/src/main/java/org/apache/fop/apps/FopConfParser.java
fop-core/src/main/java/org/apache/fop/apps/FopFactory.java
fop-core/src/main/java/org/apache/fop/apps/FopFactoryBuilder.java
fop-core/src/main/java/org/apache/fop/apps/FopFactoryConfig.java
fop-core/src/main/java/org/apache/fop/cli/Main.java
fop-core/src/main/java/org/apache/fop/configuration/Configurable.java [new file with mode: 0644]
fop-core/src/main/java/org/apache/fop/configuration/Configuration.java [new file with mode: 0644]
fop-core/src/main/java/org/apache/fop/configuration/ConfigurationException.java [new file with mode: 0644]
fop-core/src/main/java/org/apache/fop/configuration/DefaultConfiguration.java [new file with mode: 0644]
fop-core/src/main/java/org/apache/fop/configuration/DefaultConfigurationBuilder.java [new file with mode: 0644]
fop-core/src/main/java/org/apache/fop/configuration/NullConfiguration.java [new file with mode: 0644]
fop-core/src/main/java/org/apache/fop/fonts/DefaultFontConfig.java
fop-core/src/main/java/org/apache/fop/fonts/FontConfig.java
fop-core/src/main/java/org/apache/fop/fonts/FontManagerConfigurator.java
fop-core/src/main/java/org/apache/fop/fonts/substitute/FontSubstitutionsConfigurator.java
fop-core/src/main/java/org/apache/fop/render/RendererConfig.java
fop-core/src/main/java/org/apache/fop/render/RendererConfigOption.java
fop-core/src/main/java/org/apache/fop/render/XMLHandlerConfigurator.java
fop-core/src/main/java/org/apache/fop/render/afp/AFPFontConfig.java
fop-core/src/main/java/org/apache/fop/render/afp/AFPInfo.java
fop-core/src/main/java/org/apache/fop/render/afp/AFPRendererConfig.java
fop-core/src/main/java/org/apache/fop/render/afp/AFPRendererContext.java
fop-core/src/main/java/org/apache/fop/render/afp/AFPRendererOption.java
fop-core/src/main/java/org/apache/fop/render/afp/AFPShadingMode.java
fop-core/src/main/java/org/apache/fop/render/bitmap/BitmapRendererConfig.java
fop-core/src/main/java/org/apache/fop/render/bitmap/PNGRendererConfig.java
fop-core/src/main/java/org/apache/fop/render/bitmap/TIFFRendererConfig.java
fop-core/src/main/java/org/apache/fop/render/intermediate/IFRendererConfig.java
fop-core/src/main/java/org/apache/fop/render/java2d/Java2DRendererConfig.java
fop-core/src/main/java/org/apache/fop/render/java2d/Java2DRendererOption.java
fop-core/src/main/java/org/apache/fop/render/pcl/Java2DRendererOption.java
fop-core/src/main/java/org/apache/fop/render/pcl/PCLRendererConfig.java
fop-core/src/main/java/org/apache/fop/render/pdf/PDFRendererConfig.java
fop-core/src/main/java/org/apache/fop/render/pdf/PDFSVGHandler.java
fop-core/src/main/java/org/apache/fop/render/ps/PSRendererConfig.java
fop-core/src/main/java/org/apache/fop/render/ps/PSSVGHandler.java
fop-core/src/main/java/org/apache/fop/render/txt/TxtRendererConfig.java
fop-core/src/main/java/org/apache/fop/svg/AbstractFOPTranscoder.java
fop-core/src/main/java/org/apache/fop/svg/PDFDocumentGraphics2DConfigurator.java
fop-core/src/main/java/org/apache/fop/svg/PDFTranscoder.java
fop-core/src/test/java/org/apache/fop/apps/AbstractRendererConfigParserTester.java
fop-core/src/test/java/org/apache/fop/apps/AbstractRendererConfiguratorTest.java
fop-core/src/test/java/org/apache/fop/apps/MutableConfig.java
fop-core/src/test/java/org/apache/fop/config/BaseUserConfigTest.java
fop-core/src/test/java/org/apache/fop/threading/AvalonAdapter.java
fop-core/src/test/java/org/apache/fop/threading/FOPTestbed.java
fop-core/src/test/java/org/apache/fop/threading/FOProcessorImpl.java
fop-core/src/test/java/org/apache/fop/threading/IFProcessorImpl.java
fop-core/src/test/java/org/apache/fop/threading/Main.java
fop-core/src/test/java/org/apache/fop/threading/Processor.java
fop-core/src/test/java/org/apache/fop/visual/AbstractPSPDFBitmapProducer.java
fop-core/src/test/java/org/apache/fop/visual/BatchDiffer.java
fop-core/src/test/java/org/apache/fop/visual/BitmapProducer.java
fop-core/src/test/java/org/apache/fop/visual/BitmapProducerJava2D.java
fop-core/src/test/java/org/apache/fop/visual/ReferenceBitmapLoader.java
fop-servlet/pom.xml
fop-transcoder-allinone/pom.xml
fop-transcoder-allinone/src/tools/resources/assembly/assembly.xml
fop/build.xml
fop/examples/embedding/build.xml
fop/examples/embedding/java/embedding/ExampleAWTViewer.java
fop/examples/embedding/java/embedding/ExampleEPS.java
fop/examples/embedding/java/embedding/ExampleJava2D2PDF.java
fop/lib/README.txt
fop/lib/avalon-framework-api-4.3.1.jar [deleted file]
fop/lib/avalon-framework-impl-4.3.1.jar [deleted file]
fop/lib/avalon-framework.LICENSE.txt [deleted file]
fop/lib/avalon-framework.NOTICE.TXT [deleted file]
pom.xml

index 45af7badf8afb7b20e0c85a3b4753e288a79bb21..ae061197d24f53f36a3a78a914fc910d7b3cddac 100644 (file)
       <artifactId>ant</artifactId>
       <version>1.8.2</version>
     </dependency>
-    <dependency>
-      <groupId>org.apache.avalon.framework</groupId>
-      <artifactId>avalon-framework-api</artifactId>
-      <version>${avalon.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.avalon.framework</groupId>
-      <artifactId>avalon-framework-impl</artifactId>
-      <version>${avalon.version}</version>
-    </dependency>
     <dependency>
       <groupId>org.apache.pdfbox</groupId>
       <artifactId>fontbox</artifactId>
diff --git a/fop-core/src/main/java/org/apache/fop/activity/ContainerUtil.java b/fop-core/src/main/java/org/apache/fop/activity/ContainerUtil.java
new file mode 100644 (file)
index 0000000..00476d5
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* $Id: Accessibility.java 1343632 2012-05-29 09:48:03Z vhennebert $ */
+package org.apache.fop.activity;
+
+import org.apache.fop.configuration.Configurable;
+import org.apache.fop.configuration.Configuration;
+import org.apache.fop.configuration.ConfigurationException;
+
+public final class ContainerUtil {
+
+    private ContainerUtil() {
+        // Never invoked.
+    }
+
+    public static void configure(Configurable configurable, Configuration configuration) {
+        try {
+            configurable.configure(configuration);
+        } catch (ConfigurationException e) {
+            e.printStackTrace();
+            throw new IllegalStateException(e);
+        }
+    }
+
+    public static void initialize(Initializable initializable) {
+        try {
+            initializable.initialize();
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new IllegalStateException(e);
+        }
+    }
+}
diff --git a/fop-core/src/main/java/org/apache/fop/activity/Initializable.java b/fop-core/src/main/java/org/apache/fop/activity/Initializable.java
new file mode 100644 (file)
index 0000000..9c46b70
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* $Id: Accessibility.java 1343632 2012-05-29 09:48:03Z vhennebert $ */
+package org.apache.fop.activity;
+
+public interface Initializable {
+
+    void initialize() throws Exception;
+}
index 2aaa2ad22e931417a474a9219a94a664ccb57a33..51c0d8869ad6505d76b60fa6a047cd86f578c7f2 100644 (file)
@@ -30,8 +30,6 @@ import java.util.Map;
 import javax.xml.transform.Source;
 import javax.xml.transform.stream.StreamSource;
 
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -47,6 +45,8 @@ import org.apache.fop.accessibility.Accessibility;
 import org.apache.fop.accessibility.DummyStructureTreeEventHandler;
 import org.apache.fop.accessibility.StructureTreeEventHandler;
 import org.apache.fop.apps.io.InternalResourceResolver;
+import org.apache.fop.configuration.Configuration;
+import org.apache.fop.configuration.ConfigurationException;
 import org.apache.fop.events.DefaultEventBroadcaster;
 import org.apache.fop.events.Event;
 import org.apache.fop.events.EventBroadcaster;
index c68226db5888cca491ae49af7e2424c1c7639972..7dcbae34c0bebc307db050f09c207d6e51324e21 100644 (file)
@@ -31,9 +31,6 @@ import java.util.Map;
 
 import org.xml.sax.SAXException;
 
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -43,6 +40,9 @@ import org.apache.xmlgraphics.io.ResourceResolver;
 
 import org.apache.fop.apps.io.InternalResourceResolver;
 import org.apache.fop.apps.io.ResourceResolverFactory;
+import org.apache.fop.configuration.Configuration;
+import org.apache.fop.configuration.ConfigurationException;
+import org.apache.fop.configuration.DefaultConfigurationBuilder;
 import org.apache.fop.fonts.FontManagerConfigurator;
 import org.apache.fop.hyphenation.HyphenationTreeCache;
 import org.apache.fop.hyphenation.Hyphenator;
index 100b028e9070e1110cd98643cb8496bc46ea4c4d..2e640ce6d711ca37231a34ca8221a2fa17bf4d74 100644 (file)
@@ -30,7 +30,6 @@ import java.util.Set;
 
 import org.xml.sax.SAXException;
 
-import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -41,6 +40,7 @@ import org.apache.xmlgraphics.util.UnitConv;
 
 import org.apache.fop.apps.io.InternalResourceResolver;
 import org.apache.fop.apps.io.ResourceResolverFactory;
+import org.apache.fop.configuration.Configuration;
 import org.apache.fop.fo.ElementMapping;
 import org.apache.fop.fo.ElementMappingRegistry;
 import org.apache.fop.fonts.FontManager;
index 92f0e8a171143db2b1d42adb6e13650377455023..84f85cdbd374acd5d72acb0e3b8162be47e2cfef 100644 (file)
@@ -26,8 +26,6 @@ import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.avalon.framework.configuration.Configuration;
-
 import org.apache.xmlgraphics.image.loader.ImageContext;
 import org.apache.xmlgraphics.image.loader.ImageManager;
 import org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext.FallbackResolver;
@@ -35,6 +33,7 @@ import org.apache.xmlgraphics.io.ResourceResolver;
 
 import org.apache.fop.apps.io.InternalResourceResolver;
 import org.apache.fop.apps.io.ResourceResolverFactory;
+import org.apache.fop.configuration.Configuration;
 import org.apache.fop.fonts.FontManager;
 import org.apache.fop.layoutmgr.LayoutManagerMaker;
 
index 47df6459960457b118988b0eeaed90e7c7e9e462..37482244b95163dfe27a6d8e20acee94dce2b1b5 100644 (file)
@@ -23,13 +23,12 @@ import java.net.URI;
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.avalon.framework.configuration.Configuration;
-
 import org.apache.xmlgraphics.image.loader.ImageManager;
 import org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext.FallbackResolver;
 import org.apache.xmlgraphics.io.ResourceResolver;
 
 import org.apache.fop.apps.io.InternalResourceResolver;
+import org.apache.fop.configuration.Configuration;
 import org.apache.fop.fonts.FontManager;
 import org.apache.fop.layoutmgr.LayoutManagerMaker;
 
index e082265f1eb56c17fc2047d606af2d2c9841d00e..b8ba68df99c6d4de5feb727fd9af572a753f3c3f 100644 (file)
@@ -112,9 +112,6 @@ public final class Main {
         try {
             //System.out.println(Thread.currentThread().getContextClassLoader());
             Class clazz = Class.forName("org.apache.commons.io.IOUtils");
-            if (clazz != null) {
-                clazz = Class.forName("org.apache.avalon.framework.configuration.Configuration");
-            }
             return (clazz != null);
         } catch (Exception e) {
             return false;
diff --git a/fop-core/src/main/java/org/apache/fop/configuration/Configurable.java b/fop-core/src/main/java/org/apache/fop/configuration/Configurable.java
new file mode 100644 (file)
index 0000000..79f87b7
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* $Id: Accessibility.java 1343632 2012-05-29 09:48:03Z vhennebert $ */
+package org.apache.fop.configuration;
+
+public interface Configurable {
+
+    void configure(Configuration cfg) throws ConfigurationException;
+}
diff --git a/fop-core/src/main/java/org/apache/fop/configuration/Configuration.java b/fop-core/src/main/java/org/apache/fop/configuration/Configuration.java
new file mode 100644 (file)
index 0000000..674a91f
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* $Id: Accessibility.java 1343632 2012-05-29 09:48:03Z vhennebert $ */
+package org.apache.fop.configuration;
+
+public interface Configuration {
+
+    Configuration getChild(String key);
+
+    Configuration getChild(String key, boolean required);
+
+    Configuration[] getChildren(String key);
+
+    String[] getAttributeNames();
+
+    String getAttribute(String key) throws ConfigurationException;
+
+    String getAttribute(String key, String defaultValue);
+
+    boolean getAttributeAsBoolean(String key, boolean defaultValue);
+
+    float getAttributeAsFloat(String key) throws ConfigurationException;
+
+    float getAttributeAsFloat(String key, float defaultValue);
+
+    int getAttributeAsInteger(String key, int defaultValue);
+
+    String getValue() throws ConfigurationException;
+
+    String getValue(String defaultValue);
+
+    boolean getValueAsBoolean() throws ConfigurationException;
+
+    boolean getValueAsBoolean(boolean defaultValue);
+
+    int getValueAsInteger() throws ConfigurationException;
+
+    int getValueAsInteger(int defaultValue);
+
+    float getValueAsFloat() throws ConfigurationException;
+
+    float getValueAsFloat(float defaultValue);
+
+    String getLocation();
+
+}
diff --git a/fop-core/src/main/java/org/apache/fop/configuration/ConfigurationException.java b/fop-core/src/main/java/org/apache/fop/configuration/ConfigurationException.java
new file mode 100644 (file)
index 0000000..66b68ab
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* $Id: Accessibility.java 1343632 2012-05-29 09:48:03Z vhennebert $ */
+package org.apache.fop.configuration;
+
+public class ConfigurationException extends Exception {
+
+    public ConfigurationException(String message) {
+        super(message);
+    }
+
+    public ConfigurationException(String message, Throwable cause) {
+        super(message, cause);
+    }
+}
diff --git a/fop-core/src/main/java/org/apache/fop/configuration/DefaultConfiguration.java b/fop-core/src/main/java/org/apache/fop/configuration/DefaultConfiguration.java
new file mode 100644 (file)
index 0000000..22f28a1
--- /dev/null
@@ -0,0 +1,293 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* $Id: Accessibility.java 1343632 2012-05-29 09:48:03Z vhennebert $ */
+package org.apache.fop.configuration;
+
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+public class DefaultConfiguration implements Configuration {
+
+    static final DocumentBuilderFactory DBF = DocumentBuilderFactory.newInstance();
+
+    static {
+        DBF.setNamespaceAware(false);
+        DBF.setValidating(false);
+        DBF.setIgnoringComments(true);
+        DBF.setIgnoringElementContentWhitespace(true);
+        DBF.setExpandEntityReferences(true);
+    }
+
+    /**
+     * @deprecated For debug only.
+     */
+    public static String toString(Document document) {
+        try {
+            Transformer transformer = TransformerFactory.newInstance().newTransformer();
+            transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+            transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
+            //initialize StreamResult with File object to save to file
+            StreamResult result = new StreamResult(new StringWriter());
+            DOMSource source = new DOMSource(document);
+            transformer.transform(source, result);
+            return result.getWriter().toString();
+        } catch (TransformerException e) {
+            throw new IllegalStateException(e);
+        }
+    }
+
+    private Element element;
+
+    public DefaultConfiguration(String key) {
+        DocumentBuilder builder = null;
+        try {
+            builder = DBF.newDocumentBuilder();
+        } catch (ParserConfigurationException e) {
+            e.printStackTrace();
+            throw new IllegalStateException(e);
+        }
+        Document doc = builder.newDocument();
+        // create the root element node
+        element = doc.createElement(key);
+        doc.appendChild(element);
+    }
+
+    DefaultConfiguration(Element element) {
+        this.element = element;
+    }
+
+    Element getElement() {
+        return element;
+    }
+
+    public void addChild(DefaultConfiguration configuration) {
+        Element node = (Element) element.getOwnerDocument().importNode(configuration.getElement(), true);
+        element.appendChild(node);
+    }
+
+    String getValue0() {
+        String result = element.getTextContent();
+        if (result == null) {
+            result = "";
+        }
+        return result;
+    }
+
+    @Override
+    public Configuration getChild(String key) {
+        NodeList nl = element.getElementsByTagName(key);
+        for (int i = 0; i < nl.getLength(); ++i) {
+            Node n = nl.item(i);
+            if (n.getNodeName().equals(key)) {
+                return new DefaultConfiguration((Element) n);
+            }
+        }
+        return NullConfiguration.INSTANCE;
+    }
+
+    @Override
+    public Configuration getChild(String key, boolean required) {
+        Configuration result = getChild(key);
+        if (!required && result == NullConfiguration.INSTANCE) {
+            return null;
+        }
+        if (required && (result == null || result == NullConfiguration.INSTANCE)) {
+            // throw new IllegalStateException("No child '" + key + "'");
+            return NullConfiguration.INSTANCE;
+        }
+        return result;
+    }
+
+    @Override
+    public Configuration[] getChildren(String key) {
+        NodeList nl = element.getElementsByTagName(key);
+        Configuration[] result = new Configuration[nl.getLength()];
+        for (int i = 0; i < nl.getLength(); ++i) {
+            Node n = nl.item(i);
+            result[i] = new DefaultConfiguration((Element) n);
+        }
+        return result;
+    }
+
+    @Override
+    public String[] getAttributeNames() {
+        NamedNodeMap nnm = element.getAttributes();
+        String[] result = new String[nnm.getLength()];
+        for (int i = 0; i < nnm.getLength(); ++i) {
+            Node n = nnm.item(i);
+            result[i] = n.getNodeName();
+        }
+        return result;
+    }
+
+    @Override
+    public String getAttribute(String key) {
+        String result = element.getAttribute(key);
+        if ("".equals(result)) {
+            result = null;
+        }
+        return result;
+    }
+
+    @Override
+    public String getAttribute(String key, String defaultValue) {
+        String result = getAttribute(key);
+        if (result == null || "".equals(result)) {
+            result = defaultValue;
+        }
+        return result;
+    }
+
+    @Override
+    public boolean getAttributeAsBoolean(String key, boolean defaultValue) {
+        String result = getAttribute(key);
+        if (result == null || "".equals(result)) {
+            return defaultValue;
+        }
+        return "true".equalsIgnoreCase(result) || "yes".equalsIgnoreCase(result);
+    }
+
+    @Override
+    public float getAttributeAsFloat(String key) throws ConfigurationException {
+        return Float.parseFloat(getAttribute(key));
+    }
+
+    @Override
+    public float getAttributeAsFloat(String key, float defaultValue) {
+        String result = getAttribute(key);
+        if (result == null || "".equals(result)) {
+            return defaultValue;
+        }
+        return Float.parseFloat(result);
+    }
+
+    @Override
+    public int getAttributeAsInteger(String key, int defaultValue) {
+        String result = getAttribute(key);
+        if (result == null || "".equals(result)) {
+            return defaultValue;
+        }
+        return Integer.parseInt(result);
+    }
+
+    @Override
+    public String getValue() throws ConfigurationException {
+        String result = getValue0();
+        if (result == null || "".equals(result)) {
+            throw new ConfigurationException("No value in " + element.getNodeName());
+        }
+        return result;
+    }
+
+    @Override
+    public String getValue(String defaultValue) {
+        String result = getValue0();
+        if (result == null || "".equals(result)) {
+            result = defaultValue;
+        }
+        return result;
+    }
+
+    @Override
+    public boolean getValueAsBoolean() throws ConfigurationException {
+        return Boolean.parseBoolean(getValue0());
+    }
+
+    @Override
+    public boolean getValueAsBoolean(boolean defaultValue) {
+        String result = getValue0().trim();
+        if ("".equals(result)) {
+            return defaultValue;
+        }
+        return Boolean.parseBoolean(result);
+    }
+
+    @Override
+    public int getValueAsInteger() throws ConfigurationException {
+        try {
+            return Integer.parseInt(getValue0());
+        } catch (NumberFormatException e) {
+            throw new ConfigurationException("Not an integer", e);
+        }
+    }
+
+    @Override
+    public int getValueAsInteger(int defaultValue) {
+        String result = getValue0();
+        if (result == null || "".equals(result)) {
+            return defaultValue;
+        }
+        return Integer.parseInt(result);
+    }
+
+    @Override
+    public float getValueAsFloat() throws ConfigurationException {
+        try {
+            return Float.parseFloat(getValue0());
+        } catch (NumberFormatException e) {
+            throw new ConfigurationException("Not a float", e);
+        }
+    }
+
+    @Override
+    public float getValueAsFloat(float defaultValue) {
+        String result = getValue0();
+        if (result == null || "".equals(result)) {
+            return defaultValue;
+        }
+        return Float.parseFloat(getValue0());
+    }
+
+    @Override
+    public String getLocation() {
+        List<String> path = new ArrayList<String>();
+        for (Node el = element; el != null; el = el.getParentNode()) {
+            if (el instanceof Element) {
+                path.add(((Element) el).getTagName());
+            }
+        }
+        Collections.reverse(path);
+
+        StringBuilder sb = new StringBuilder();
+        for (String s : path) {
+            if (sb.length() > 0) {
+                sb.append("/");
+            }
+            sb.append(s);
+        }
+        return sb.toString();
+    }
+}
diff --git a/fop-core/src/main/java/org/apache/fop/configuration/DefaultConfigurationBuilder.java b/fop-core/src/main/java/org/apache/fop/configuration/DefaultConfigurationBuilder.java
new file mode 100644 (file)
index 0000000..5abf8f4
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* $Id: Accessibility.java 1343632 2012-05-29 09:48:03Z vhennebert $ */
+package org.apache.fop.configuration;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.w3c.dom.DOMException;
+import org.w3c.dom.Document;
+import org.xml.sax.SAXException;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class DefaultConfigurationBuilder {
+
+    private static final Log LOG = LogFactory.getLog(DefaultConfigurationBuilder.class.getName());
+
+    public DefaultConfiguration build(InputStream confStream) throws ConfigurationException {
+        try {
+            DocumentBuilder builder = DefaultConfiguration.DBF.newDocumentBuilder();
+            Document document = builder.parse(confStream);
+            return new DefaultConfiguration(document.getDocumentElement());
+        } catch (DOMException e) {
+            throw new ConfigurationException("xml parse error", e);
+        } catch (ParserConfigurationException e) {
+            throw new ConfigurationException("xml parse error", e);
+        } catch (IOException e) {
+            throw new ConfigurationException("xml parse error", e);
+        } catch (SAXException e) {
+            throw new ConfigurationException("xml parse error", e);
+        } finally {
+            try {
+                confStream.close();
+            } catch (IOException e) {
+                throw new IllegalStateException(e);
+            }
+        }
+    }
+
+    public DefaultConfiguration buildFromFile(File file) throws ConfigurationException {
+        try {
+            DocumentBuilder builder = DefaultConfiguration.DBF.newDocumentBuilder();
+            Document document = builder.parse(file);
+            return new DefaultConfiguration(document.getDocumentElement());
+        } catch (DOMException e) {
+            throw new ConfigurationException("xml parse error", e);
+        } catch (ParserConfigurationException e) {
+            throw new ConfigurationException("xml parse error", e);
+        } catch (IOException e) {
+            throw new ConfigurationException("xml parse error", e);
+        } catch (SAXException e) {
+            throw new ConfigurationException("xml parse error", e);
+        }
+    }
+}
diff --git a/fop-core/src/main/java/org/apache/fop/configuration/NullConfiguration.java b/fop-core/src/main/java/org/apache/fop/configuration/NullConfiguration.java
new file mode 100644 (file)
index 0000000..a15ed9e
--- /dev/null
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* $Id: Accessibility.java 1343632 2012-05-29 09:48:03Z vhennebert $ */
+package org.apache.fop.configuration;
+
+final class NullConfiguration implements Configuration {
+
+    static final NullConfiguration INSTANCE = new NullConfiguration();
+
+    private NullConfiguration() {
+
+    }
+
+    @Override
+    public Configuration getChild(String key) {
+        return INSTANCE;
+    }
+
+    @Override
+    public Configuration getChild(String key, boolean required) {
+        return INSTANCE;
+    }
+
+    @Override
+    public Configuration[] getChildren(String key) {
+        return new Configuration[0];
+    }
+
+    @Override
+    public String[] getAttributeNames() {
+        return new String[0];
+    }
+
+    @Override
+    public String getAttribute(String key) throws ConfigurationException {
+        return "";
+    }
+
+    @Override
+    public String getAttribute(String key, String defaultValue) {
+        return defaultValue;
+    }
+
+    @Override
+    public boolean getAttributeAsBoolean(String key, boolean defaultValue) {
+        return defaultValue;
+    }
+
+    @Override
+    public float getAttributeAsFloat(String key) throws ConfigurationException {
+        return 0;
+    }
+
+    @Override
+    public float getAttributeAsFloat(String key, float defaultValue) {
+        return defaultValue;
+    }
+
+    @Override
+    public int getAttributeAsInteger(String key, int defaultValue) {
+        return defaultValue;
+    }
+
+    @Override
+    public String getValue() throws ConfigurationException {
+        // return null;
+        throw new ConfigurationException("missing value");
+    }
+
+    @Override
+    public String getValue(String defaultValue) {
+        return defaultValue;
+    }
+
+    @Override
+    public boolean getValueAsBoolean() throws ConfigurationException {
+        return false;
+    }
+
+    @Override
+    public boolean getValueAsBoolean(boolean defaultValue) {
+        return defaultValue;
+    }
+
+    @Override
+    public int getValueAsInteger() throws ConfigurationException {
+        return 0;
+    }
+
+    @Override
+    public int getValueAsInteger(int defaultValue) {
+        return defaultValue;
+    }
+
+    @Override
+    public float getValueAsFloat() throws ConfigurationException {
+        return 0;
+    }
+
+    @Override
+    public float getValueAsFloat(float defaultValue) {
+        return defaultValue;
+    }
+
+    @Override
+    public String getLocation() {
+        return "<no-location>";
+    }
+}
index af162ee35e63e1dfc0d93f7acec39a68ff99364d..a1663756c6afa7527375d83a5505953089ab28b8 100644 (file)
@@ -23,12 +23,12 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
 import org.apache.fop.apps.FOPException;
+import org.apache.fop.configuration.Configuration;
+import org.apache.fop.configuration.ConfigurationException;
 import org.apache.fop.events.EventProducer;
 import org.apache.fop.util.LogUtil;
 
index 167baf09eacfc8cc59e26ed1350413afc2f14662..db4b724c2fe2f2749ce62a6a4225176fac892ee9 100644 (file)
@@ -19,9 +19,8 @@
 
 package org.apache.fop.fonts;
 
-import org.apache.avalon.framework.configuration.Configuration;
-
 import org.apache.fop.apps.FOPException;
+import org.apache.fop.configuration.Configuration;
 import org.apache.fop.events.EventProducer;
 
 /**
@@ -45,6 +44,6 @@ public interface FontConfig {
          * @throws FOPException if an error occurs creating the font configuration object
          */
         FontConfig parse(Configuration cfg, FontManager fontManager, boolean strict,
-                EventProducer eventProducer) throws FOPException;
+                         EventProducer eventProducer) throws FOPException;
     }
 }
index 01502c5c2285bf1e59bf1ab7397b3decc8d599d2..dbe430ad431b63b166038e40242a7f06d69b3f4d 100644 (file)
@@ -24,8 +24,6 @@ import java.net.URISyntaxException;
 import java.util.List;
 import java.util.regex.Pattern;
 
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -34,6 +32,8 @@ import org.apache.xmlgraphics.io.ResourceResolver;
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.io.InternalResourceResolver;
 import org.apache.fop.apps.io.ResourceResolverFactory;
+import org.apache.fop.configuration.Configuration;
+import org.apache.fop.configuration.ConfigurationException;
 import org.apache.fop.fonts.substitute.FontSubstitutions;
 import org.apache.fop.fonts.substitute.FontSubstitutionsConfigurator;
 import org.apache.fop.util.LogUtil;
index 885a4d2a1549833e883433087573577792e7b3a2..2c38c3f63bb4e34c23dcdb6a4fe28dc18bf4ce5e 100644 (file)
@@ -19,9 +19,8 @@
 
 package org.apache.fop.fonts.substitute;
 
-import org.apache.avalon.framework.configuration.Configuration;
-
 import org.apache.fop.apps.FOPException;
+import org.apache.fop.configuration.Configuration;
 
 /**
  * Configures a font substitution catalog
index 4b3b63a51de88bcb8241e413d3bddabe2f2acc7a..d629a27169a6fb5080ab47e9c0738126b91b46f1 100644 (file)
 
 package org.apache.fop.render;
 
-import org.apache.avalon.framework.configuration.Configuration;
-
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.configuration.Configuration;
 import org.apache.fop.fonts.FontConfig;
 
 /**
index 5b670d07a8d91d839859c2fff8048c3a143b6244..632932d741e28d2be2c0b830e4c64310e0db594f 100644 (file)
@@ -26,4 +26,6 @@ package org.apache.fop.render;
 public interface RendererConfigOption {
     /** The name of the option. */
     String getName();
+
+    Object getDefaultValue();
 }
index ac50da273ec5d47127e5e23945a51c84d2df3bc8..6c594b9a27aa302f3894ff9ffa70156341ad1cd1 100644 (file)
 
 package org.apache.fop.render;
 
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.configuration.Configuration;
+import org.apache.fop.configuration.ConfigurationException;
 
 /**
  * Configurator for XMLHandler objects.
index 1ebc4b83ed9e336bb0d4483a556c32a311a58d3d..f6a0a2a7500a00ec93425bdc1f8bb760b079c24b 100644 (file)
@@ -27,8 +27,6 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -44,6 +42,8 @@ import org.apache.fop.afp.fonts.RasterFont;
 import org.apache.fop.afp.util.AFPResourceAccessor;
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.io.InternalResourceResolver;
+import org.apache.fop.configuration.Configuration;
+import org.apache.fop.configuration.ConfigurationException;
 import org.apache.fop.events.EventProducer;
 import org.apache.fop.fonts.EmbedFontInfo;
 import org.apache.fop.fonts.FontConfig;
@@ -85,7 +85,7 @@ public final class AFPFontConfig implements FontConfig {
 
         /** {@inheritDoc}} */
         public AFPFontConfig parse(Configuration cfg, FontManager fontManager, boolean strict,
-                EventProducer eventProducer) throws FOPException {
+                                   EventProducer eventProducer) throws FOPException {
             try {
                 return new ParserHelper(cfg, fontManager, strict,
                         (AFPEventProducer) eventProducer).fontConfig;
index 647a8a7c00ae2f1e75b25ec180ad26a152c481f0..b20d12895003a82234a5f7b8ac67ec362e438bc9 100644 (file)
 
 package org.apache.fop.render.afp;
 
-import org.apache.avalon.framework.configuration.Configuration;
-
 import org.apache.fop.afp.AFPGraphics2D;
 import org.apache.fop.afp.AFPPaintingState;
 import org.apache.fop.afp.AFPResourceInfo;
 import org.apache.fop.afp.AFPResourceManager;
+import org.apache.fop.configuration.Configuration;
 import org.apache.fop.fonts.FontInfo;
 
 /**
index 062933df6bdda5892471a07d628b187de8d35c4d..d6b81e676eb8bad573cee004993b270756315541 100644 (file)
@@ -23,8 +23,6 @@ import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.EnumMap;
 
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -38,6 +36,8 @@ import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.MimeConstants;
 import org.apache.fop.apps.io.InternalResourceResolver;
+import org.apache.fop.configuration.Configuration;
+import org.apache.fop.configuration.ConfigurationException;
 import org.apache.fop.fonts.FontManager;
 import org.apache.fop.render.RendererConfig;
 import org.apache.fop.render.afp.AFPFontConfig.AFPFontInfoConfigParser;
index c056668631ac4acb421139ad6be685688eae166b..c5a44ff619e7c292a8e708b1d53c4b6ac64dc41d 100644 (file)
@@ -21,12 +21,11 @@ package org.apache.fop.render.afp;
 
 import java.util.Map;
 
-import org.apache.avalon.framework.configuration.Configuration;
-
 import org.apache.fop.afp.AFPPaintingState;
 import org.apache.fop.afp.AFPResourceInfo;
 import org.apache.fop.afp.AFPResourceManager;
 import org.apache.fop.afp.modca.ResourceObject;
+import org.apache.fop.configuration.Configuration;
 import org.apache.fop.render.AbstractRenderer;
 import org.apache.fop.render.ImageHandlerUtil;
 import org.apache.fop.render.RendererContext;
@@ -58,7 +57,7 @@ public class AFPRendererContext extends RendererContext {
         info.setHeight((Integer) getProperty(RendererContextConstants.HEIGHT));
         info.setX((Integer) getProperty(RendererContextConstants.XPOS));
         info.setY((Integer) getProperty(RendererContextConstants.YPOS));
-        info.setHandlerConfiguration((Configuration)getProperty(
+        info.setHandlerConfiguration((Configuration) getProperty(
                 RendererContextConstants.HANDLER_CONFIGURATION));
         info.setFontInfo((org.apache.fop.fonts.FontInfo)getProperty(
                 AFPRendererContextConstants.AFP_FONT_INFO));
index d573570d0b578732c534302f7fd7525bbd3191d6..33e4da11c4464b1debf09f8c54eec0b004ce1214 100644 (file)
@@ -61,4 +61,9 @@ public enum AFPRendererOption implements RendererConfigOption {
     public Class<?> getType() {
         return type;
     }
+
+    @Override
+    public Object getDefaultValue() {
+        return null;
+    }
 }
index 7e963148af109599bb8870a6fd0c24d4b7ba3cd1..e634b9b13b63111e905a9fb2184db484675a7317 100644 (file)
@@ -49,7 +49,7 @@ public enum AFPShadingMode {
      * @return the enumeration object
      */
     public static AFPShadingMode getValueOf(String name) {
-        if (COLOR.getName().equalsIgnoreCase(name)) {
+        if (name == null || "".equals(name) || COLOR.getName().equalsIgnoreCase(name)) {
             return COLOR;
         } else if (DITHERED.getName().equalsIgnoreCase(name)) {
             return DITHERED;
index 551827fefeeffb1321caff30141544ce464e6f1a..99bc14960f10c5c39314adda48a7aa55b48b7b86 100644 (file)
@@ -23,10 +23,9 @@ import java.awt.Color;
 import java.awt.image.BufferedImage;
 import java.util.EnumMap;
 
-import org.apache.avalon.framework.configuration.Configuration;
-
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.configuration.Configuration;
 import org.apache.fop.fonts.DefaultFontConfig;
 import org.apache.fop.fonts.DefaultFontConfig.DefaultFontConfigParser;
 import org.apache.fop.fonts.FontEventAdapter;
@@ -170,7 +169,18 @@ public class BitmapRendererConfig implements RendererConfig {
         }
 
         private String getValue(Configuration cfg, BitmapRendererOption option) {
-            return cfg.getChild(option.getName()).getValue(null);
+            Object defaultValue = option.getDefaultValue();
+            Object result = cfg.getChild(option.getName()).getValue(null);
+            if (result == null || "".equals(result)) {
+                result = defaultValue;
+            }
+            if (result == null) {
+                return null;
+            }
+            if (result instanceof Color) {
+                return ColorUtil.colorToString((Color) result);
+            }
+            return result.toString();
         }
 
         public String getMimeType() {
index 26553bc69f9d70e5c46a912d4428b8ca827efe48..8e98ddd2529300171cd59840e8351709e50fb537 100644 (file)
 
 package org.apache.fop.render.bitmap;
 
-import org.apache.avalon.framework.configuration.Configuration;
-
 import org.apache.xmlgraphics.util.MimeConstants;
 
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.configuration.Configuration;
 import org.apache.fop.fonts.DefaultFontConfig;
 import org.apache.fop.fonts.DefaultFontConfig.DefaultFontConfigParser;
 import org.apache.fop.fonts.FontEventAdapter;
index c8d71ba17a368558133ded1d8787df5650cd27a9..c339e02d1998c4e2dde976e486ac7b0d117f0387 100644 (file)
@@ -21,13 +21,12 @@ package org.apache.fop.render.bitmap;
 
 import java.util.EnumMap;
 
-import org.apache.avalon.framework.configuration.Configuration;
-
 import org.apache.xmlgraphics.image.writer.Endianness;
 
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.MimeConstants;
+import org.apache.fop.configuration.Configuration;
 import org.apache.fop.fonts.DefaultFontConfig;
 import org.apache.fop.fonts.DefaultFontConfig.DefaultFontConfigParser;
 import org.apache.fop.fonts.FontEventAdapter;
index 7fc7be0632ead6314392211955a03c328a651f84..f972dcb05fa0c5807265abd483be5e7d75e7daa4 100644 (file)
 
 package org.apache.fop.render.intermediate;
 
-import org.apache.avalon.framework.configuration.Configuration;
-
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.configuration.Configuration;
 import org.apache.fop.fonts.DefaultFontConfig;
 import org.apache.fop.fonts.DefaultFontConfig.DefaultFontConfigParser;
 import org.apache.fop.fonts.FontConfig;
index 141b61bf94b972ae71bd1d405fed2b7a88b8afc7..14d31e1c8f78a3d59ed460db41f893ab7ab3013d 100644 (file)
@@ -21,10 +21,9 @@ package org.apache.fop.render.java2d;
 
 import java.util.EnumMap;
 
-import org.apache.avalon.framework.configuration.Configuration;
-
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.configuration.Configuration;
 import org.apache.fop.fonts.DefaultFontConfig;
 import org.apache.fop.fonts.DefaultFontConfig.DefaultFontConfigParser;
 import org.apache.fop.fonts.FontEventAdapter;
index b25f05889025b08fb8040fc4135d00c86ff76714..8b6ca99a091a0552c5f0921623fb968f59e0e10a 100644 (file)
@@ -34,4 +34,9 @@ public enum Java2DRendererOption implements RendererConfigOption {
     public String getName() {
         return name;
     }
+
+    @Override
+    public Object getDefaultValue() {
+        return null;
+    }
 }
index 7a0a4a77e0d5c234f9d19b0bbb7a9f99289b56f7..58e778f21313b385191541fddda2b0f8227fa4ee 100644 (file)
@@ -25,19 +25,25 @@ import org.apache.fop.render.RendererConfigOption;
  */
 public enum Java2DRendererOption implements RendererConfigOption {
 
-    RENDERING_MODE("rendering", PCLRenderingMode.class),
-    TEXT_RENDERING("text-rendering", Boolean.class),
-    DISABLE_PJL("disable-pjl", Boolean.class),
-    OPTIMIZE_RESOURCES("optimize-resources", Boolean.class),
-    MODE_COLOR("color", Boolean.class);
+    RENDERING_MODE("rendering", PCLRenderingMode.class, PCLRenderingMode.QUALITY),
+    TEXT_RENDERING("text-rendering", Boolean.class, Boolean.FALSE),
+    DISABLE_PJL("disable-pjl", Boolean.class, Boolean.FALSE),
+    OPTIMIZE_RESOURCES("optimize-resources", Boolean.class, Boolean.FALSE),
+    MODE_COLOR("color", Boolean.class, Boolean.FALSE);
 
     private final String name;
 
     private final Class<?> type;
 
-    private Java2DRendererOption(String name, Class<?> type) {
+    private final Object defaultValue;
+
+    private Java2DRendererOption(String name, Class<?> type, Object defaultValue) {
         this.name = name;
         this.type = type;
+        this.defaultValue = defaultValue;
+        if (defaultValue != null && !(type.isAssignableFrom(defaultValue.getClass()))) {
+            throw new IllegalArgumentException("default value " + defaultValue + " is not of type " + type);
+        }
     }
 
     /** {@inheritDoc} */
@@ -48,4 +54,9 @@ public enum Java2DRendererOption implements RendererConfigOption {
     Class<?> getType() {
         return type;
     }
+
+    @Override
+    public Object getDefaultValue() {
+        return defaultValue;
+    }
 }
index 06aebba715dca10cb4212f5f885c907b267a956f..1a1c3727e0bbb5be9ab83d2d413631ed6ad2247f 100644 (file)
@@ -22,11 +22,10 @@ package org.apache.fop.render.pcl;
 import java.util.EnumMap;
 import java.util.Map;
 
-import org.apache.avalon.framework.configuration.Configuration;
-
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.MimeConstants;
+import org.apache.fop.configuration.Configuration;
 import org.apache.fop.fonts.DefaultFontConfig;
 import org.apache.fop.fonts.DefaultFontConfig.DefaultFontConfigParser;
 import org.apache.fop.fonts.FontEventAdapter;
index 84ac45f4008160019209406321c8e0952786cfec..851189cd766e30348b0b3a7744abb5efc3653c92 100644 (file)
@@ -25,15 +25,14 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.MimeConstants;
+import org.apache.fop.configuration.Configuration;
+import org.apache.fop.configuration.ConfigurationException;
 import org.apache.fop.fonts.DefaultFontConfig;
 import org.apache.fop.fonts.DefaultFontConfig.DefaultFontConfigParser;
 import org.apache.fop.fonts.FontEventAdapter;
@@ -217,7 +216,12 @@ public final class PDFRendererConfig implements RendererConfig {
 
         private String parseConfig(Configuration cfg, RendererConfigOption option) {
             Configuration child = cfg.getChild(option.getName());
-            return child.getValue(null);
+            String value = child.getValue(null);
+            if (value == null || "".equals(value)) {
+                Object v = option.getDefaultValue();
+                return v == null ? null : v.toString();
+            }
+            return value;
         }
 
         private boolean doesValueExist(Configuration cfg, RendererConfigOption option) {
index 70a1ad8001651878c28d151da210b1f267c2fe21..467a1f180df062a6a63b1c90987bc121cbecf420 100644 (file)
@@ -22,10 +22,10 @@ package org.apache.fop.render.pdf;
 import java.io.OutputStream;
 import java.util.Map;
 
-import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+import org.apache.fop.configuration.Configuration;
 import org.apache.fop.fonts.FontInfo;
 import org.apache.fop.pdf.PDFDocument;
 import org.apache.fop.pdf.PDFPage;
index 4df5e6bad06a29a61a0824ca00de0c52dc816725..c0d28ff960c155298577c1b0c2a137e9c9a7e039 100644 (file)
@@ -22,14 +22,14 @@ package org.apache.fop.render.ps;
 import java.util.EnumMap;
 import java.util.Locale;
 
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.MimeConstants;
+import org.apache.fop.configuration.Configuration;
+import org.apache.fop.configuration.ConfigurationException;
 import org.apache.fop.fonts.DefaultFontConfig;
 import org.apache.fop.fonts.DefaultFontConfig.DefaultFontConfigParser;
 import org.apache.fop.fonts.FontEventAdapter;
index ad8af8a49a5713f781d7d9f6722a62dc4ed60f8f..3cb58049ecfaa9a9a605c4fc3803cbd4ac987e83 100644 (file)
@@ -26,8 +26,6 @@ import java.util.Map;
 
 import org.w3c.dom.Document;
 
-import org.apache.avalon.framework.configuration.Configuration;
-
 import org.apache.batik.bridge.BridgeContext;
 import org.apache.batik.bridge.GVTBuilder;
 import org.apache.batik.gvt.GraphicsNode;
@@ -35,6 +33,7 @@ import org.apache.batik.gvt.GraphicsNode;
 import org.apache.xmlgraphics.java2d.ps.PSGraphics2D;
 import org.apache.xmlgraphics.ps.PSGenerator;
 
+import org.apache.fop.configuration.Configuration;
 import org.apache.fop.fonts.FontInfo;
 import org.apache.fop.image.loader.batik.BatikUtil;
 import org.apache.fop.render.AbstractGenericSVGHandler;
index bd6f07c4ae1a5394c77ffb85b339e136764654a2..76128d42bf4af9fbebe909441c6c8aa71d0e4cb4 100644 (file)
@@ -21,11 +21,10 @@ package org.apache.fop.render.txt;
 
 import java.util.EnumMap;
 
-import org.apache.avalon.framework.configuration.Configuration;
-
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.MimeConstants;
+import org.apache.fop.configuration.Configuration;
 import org.apache.fop.fonts.DefaultFontConfig;
 import org.apache.fop.fonts.DefaultFontConfig.DefaultFontConfigParser;
 import org.apache.fop.fonts.FontEventAdapter;
index debd55c1eb8a917f2f6a3bcefe82b42eb0ecef27..0b3e6985f5b46469187e0b9183a6e099515384a1 100644 (file)
@@ -28,10 +28,6 @@ import javax.xml.transform.stream.StreamSource;
 import org.w3c.dom.DOMImplementation;
 import org.xml.sax.EntityResolver;
 
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.configuration.DefaultConfiguration;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.impl.SimpleLog;
 
@@ -55,6 +51,10 @@ import org.apache.xmlgraphics.image.loader.ImageSessionContext;
 import org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext;
 import org.apache.xmlgraphics.util.UnitConv;
 
+import org.apache.fop.configuration.Configurable;
+import org.apache.fop.configuration.Configuration;
+import org.apache.fop.configuration.ConfigurationException;
+import org.apache.fop.configuration.DefaultConfiguration;
 import org.apache.fop.svg.font.FOPFontFamilyResolver;
 
 /**
index a8e9307a7b70292e56fd66c3847b347be9f65a75..1ecca82c7718fd911ca0df04e636ce31b86ebbc4 100644 (file)
@@ -23,12 +23,11 @@ import java.io.File;
 import java.net.URI;
 import java.util.List;
 
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.io.InternalResourceResolver;
 import org.apache.fop.apps.io.ResourceResolverFactory;
+import org.apache.fop.configuration.Configuration;
+import org.apache.fop.configuration.ConfigurationException;
 import org.apache.fop.fonts.DefaultFontConfig;
 import org.apache.fop.fonts.DefaultFontConfigurator;
 import org.apache.fop.fonts.EmbedFontInfo;
index 1481f702898c6f768a9ca4ef4a9e16877f05b090..ee8e64dcddff95970001fdbd877a1b3cf582c17e 100644 (file)
@@ -27,8 +27,6 @@ import java.io.OutputStream;
 import org.w3c.dom.Document;
 import org.w3c.dom.svg.SVGLength;
 
-import org.apache.avalon.framework.configuration.Configuration;
-
 import org.apache.batik.bridge.BridgeContext;
 import org.apache.batik.bridge.UnitProcessor;
 import org.apache.batik.ext.awt.RenderingHintsKeyExt;
@@ -37,6 +35,7 @@ import org.apache.batik.transcoder.TranscoderOutput;
 import org.apache.batik.transcoder.image.ImageTranscoder;
 
 import org.apache.fop.Version;
+import org.apache.fop.configuration.Configuration;
 import org.apache.fop.fonts.FontInfo;
 import org.apache.fop.svg.font.FOPFontFamilyResolverImpl;
 
index e4c9ceb44f47a283a502e1f6dc310a5accda0792..555f73226b1e93999673c75e376832ca65c39201 100644 (file)
@@ -22,10 +22,9 @@ package org.apache.fop.apps;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
-
 import org.apache.fop.apps.FopConfBuilder.RendererConfBuilder;
+import org.apache.fop.configuration.Configuration;
+import org.apache.fop.configuration.DefaultConfigurationBuilder;
 import org.apache.fop.events.DefaultEventBroadcaster;
 import org.apache.fop.fonts.FontManager;
 import org.apache.fop.render.RendererConfig;
index 2487c0a6378290707d76919f06ef085d16640d7f..b0dbf440cd0e72d12bfb29eb688a573e5d61cc80 100644 (file)
@@ -27,9 +27,8 @@ import org.xml.sax.SAXException;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
-import org.apache.avalon.framework.configuration.ConfigurationException;
-
 import org.apache.fop.apps.FopConfBuilder.RendererConfBuilder;
+import org.apache.fop.configuration.ConfigurationException;
 import org.apache.fop.render.PrintRendererConfigurator;
 import org.apache.fop.render.intermediate.IFDocumentHandler;
 
index a27a318cbc896cdc88f2e6bfb30ba41ea106ad37..201408235a98b90ebf00d4ffeed78ab2d50c18fb 100644 (file)
@@ -21,13 +21,12 @@ import java.net.URI;
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.avalon.framework.configuration.Configuration;
-
 import org.apache.xmlgraphics.image.loader.ImageManager;
 import org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext.FallbackResolver;
 import org.apache.xmlgraphics.io.ResourceResolver;
 
 import org.apache.fop.apps.io.InternalResourceResolver;
+import org.apache.fop.configuration.Configuration;
 import org.apache.fop.fonts.FontManager;
 import org.apache.fop.layoutmgr.LayoutManagerMaker;
 
index 1af57d985f1be28a1cd158d0d2b7b745ba537a45..90616c526b99864e86188511c03ca14918d2f8e0 100644 (file)
@@ -25,11 +25,11 @@ import java.io.InputStream;
 
 import org.xml.sax.SAXException;
 
-import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
 import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.configuration.DefaultConfigurationBuilder;
 import org.apache.fop.render.pdf.BasePDFTest;
 
 import static org.apache.fop.FOPTestUtils.getBaseDir;
index 5074d6b7082c817417eeb70e914916641fdc4de7..8a8bbf79ad0d414f8c5ae222468a9f26b50c0ed4 100644 (file)
@@ -19,7 +19,7 @@
 
 package org.apache.fop.threading;
 
-import org.apache.avalon.framework.logger.Logger;
+import org.apache.commons.logging.Log;
 
 import org.apache.fop.events.Event;
 import org.apache.fop.events.EventFormatter;
@@ -31,10 +31,10 @@ import org.apache.fop.events.model.EventSeverity;
  */
 class AvalonAdapter implements EventListener {
 
-    private final Logger logger;
+    private final Log logger;
     private String filename;
 
-    public AvalonAdapter(Logger logger, String filename) {
+    public AvalonAdapter(Log logger, String filename) {
         this.logger = logger;
         this.filename = filename;
     }
@@ -49,7 +49,7 @@ class AvalonAdapter implements EventListener {
         } else if (severity == EventSeverity.ERROR) {
             logger.error(filename + ": "  + msg);
         } else if (severity == EventSeverity.FATAL) {
-            logger.fatalError(filename + ": "  + msg);
+            logger.fatal(filename + ": "  + msg);
         } else {
             assert false;
         }
index b2d2ecb953e88ac6e557202d21c937bbff9b337c..7f6319ba8dc579dc939dec8266d4619764d5c707 100644 (file)
@@ -31,25 +31,27 @@ import javax.xml.transform.TransformerConfigurationException;
 import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.stream.StreamSource;
 
-import org.apache.avalon.framework.CascadingRuntimeException;
-import org.apache.avalon.framework.activity.Executable;
-import org.apache.avalon.framework.activity.Initializable;
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.container.ContainerUtil;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.io.output.CountingOutputStream;
 import org.apache.commons.io.output.NullOutputStream;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.apache.fop.activity.ContainerUtil;
+import org.apache.fop.activity.Initializable;
+import org.apache.fop.configuration.Configurable;
+import org.apache.fop.configuration.Configuration;
+import org.apache.fop.configuration.ConfigurationException;
 
 /**
  * Testbed for multi-threading tests. The class can run a configurable set of task a number of
  * times in a configurable number of threads to easily reproduce multi-threading issues.
  */
-public class FOPTestbed extends AbstractLogEnabled
+public class FOPTestbed
             implements Configurable, Initializable {
 
+    private static final Log LOG = LogFactory.getLog(FOPTestbed.class);
+
     private int repeat;
     private List taskList = new java.util.ArrayList();
     private int threads;
@@ -85,7 +87,7 @@ public class FOPTestbed extends AbstractLogEnabled
      * Starts the stress test.
      */
     public void doStressTest() {
-        getLogger().info("Starting stress test...");
+        LOG.info("Starting stress test...");
         long start = System.currentTimeMillis();
         this.counter = 0;
 
@@ -94,7 +96,7 @@ public class FOPTestbed extends AbstractLogEnabled
         List threadList = new java.util.LinkedList();
         for (int ti = 0; ti < this.threads; ti++) {
             TaskRunner runner = new TaskRunner();
-            ContainerUtil.enableLogging(runner, getLogger());
+            // ContainerUtil.enableLogging(runner, logger);
             Thread thread = new Thread(workerGroup, runner, "Worker- " + ti);
             threadList.add(thread);
         }
@@ -150,7 +152,7 @@ public class FOPTestbed extends AbstractLogEnabled
         }
     }
 
-    private class TaskRunner extends AbstractLogEnabled implements Runnable {
+    private class TaskRunner implements Runnable {
 
         public void run() {
             try {
@@ -158,12 +160,12 @@ public class FOPTestbed extends AbstractLogEnabled
                     for (Object aTaskList : taskList) {
                         TaskDef def = (TaskDef) aTaskList;
                         final Task task = new Task(def, counter++, foprocessor);
-                        ContainerUtil.enableLogging(task, getLogger());
+                        // ContainerUtil.enableLogging(task, logger);
                         task.execute();
                     }
                 }
             } catch (Exception e) {
-                getLogger().error("Thread ended with an exception", e);
+                LOG.error("Thread ended with an exception", e);
             }
         }
 
@@ -178,12 +180,12 @@ public class FOPTestbed extends AbstractLogEnabled
             Class clazz = Class.forName(this.fopCfg.getAttribute("class",
                     "org.apache.fop.threading.FOProcessorImpl"));
             Processor fop = (Processor)clazz.getDeclaredConstructor().newInstance();
-            ContainerUtil.enableLogging(fop, getLogger());
+            // ContainerUtil.enableLogging(fop, logger);
             ContainerUtil.configure(fop, this.fopCfg);
             ContainerUtil.initialize(fop);
             return fop;
         } catch (Exception e) {
-            throw new CascadingRuntimeException("Error creating FO Processor", e);
+            throw new RuntimeException("Error creating FO Processor", e);
         }
     }
 
@@ -243,7 +245,7 @@ public class FOPTestbed extends AbstractLogEnabled
     }
 
 
-    private class Task extends AbstractLogEnabled implements Executable {
+    private class Task {
 
         private TaskDef def;
         private int num;
@@ -257,7 +259,7 @@ public class FOPTestbed extends AbstractLogEnabled
 
 
         public void execute() throws Exception {
-            getLogger().info("Processing: " + def);
+            LOG.info("Processing: " + def);
             long start = System.currentTimeMillis();
             try {
                 DecimalFormat df = new DecimalFormat("00000");
index 721830aee172fadf2c78ffd6f108623aef4bea16..b784b5c03992a8f58092843dede68b070538b67f 100644 (file)
@@ -36,25 +36,29 @@ import javax.xml.transform.sax.SAXResult;
 
 import org.xml.sax.SAXException;
 
-import org.apache.avalon.framework.activity.Initializable;
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.commons.io.FilenameUtils;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.apache.fop.activity.Initializable;
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.Fop;
 import org.apache.fop.apps.FopFactory;
 import org.apache.fop.apps.MimeConstants;
+import org.apache.fop.configuration.Configurable;
+import org.apache.fop.configuration.Configuration;
+import org.apache.fop.configuration.ConfigurationException;
 
 /**
  * Default implementation of the {@link Processor} interface using FOP.
  */
-public class FOProcessorImpl extends AbstractLogEnabled
+public class FOProcessorImpl
             implements Processor, Configurable, Initializable {
 
+    private static final Log LOG = LogFactory.getLog(FOProcessorImpl.class);
+
     private FopFactory fopFactory;
     private TransformerFactory factory = TransformerFactory.newInstance();
     private URI userconfig;
@@ -74,7 +78,7 @@ public class FOProcessorImpl extends AbstractLogEnabled
 
     public void initialize() throws Exception {
         if (this.userconfig != null) {
-            getLogger().debug("Setting user config: " + userconfig);
+            LOG.debug("Setting user config: " + userconfig);
             fopFactory = FopFactory.newInstance(new File(userconfig));
         } else {
             fopFactory = FopFactory.newInstance(new File(".").toURI());
@@ -92,7 +96,7 @@ public class FOProcessorImpl extends AbstractLogEnabled
             URL url = new URL(src.getSystemId());
             String filename = FilenameUtils.getName(url.getPath());
             foUserAgent.getEventBroadcaster().addEventListener(
-                    new AvalonAdapter(getLogger(), filename));
+                    new AvalonAdapter(LOG, filename));
         } catch (MalformedURLException mfue) {
             throw new RuntimeException(mfue);
         }
index 0dc87fa50c6a43fc1678b8be368c156acc202001..ed50e0521411cf4d453fdc69d869713ebbd1ecba 100644 (file)
@@ -35,17 +35,19 @@ import javax.xml.transform.stream.StreamResult;
 
 import org.xml.sax.ContentHandler;
 
-import org.apache.avalon.framework.activity.Initializable;
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.commons.io.FilenameUtils;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.apache.fop.activity.Initializable;
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.FopFactory;
 import org.apache.fop.apps.MimeConstants;
+import org.apache.fop.configuration.Configurable;
+import org.apache.fop.configuration.Configuration;
+import org.apache.fop.configuration.ConfigurationException;
 import org.apache.fop.render.intermediate.IFDocumentHandler;
 import org.apache.fop.render.intermediate.IFException;
 import org.apache.fop.render.intermediate.IFParser;
@@ -54,9 +56,12 @@ import org.apache.fop.render.intermediate.IFUtil;
 /**
  * Implementation of the {@link Processor} interface that renders IF XML to a final output format.
  */
-public class IFProcessorImpl extends AbstractLogEnabled
+public class IFProcessorImpl
             implements Processor, Configurable, Initializable {
 
+    private static final Log LOGGER = LogFactory.getLog(IFProcessorImpl.class);
+
+
     private FopFactory fopFactory;
     private TransformerFactory factory = TransformerFactory.newInstance();
     private String userconfig;
@@ -73,7 +78,7 @@ public class IFProcessorImpl extends AbstractLogEnabled
     /** {@inheritDoc} */
     public void initialize() throws Exception {
         if (this.userconfig != null) {
-            getLogger().debug("Setting user config: " + userconfig);
+            LOGGER.debug("Setting user config: " + userconfig);
             fopFactory = FopFactory.newInstance(new File(this.userconfig));
         } else {
             fopFactory = FopFactory.newInstance(new File(".").toURI());
@@ -89,7 +94,7 @@ public class IFProcessorImpl extends AbstractLogEnabled
             URL url = new URL(src.getSystemId());
             String filename = FilenameUtils.getName(url.getPath());
             foUserAgent.getEventBroadcaster().addEventListener(
-                    new AvalonAdapter(getLogger(), filename));
+                    new AvalonAdapter(LOGGER, filename));
         } catch (MalformedURLException mfue) {
             throw new RuntimeException(mfue);
         }
index d18ae405a8a166083b5ad815806c6dd490f78742..32812d078a4dabd1d9ef4d7805109a7dc62e6f9d 100644 (file)
@@ -23,11 +23,9 @@ import java.io.BufferedReader;
 import java.io.File;
 import java.io.IOException;
 
-import org.apache.avalon.framework.ExceptionUtil;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
-import org.apache.avalon.framework.container.ContainerUtil;
-import org.apache.avalon.framework.logger.ConsoleLogger;
+import org.apache.fop.activity.ContainerUtil;
+import org.apache.fop.configuration.Configuration;
+import org.apache.fop.configuration.DefaultConfigurationBuilder;
 
 /**
  * Starter class for the multi-threading testbed.
@@ -61,7 +59,7 @@ public final class Main {
 
             //Setup testbed
             FOPTestbed testbed = new FOPTestbed();
-            ContainerUtil.enableLogging(testbed, new ConsoleLogger(ConsoleLogger.LEVEL_INFO));
+            // ContainerUtil.enableLogging(testbed, new ConsoleLogger(ConsoleLogger.LEVEL_INFO));
             ContainerUtil.configure(testbed, cfg);
             ContainerUtil.initialize(testbed);
 
@@ -70,7 +68,8 @@ public final class Main {
 
             System.exit(0);
         } catch (Exception e) {
-            System.err.println(ExceptionUtil.printStackTrace(e));
+            // System.err.println(ExceptionUtil.printStackTrace(e));
+            e.printStackTrace(System.err);
             System.exit(-1);
         }
     }
index 2f37c02a1322df81452aa668c7764dcd6884c929..2551e00396bc10a2640b7e87e3cf0312c48f7637 100644 (file)
@@ -24,10 +24,13 @@ import java.io.OutputStream;
 import javax.xml.transform.Source;
 import javax.xml.transform.Templates;
 
+import org.apache.fop.activity.Initializable;
+import org.apache.fop.configuration.Configurable;
+
 /**
  * Represents a processor.
  */
-public interface Processor {
+public interface Processor extends Configurable, Initializable {
 
     /**
      * Process a file.
index 162a837569f99ff8e6fc04339dcbbd1117e54915..5edae8074d1fe57d92bcf8ee022a5a6f36a5ce0a 100644 (file)
@@ -32,14 +32,14 @@ import javax.xml.transform.Transformer;
 import javax.xml.transform.sax.SAXResult;
 import javax.xml.transform.stream.StreamSource;
 
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.commons.io.IOUtils;
 
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.Fop;
 import org.apache.fop.apps.FopFactory;
+import org.apache.fop.configuration.Configurable;
+import org.apache.fop.configuration.Configuration;
+import org.apache.fop.configuration.ConfigurationException;
 import org.apache.fop.util.DefaultErrorListener;
 
 /**
index cb78028f492c74e64c672e0fafc34494eecd30d4..c9a2d477eccc2e46d02af29c96140ac6120d9125 100644 (file)
@@ -30,10 +30,6 @@ import javax.xml.transform.stream.StreamSource;
 
 import org.xml.sax.SAXException;
 
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
-import org.apache.avalon.framework.container.ContainerUtil;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.filefilter.AndFileFilter;
 import org.apache.commons.io.filefilter.IOFileFilter;
@@ -44,6 +40,10 @@ import org.apache.commons.logging.LogFactory;
 
 import org.apache.xmlgraphics.image.writer.ImageWriterUtil;
 
+import org.apache.fop.activity.ContainerUtil;
+import org.apache.fop.configuration.Configuration;
+import org.apache.fop.configuration.ConfigurationException;
+import org.apache.fop.configuration.DefaultConfigurationBuilder;
 import org.apache.fop.layoutengine.LayoutEngineTestUtils;
 
 /**
index 9326656f4c1288dee501692198267e240ce9af26..80a4fce0c2790cffd7b1031032ac3a0bccd94284 100644 (file)
@@ -22,10 +22,12 @@ package org.apache.fop.visual;
 import java.awt.image.BufferedImage;
 import java.io.File;
 
+import org.apache.fop.configuration.Configurable;
+
 /**
  * Interface for a converter.
  */
-public interface BitmapProducer {
+public interface BitmapProducer extends Configurable {
 
     /**
      * Produces a BufferedImage from the source file by invoking the FO processor and
index c29de1e85835edd2e1f07bb072408f109b4949b1..96a0d0f94b54a0c6483372e02275cc318fa4076c 100644 (file)
@@ -30,15 +30,15 @@ import javax.xml.transform.Transformer;
 import javax.xml.transform.sax.SAXResult;
 import javax.xml.transform.stream.StreamSource;
 
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.commons.io.IOUtils;
 
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.Fop;
 import org.apache.fop.apps.FopFactory;
 import org.apache.fop.apps.MimeConstants;
+import org.apache.fop.configuration.Configurable;
+import org.apache.fop.configuration.Configuration;
+import org.apache.fop.configuration.ConfigurationException;
 import org.apache.fop.util.DefaultErrorListener;
 
 /**
index 29b0afd00f1b9e69e179fcdbd04aad94431b3d77..2100178f0b69f7b43519c1c88ce46d9be0c02550 100644 (file)
@@ -23,9 +23,9 @@ import java.awt.image.BufferedImage;
 import java.io.File;
 import java.net.URI;
 
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
+import org.apache.fop.configuration.Configurable;
+import org.apache.fop.configuration.Configuration;
+import org.apache.fop.configuration.ConfigurationException;
 
 /**
  * BitmapProducer implementation that simply loads preproduced reference bitmaps from a
@@ -47,7 +47,6 @@ public class ReferenceBitmapLoader extends AbstractBitmapProducer implements Con
         super(baseUri);
     }
 
-    /** @see org.apache.avalon.framework.configuration.Configurable */
     public void configure(Configuration cfg) throws ConfigurationException {
         this.bitmapDirectory = new File(cfg.getChild("directory").getValue(null));
         if (!bitmapDirectory.exists()) {
index 8b28ed631d3b4c0955e9a9148e922584be305f35..73779cd27ee079c592a6f9bb857314a8a75550af 100644 (file)
       <artifactId>commons-logging</artifactId>
       <version>${commons.logging.version}</version>
     </dependency>
-    <dependency>
-      <groupId>org.apache.avalon.framework</groupId>
-      <artifactId>avalon-framework-api</artifactId>
-      <version>${avalon.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.avalon.framework</groupId>
-      <artifactId>avalon-framework-impl</artifactId>
-      <version>${avalon.version}</version>
-    </dependency>
   </dependencies>
 
   <build>
@@ -63,8 +53,6 @@
         <version>${war.plugin.version}</version>
         <configuration>
           <packagingIncludes>
-            WEB-INF/lib/avalon-framework-api-${avalon.version}.jar,
-            WEB-INF/lib/avalon-framework-impl-${avalon.version}.jar,
             WEB-INF/lib/batik-all-*.jar,
             WEB-INF/lib/commons-io-${commons.io.version}.jar,
             WEB-INF/lib/commons-logging-${commons.logging.version}.jar,
index 13a03d40bb9c6fdc625f1bb2144e36eff3593a23..ca93d1251bc2a711977d6e9fd0c6f599ca8367fa 100644 (file)
       <artifactId>commons-logging</artifactId>
       <version>${commons.logging.version}</version>
     </dependency>
-    <dependency>
-      <groupId>org.apache.avalon.framework</groupId>
-      <artifactId>avalon-framework-api</artifactId>
-      <version>${avalon.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.avalon.framework</groupId>
-      <artifactId>avalon-framework-impl</artifactId>
-      <version>${avalon.version}</version>
-    </dependency>
-    <!-- test deps -->
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
index 9913561e6abf3970c1bfae85d90a6a47689a9a39..838edf610b847a535ec7b862cb8bb12fb6b794be 100644 (file)
       <unpack>true</unpack>
       <unpackOptions>
         <includes>
-          <include>org/apache/avalon/framework/*</include>
-          <include>org/apache/avalon/framework/activity/*</include>
-          <include>org/apache/avalon/framework/configuration/*</include>
-          <include>org/apache/avalon/framework/container/*</include>
           <include>org/apache/commons/io/*.class</include>
           <include>org/apache/commons/io/filefilter/*.class</include>
           <include>org/apache/commons/io/output/*.class</include>
index cc286b2bdb572ab7743f6ce8089f513bb87905ef..3547015fe628b993b7e4261128fb4700310e0115 100644 (file)
@@ -73,7 +73,6 @@ list of possible build targets.
   <fileset dir="${basedir}/.." id="dist.bin.lib">
     <patternset id="dist.lib">
       <include name="fop/lib/README*"/>
-      <include name="fop/lib/avalon-framework*"/>
       <include name="fop/lib/batik*"/>
       <include name="fop/lib/commons-io*"/>
       <include name="fop/lib/commons-logging*"/>
@@ -597,7 +596,6 @@ list of possible build targets.
     <echo message="Creating the WAR file"/>
     <war warfile="${build.dir}/fop.war" webxml="${servlet.src.dir}/main/webapp/WEB-INF/web.xml">
       <lib dir="${lib.dir}">
-        <include name="avalon-framework*.jar"/>
         <include name="commons-logging*.jar"/>
         <include name="batik*.jar"/>
         <include name="commons-io*.jar"/>
@@ -642,6 +640,7 @@ list of possible build targets.
       <include name="org/apache/fop/util/DecimalFormatCache*.class"/>
       <include name="org/apache/fop/util/ImageObject.class"/>
       <include name="org/apache/fop/util/HexEncoder.class"/>
+      <include name="org/apache/fop/configuration/**"/>
     </patternset>
 <!-- PDF transcoder -->
     <patternset>
@@ -665,7 +664,6 @@ list of possible build targets.
   </fileset>
   <fileset dir="${lib.dir}" id="transcoder-lib-files">
     <include name="commons-io*.jar"/>
-    <include name="avalon-framework*.jar"/>
     <include name="commons-logging*.jar"/>
     <include name="xmlgraphics-commons*.jar"/>
   </fileset>
@@ -698,10 +696,6 @@ list of possible build targets.
     <mkdir dir="${transcoder-deps}"/>
     <unjar dest="${transcoder-deps}">
       <patternset>
-        <include name="org/apache/avalon/framework/*"/>
-        <include name="org/apache/avalon/framework/activity/*"/>
-        <include name="org/apache/avalon/framework/configuration/*"/>
-        <include name="org/apache/avalon/framework/container/*"/>
         <include name="org/apache/commons/logging/**"/>
         <include name="org/apache/commons/io/*.class"/>
         <include name="org/apache/commons/io/filefilter/*.class"/>
@@ -712,7 +706,6 @@ list of possible build targets.
     <mkdir dir="${transcoder-deps}/legal"/>
     <copy todir="${transcoder-deps}/legal">
       <fileset dir="${lib.dir}">
-        <include name="avalon.LICENSE.txt"/>
         <include name="commons-io.LICENSE.txt"/>
         <include name="commons-logging.LICENSE.txt"/>
       </fileset>
index 0ad70d03c970245d030e7c403f217fd07dfc5c77..2439f73f69a5e9e2c1031890374f4327c117930f 100644 (file)
@@ -33,7 +33,6 @@
        <!-- stuff -->
        <path id="project.class.path">
      <fileset dir="${fop.lib.dir}">
-        <include name="avalon-framework*.jar"/>
         <include name="batik*.jar"/>
         <include name="xml-apis*.jar"/>
         <include name="xerces*.jar"/>
index 0d75a731933fd7ade9fcd1c55bbfe8f6d6273bb8..24718ce493e979dc25839754d6576c1c01fa992a 100644 (file)
@@ -31,8 +31,6 @@ import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.sax.SAXResult;
 import javax.xml.transform.stream.StreamSource;
 
-import org.apache.avalon.framework.ExceptionUtil;
-
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.Fop;
 import org.apache.fop.apps.FopFactory;
@@ -103,7 +101,7 @@ public class ExampleAWTViewer {
 
             System.out.println("Success!");
         } catch (Exception e) {
-            System.err.println(ExceptionUtil.printStackTrace(e));
+//            System.err.println(ExceptionUtil.printStackTrace(e));
             System.exit(-1);
         }
     }
index d35413f60bf94115a7ba7453e27b33e993900c44..03540c41bbf2773d05b798fd84b9e03fa29a8b50 100644 (file)
 package embedding;
 
 import java.awt.Font;
+import java.io.File;
 import java.io.FileOutputStream;
 import java.io.OutputStream;
 
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
-
+import org.apache.fop.configuration.Configuration;
+import org.apache.fop.configuration.DefaultConfigurationBuilder;
 import org.apache.xmlgraphics.java2d.GraphicContext;
 import org.apache.xmlgraphics.java2d.ps.EPSDocumentGraphics2D;
 
@@ -43,7 +43,7 @@ public class ExampleEPS {
     try {
       String configFile = "examples/fop-eps.xconf";
       DefaultConfigurationBuilder cfgBuilder = new DefaultConfigurationBuilder();
-      Configuration c = cfgBuilder.buildFromFile(configFile);
+      Configuration c = cfgBuilder.buildFromFile(new File(configFile));
 
       FontInfo fontInfo = PDFDocumentGraphics2DConfigurator.createFontInfo(c, false);
 
index 7a9b12cd01d1bae85cb290f2227d799fa9e52fee..abe6d7f8640d9df05e8ff5c89781d1490b74b94e 100644 (file)
@@ -30,13 +30,13 @@ import java.io.StringReader;
 
 import javax.swing.JEditorPane;
 
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.configuration.DefaultConfiguration;
 import org.apache.commons.io.IOUtils;
 
 import org.apache.xmlgraphics.util.UnitConv;
 
+import org.apache.fop.configuration.Configuration;
+import org.apache.fop.configuration.ConfigurationException;
+import org.apache.fop.configuration.DefaultConfiguration;
 import org.apache.fop.svg.PDFDocumentGraphics2D;
 import org.apache.fop.svg.PDFDocumentGraphics2DConfigurator;
 
index e61bd855926a90d4dd7bc3de75eb0fcfb50ba114..b570edfd13cca98ac9bafb2da85606943d44d7a5 100644 (file)
@@ -27,14 +27,6 @@ Normal Dependencies
     
     Apache License v2.0
 
-- Apache Avalon Framework
-
-    avalon-framework-*.jar
-    http://excalibur.apache.org/framework/
-    (Avalon Framework, maintained by the Apache Excalibur project)
-    
-    Apache License v2.0
-
 - Apache XML Graphics Commons
 
     xmlgraphics-commons-*.jar
diff --git a/fop/lib/avalon-framework-api-4.3.1.jar b/fop/lib/avalon-framework-api-4.3.1.jar
deleted file mode 100644 (file)
index b60000b..0000000
Binary files a/fop/lib/avalon-framework-api-4.3.1.jar and /dev/null differ
diff --git a/fop/lib/avalon-framework-impl-4.3.1.jar b/fop/lib/avalon-framework-impl-4.3.1.jar
deleted file mode 100644 (file)
index d56e988..0000000
Binary files a/fop/lib/avalon-framework-impl-4.3.1.jar and /dev/null differ
diff --git a/fop/lib/avalon-framework.LICENSE.txt b/fop/lib/avalon-framework.LICENSE.txt
deleted file mode 100644 (file)
index 67db858..0000000
+++ /dev/null
@@ -1,175 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
diff --git a/fop/lib/avalon-framework.NOTICE.TXT b/fop/lib/avalon-framework.NOTICE.TXT
deleted file mode 100644 (file)
index 416f7ba..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-   =========================================================================\r
-   ==  NOTICE file corresponding to the section 4 d of                    ==\r
-   ==  the Apache License, Version 2.0,                                   ==\r
-   =========================================================================\r
-\r
-   This product is developed by the Apache Avalon Project.\r
-   http://avalon.apache.org\r
-\r
-   The names "Avalon" and "Merlin" must not be used to endorse or promote \r
-   products derived from this software without prior written permission. \r
-   For written permission, please contact pmc@avalon.apache.org.\r
diff --git a/pom.xml b/pom.xml
index 8eb5361675ae0279b89786991fe03c2fe62cca5d..fc2f0fc2c0c396620236a400829e5cfc8aa67bb6 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -12,7 +12,6 @@
 
   <properties>
     <antrun.plugin.version>1.8</antrun.plugin.version>
-    <avalon.version>4.3.1</avalon.version>
     <batik.version>1.11.0-SNAPSHOT</batik.version>
     <build.helper.plugin.version>1.9.1</build.helper.plugin.version>
     <checkstyle.plugin.version>2.14</checkstyle.plugin.version>