cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r821593 - in /cocoon/trunk/blocks/cocoon-serializers: cocoon-serializers-charsets/ cocoon-serializers-charsets/src/main/java/org/apache/cocoon/components/serializers/util/ cocoon-serializers-impl/
Date Sun, 04 Oct 2009 19:48:03 GMT
Author: cziegeler
Date: Sun Oct  4 19:48:02 2009
New Revision: 821593

URL: http://svn.apache.org/viewvc?rev=821593&view=rev
Log:
Remove dependencies to commons lang, make charsets an OSGi bundle, set versions for dependencies.

Modified:
    cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-charsets/NOTICE.txt
    cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-charsets/pom.xml
    cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-charsets/src/main/java/org/apache/cocoon/components/serializers/util/DocType.java
    cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-charsets/src/main/java/org/apache/cocoon/components/serializers/util/EncodingSerializer.java
    cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-charsets/src/main/java/org/apache/cocoon/components/serializers/util/XMLSerializer.java
    cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-impl/NOTICE.txt
    cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-impl/pom.xml

Modified: cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-charsets/NOTICE.txt
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-charsets/NOTICE.txt?rev=821593&r1=821592&r2=821593&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-charsets/NOTICE.txt (original)
+++ cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-charsets/NOTICE.txt Sun Oct
 4 19:48:02 2009
@@ -1,5 +1,5 @@
-Apache Cocoon
-Copyright 1999-2008 The Apache Software Foundation.
+Apache Cocoon Serializers Charsets
+Copyright 1999-2009 The Apache Software Foundation.
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

Modified: cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-charsets/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-charsets/pom.xml?rev=821593&r1=821592&r2=821593&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-charsets/pom.xml (original)
+++ cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-charsets/pom.xml Sun Oct  4
19:48:02 2009
@@ -23,13 +23,13 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
   <modelVersion>4.0.0</modelVersion>  
-  <packaging>jar</packaging>  
+  <packaging>bundle</packaging>  
   
   <parent>
-    <artifactId>cocoon-blocks-modules</artifactId>
+    <artifactId>cocoon</artifactId>
     <groupId>org.apache.cocoon</groupId>
-    <version>6-SNAPSHOT</version>
-    <relativePath>../../pom.xml</relativePath>
+    <version>8</version>
+    <relativePath>../../../parent/pom.xml</relativePath>
   </parent>
   <artifactId>cocoon-serializers-charsets</artifactId>
   <version>1.0.0-SNAPSHOT</version>
@@ -52,11 +52,26 @@
       <groupId>javax.servlet</groupId>
       <artifactId>servlet-api</artifactId>
     </dependency>
-    <dependency>
-      <groupId>commons-lang</groupId>
-      <artifactId>commons-lang</artifactId>
-    </dependency>
   </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <version>2.0.1</version>
+        <extensions>true</extensions>
+        <configuration>
+          <instructions>
+            <Export-Package>
+              org.apache.cocoon.components.serializers.encoding;version=${pom.version},
+              org.apache.cocoon.components.serializers.util;version=${pom.version}
+            </Export-Package>
+          </instructions>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>  
   
   <profiles>
     <profile>

Modified: cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-charsets/src/main/java/org/apache/cocoon/components/serializers/util/DocType.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-charsets/src/main/java/org/apache/cocoon/components/serializers/util/DocType.java?rev=821593&r1=821592&r2=821593&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-charsets/src/main/java/org/apache/cocoon/components/serializers/util/DocType.java
(original)
+++ cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-charsets/src/main/java/org/apache/cocoon/components/serializers/util/DocType.java
Sun Oct  4 19:48:02 2009
@@ -5,9 +5,9 @@
  * 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.
@@ -16,12 +16,10 @@
  */
 package org.apache.cocoon.components.serializers.util;
 
-import org.apache.commons.lang.StringUtils;
-
 /**
  * The <code>DocType</code> class encapsulates informations regarding
  * the document type public and system IDs and root element name.
- * 
+ *
  * @version $Id$
  */
 public class DocType {
@@ -32,7 +30,7 @@
     private static final char S_DOCTYPE_4[] = " SYSTEM \"".toCharArray();
     private static final char S_DOCTYPE_5[] = "\">".toCharArray();
     private static final char S_DOCTYPE_6[] = ">".toCharArray();
-    
+
     /** The name of the root element. */
     protected String root_name;
     /** The configured system identifier. */
@@ -42,16 +40,16 @@
 
     /**
      * Create a new <code>DocType</code> instance.
-     * 
+     *
      * @param root_name The document root element name.
      */
     public DocType(String root_name) {
         this(root_name, null, null);
     }
-    
+
     /**
      * Create a new <code>DocType</code> instance.
-     * 
+     *
      * @param root_name The document root element name.
      * @param system_id The document type system identifier.
      */
@@ -61,7 +59,7 @@
 
     /**
      * Create a new <code>DocType</code> instance.
-     * 
+     *
      * @param root_name The document root element name.
      * @param public_id The document type public identifier.
      * @param system_id The document type system identifier.
@@ -129,6 +127,16 @@
         return(buf.toString());
     }
 
+    private boolean equals(final String a, final String b) {
+        if ( a == null && b == null ) {
+            return true;
+        }
+        if ( a != null ) {
+            return a.equals(b);
+        }
+        return false;
+    }
+
     /**
      * Check if the specified object is equal to this <code>DocType</code>
      * instance.
@@ -140,8 +148,8 @@
         if (!(object instanceof DocType)) return(false);
         DocType doctype = (DocType)object;
 
-        if (StringUtils.equals(this.public_id, doctype.public_id)
-            && StringUtils.equals(this.system_id, doctype.system_id)
+        if (equals(this.public_id, doctype.public_id)
+            && equals(this.system_id, doctype.system_id)
             && this.root_name.equals(doctype.root_name)) {
             return true;
         }

Modified: cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-charsets/src/main/java/org/apache/cocoon/components/serializers/util/EncodingSerializer.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-charsets/src/main/java/org/apache/cocoon/components/serializers/util/EncodingSerializer.java?rev=821593&r1=821592&r2=821593&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-charsets/src/main/java/org/apache/cocoon/components/serializers/util/EncodingSerializer.java
(original)
+++ cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-charsets/src/main/java/org/apache/cocoon/components/serializers/util/EncodingSerializer.java
Sun Oct  4 19:48:02 2009
@@ -29,7 +29,6 @@
 import org.apache.cocoon.components.serializers.encoding.Charset;
 import org.apache.cocoon.components.serializers.encoding.CharsetFactory;
 import org.apache.cocoon.components.serializers.encoding.Encoder;
-import org.apache.commons.lang.SystemUtils;
 import org.xml.sax.Attributes;
 import org.xml.sax.ContentHandler;
 import org.xml.sax.Locator;
@@ -48,7 +47,7 @@
 public abstract class EncodingSerializer implements ContentHandler, LexicalHandler, Locator
 {
 
     /** The line separator string */
-    private static final char S_EOL[] = SystemUtils.LINE_SEPARATOR.toCharArray();
+    private static final char S_EOL[] = System.getProperty("line.separator").toCharArray();
 
     /* ====================================================================== */
 

Modified: cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-charsets/src/main/java/org/apache/cocoon/components/serializers/util/XMLSerializer.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-charsets/src/main/java/org/apache/cocoon/components/serializers/util/XMLSerializer.java?rev=821593&r1=821592&r2=821593&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-charsets/src/main/java/org/apache/cocoon/components/serializers/util/XMLSerializer.java
(original)
+++ cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-charsets/src/main/java/org/apache/cocoon/components/serializers/util/XMLSerializer.java
Sun Oct  4 19:48:02 2009
@@ -19,7 +19,6 @@
 import java.io.CharArrayWriter;
 
 import org.apache.cocoon.components.serializers.encoding.XMLEncoder;
-import org.apache.commons.lang.SystemUtils;
 import org.xml.sax.SAXException;
 
 /**
@@ -34,7 +33,7 @@
 
     private static final XMLEncoder XML_ENCODER = new XMLEncoder();
 
-    private static final char S_EOL[] = SystemUtils.LINE_SEPARATOR.toCharArray();
+    private static final char S_EOL[] = System.getProperty("line.separator").toCharArray();
 
     private static final char S_DOCUMENT_1[] = "<?xml version=\"1.0".toCharArray();
     private static final char S_DOCUMENT_2[] = "\" encoding=\"".toCharArray();

Modified: cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-impl/NOTICE.txt
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-impl/NOTICE.txt?rev=821593&r1=821592&r2=821593&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-impl/NOTICE.txt (original)
+++ cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-impl/NOTICE.txt Sun Oct  4 19:48:02
2009
@@ -1,5 +1,5 @@
-Apache Cocoon
-Copyright 1999-2008 The Apache Software Foundation.
+Apache Cocoon Serializers Block
+Copyright 1999-2009 The Apache Software Foundation.
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

Modified: cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-impl/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-impl/pom.xml?rev=821593&r1=821592&r2=821593&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-impl/pom.xml (original)
+++ cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-impl/pom.xml Sun Oct  4 19:48:02
2009
@@ -26,10 +26,10 @@
   <packaging>jar</packaging>  
   
   <parent>
-    <artifactId>cocoon-blocks-modules</artifactId>
+    <artifactId>cocoon</artifactId>
     <groupId>org.apache.cocoon</groupId>
-    <version>6-SNAPSHOT</version>
-    <relativePath>../../pom.xml</relativePath>
+    <version>8</version>
+    <relativePath>../../../parent/pom.xml</relativePath>
   </parent>
   <artifactId>cocoon-serializers-impl</artifactId>
   <version>1.0.0-SNAPSHOT</version>
@@ -47,14 +47,33 @@
     <docs.version>1.0</docs.version>
   </properties>
   
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <version>2.1</version>
+        <configuration>
+          <archive>
+            <manifestEntries>
+              <Cocoon-Block-Name>${pom.artifactId}</Cocoon-Block-Name>
+            </manifestEntries>
+          </archive>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
   <dependencies>
     <dependency>
       <groupId>org.apache.cocoon</groupId>
       <artifactId>cocoon-core</artifactId>
+      <version>2.2.0</version>
     </dependency>
     <dependency>
       <groupId>org.apache.cocoon</groupId>
       <artifactId>cocoon-serializers-charsets</artifactId>
+      <version>1.0.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>javax.servlet</groupId>



Mime
View raw message