cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From egl...@apache.org
Subject svn commit: r556005 - in /incubator/cxf/trunk: common/common/ common/common/src/main/java/org/apache/cxf/jaxb/ common/common/src/test/java/org/apache/cxf/jaxb/ common/xjc/ common/xjc/dv-test/ common/xjc/dv/src/main/resources/META-INF/services/ common/x...
Date Fri, 13 Jul 2007 14:11:08 GMT
Author: eglynn
Date: Fri Jul 13 07:11:06 2007
New Revision: 556005

URL: http://svn.apache.org/viewvc?view=rev&rev=556005
Log:
Applying patch for CXF-787 "Add optional support for a toString method to JAXB generated types" on behalf of Gary Tully.


Added:
    incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/jaxb/JAXBToStringBuilder.java   (with props)
    incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/jaxb/JAXBToStringStyle.java   (with props)
    incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/jaxb/JAXBElementToStringStyleTest.java   (with props)
    incubator/cxf/trunk/common/xjc/ts/
    incubator/cxf/trunk/common/xjc/ts-test/
    incubator/cxf/trunk/common/xjc/ts-test/pom.xml   (with props)
    incubator/cxf/trunk/common/xjc/ts-test/src/
    incubator/cxf/trunk/common/xjc/ts-test/src/test/
    incubator/cxf/trunk/common/xjc/ts-test/src/test/java/
    incubator/cxf/trunk/common/xjc/ts-test/src/test/java/org/
    incubator/cxf/trunk/common/xjc/ts-test/src/test/java/org/apache/
    incubator/cxf/trunk/common/xjc/ts-test/src/test/java/org/apache/cxf/
    incubator/cxf/trunk/common/xjc/ts-test/src/test/java/org/apache/cxf/xjc/
    incubator/cxf/trunk/common/xjc/ts-test/src/test/java/org/apache/cxf/xjc/ts/
    incubator/cxf/trunk/common/xjc/ts-test/src/test/java/org/apache/cxf/xjc/ts/ToStringTest.java   (with props)
    incubator/cxf/trunk/common/xjc/ts-test/src/test/resources/
    incubator/cxf/trunk/common/xjc/ts-test/src/test/resources/schemas/
    incubator/cxf/trunk/common/xjc/ts-test/src/test/resources/schemas/configuration/
    incubator/cxf/trunk/common/xjc/ts-test/src/test/resources/schemas/configuration/foo.xsd   (with props)
    incubator/cxf/trunk/common/xjc/ts/pom.xml   (with props)
    incubator/cxf/trunk/common/xjc/ts/src/
    incubator/cxf/trunk/common/xjc/ts/src/main/
    incubator/cxf/trunk/common/xjc/ts/src/main/java/
    incubator/cxf/trunk/common/xjc/ts/src/main/java/org/
    incubator/cxf/trunk/common/xjc/ts/src/main/java/org/apache/
    incubator/cxf/trunk/common/xjc/ts/src/main/java/org/apache/cxf/
    incubator/cxf/trunk/common/xjc/ts/src/main/java/org/apache/cxf/xjc/
    incubator/cxf/trunk/common/xjc/ts/src/main/java/org/apache/cxf/xjc/ts/
    incubator/cxf/trunk/common/xjc/ts/src/main/java/org/apache/cxf/xjc/ts/Messages.properties   (with props)
    incubator/cxf/trunk/common/xjc/ts/src/main/java/org/apache/cxf/xjc/ts/ToStringPlugin.java   (with props)
    incubator/cxf/trunk/common/xjc/ts/src/main/resources/
    incubator/cxf/trunk/common/xjc/ts/src/main/resources/META-INF/
    incubator/cxf/trunk/common/xjc/ts/src/main/resources/META-INF/services/
    incubator/cxf/trunk/common/xjc/ts/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin
Modified:
    incubator/cxf/trunk/common/common/pom.xml
    incubator/cxf/trunk/common/xjc/dv-test/pom.xml
    incubator/cxf/trunk/common/xjc/dv/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin
    incubator/cxf/trunk/common/xjc/pom.xml
    incubator/cxf/trunk/distribution/bundle/pom.xml
    incubator/cxf/trunk/parent/pom.xml

Modified: incubator/cxf/trunk/common/common/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/pom.xml?view=diff&rev=556005&r1=556004&r2=556005
==============================================================================
--- incubator/cxf/trunk/common/common/pom.xml (original)
+++ incubator/cxf/trunk/common/common/pom.xml Fri Jul 13 07:11:06 2007
@@ -106,6 +106,12 @@
             <groupId>org.apache.ws.commons.schema</groupId>
             <artifactId>XmlSchema</artifactId>
         </dependency>
+        
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+        </dependency>
+        
         <dependency>
             <groupId>org.codehaus.woodstox</groupId>
             <artifactId>wstx-asl</artifactId>
@@ -127,6 +133,7 @@
             <artifactId>geronimo-activation_1.1_spec</artifactId>
             <scope>test</scope>
         </dependency>
+        
     </dependencies>
 
     <scm>

Added: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/jaxb/JAXBToStringBuilder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/jaxb/JAXBToStringBuilder.java?view=auto&rev=556005
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/jaxb/JAXBToStringBuilder.java (added)
+++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/jaxb/JAXBToStringBuilder.java Fri Jul 13 07:11:06 2007
@@ -0,0 +1,36 @@
+/**
+ * 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.
+ */
+
+package org.apache.cxf.jaxb;
+
+import org.apache.commons.lang.builder.ToStringBuilder;
+import org.apache.commons.lang.builder.ToStringStyle;
+
+public final class JAXBToStringBuilder {
+    private JAXBToStringBuilder() {        
+    }
+    
+    public static String valueOf(Object object) {
+        return valueOf(object, JAXBToStringStyle.DEFAULT_STYLE);        
+    }
+    
+    public static String valueOf(Object object, ToStringStyle style) {
+        return ToStringBuilder.reflectionToString(object, style);        
+    }
+}

Propchange: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/jaxb/JAXBToStringBuilder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/jaxb/JAXBToStringBuilder.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/jaxb/JAXBToStringStyle.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/jaxb/JAXBToStringStyle.java?view=auto&rev=556005
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/jaxb/JAXBToStringStyle.java (added)
+++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/jaxb/JAXBToStringStyle.java Fri Jul 13 07:11:06 2007
@@ -0,0 +1,80 @@
+/**
+ * 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.
+ */
+
+package org.apache.cxf.jaxb;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.commons.lang.SystemUtils;
+import org.apache.commons.lang.builder.ToStringBuilder;
+import org.apache.commons.lang.builder.ToStringStyle;
+
+/*
+ * Override default styles to recognise JAXBElement as needing introspection
+ */
+public class JAXBToStringStyle {
+
+    public static final ToStringStyle MULTI_LINE_STYLE =
+        new JAXBToStringStyleImpl(true);
+
+    public static final ToStringStyle SIMPLE_STYLE =
+        new JAXBToStringStyleImpl(false);
+
+    public static final ToStringStyle DEFAULT_STYLE =
+        new JAXBToStringStyleImpl();
+    
+}
+
+class JAXBToStringStyleImpl extends ToStringStyle {
+    JAXBToStringStyleImpl() {
+        super();
+    }
+            
+    JAXBToStringStyleImpl(boolean multiLine) {
+        super();
+        if (multiLine) {
+            this.setContentStart("[");
+            this.setFieldSeparator(SystemUtils.LINE_SEPARATOR + "  ");
+            this.setFieldSeparatorAtStart(true);
+            this.setContentEnd(SystemUtils.LINE_SEPARATOR + "]");
+        } else {
+            // simple
+            this.setUseClassName(false);
+            this.setUseIdentityHashCode(false);
+            this.setUseFieldNames(false);
+            this.setContentStart("");
+            this.setContentEnd("");
+        }
+    }
+        
+    /*
+     * Introspect into JAXBElement as a special case as it does not have a
+     * toString() and we loose the content
+     * 
+     * @see org.apache.commons.lang.builder.ToStringStyle
+     */
+    @Override
+    protected void appendDetail(StringBuffer buffer, String fieldName, Object value) {
+        if (value instanceof JAXBElement) {
+            buffer.append(ToStringBuilder.reflectionToString(value, this));
+        } else {
+            buffer.append(value);
+        }
+    } 
+}

Propchange: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/jaxb/JAXBToStringStyle.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/jaxb/JAXBToStringStyle.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/jaxb/JAXBElementToStringStyleTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/jaxb/JAXBElementToStringStyleTest.java?view=auto&rev=556005
==============================================================================
--- incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/jaxb/JAXBElementToStringStyleTest.java (added)
+++ incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/jaxb/JAXBElementToStringStyleTest.java Fri Jul 13 07:11:06 2007
@@ -0,0 +1,96 @@
+/**
+ * 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.
+ */
+
+package org.apache.cxf.jaxb;
+
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.namespace.QName;
+
+import org.apache.commons.lang.builder.ToStringBuilder;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class JAXBElementToStringStyleTest {
+    
+    class Holder {
+        String name = "HolderName";
+        Object obj;
+        Holder(Object o) {
+            this.obj = o;
+        }
+    }
+    
+    JAXBElement<String> nel = 
+        new JAXBElement<String>(
+            new QName("ab", "bv"),
+            String.class, "SomeText");
+
+    Holder h = new Holder(nel);
+    
+    @Test
+    public void testToStringDefault() throws Exception {    
+                
+        String ts = ToStringBuilder.reflectionToString(h);
+
+        validateHolderString(ts);
+
+        // JAXBElement contents not present
+        Assert.assertTrue("has no value", ts.indexOf("value") == -1);
+        Assert.assertTrue("has no bv", ts.indexOf("bv") == -1);
+
+    }
+
+    @Test
+    public void testToStringMultiLineStyle() throws Exception {
+        String ts = 
+            ToStringBuilder.reflectionToString(h, JAXBToStringStyle.MULTI_LINE_STYLE);
+
+        validateHolderString(ts);
+        validateElementString(ts);
+    }
+
+    @Test
+    public void testToStringSimpleStyle() throws Exception {
+        String ts = 
+            ToStringBuilder.reflectionToString(h, JAXBToStringStyle.SIMPLE_STYLE);
+
+        // field names are missing
+        Assert.assertTrue("has no obj field", ts.indexOf("obj") == -1);
+        Assert.assertTrue("has HolderName", ts.indexOf("HolderName") != -1);
+        Assert.assertTrue("has SomeText", ts.indexOf("SomeText") != -1);
+    }
+
+    private void validateHolderString(String ts) {
+        Assert.assertTrue("has HolderName", ts.indexOf("HolderName") != -1);
+        Assert.assertTrue("has JAXBElement", ts.indexOf("JAXBElement") != -1);
+        Assert.assertTrue("has obj", ts.indexOf("obj") != -1);
+    }
+    
+    private void validateElementString(String ts) {
+        Assert.assertTrue("has  value", ts.indexOf("value") != -1);
+        Assert.assertTrue("has scope", ts.indexOf("scope") != -1);
+        Assert.assertTrue("has bv", ts.indexOf("bv") != -1);
+       
+        
+    }
+
+
+}

Propchange: incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/jaxb/JAXBElementToStringStyleTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/jaxb/JAXBElementToStringStyleTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/cxf/trunk/common/xjc/dv-test/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/xjc/dv-test/pom.xml?view=diff&rev=556005&r1=556004&r2=556005
==============================================================================
--- incubator/cxf/trunk/common/xjc/dv-test/pom.xml (original)
+++ incubator/cxf/trunk/common/xjc/dv-test/pom.xml Fri Jul 13 07:11:06 2007
@@ -73,7 +73,6 @@
         </dependency>
     </dependencies>
 
-
     <build>
         <plugins>
             <plugin>
@@ -93,13 +92,6 @@
                         </goals>
                     </execution>
                 </executions>
-                <dependencies>
-                    <dependency>
-                        <groupId>org.apache.cxf</groupId>
-                        <artifactId>cxf-xjc-dv</artifactId>
-                        <version>${project.version}</version>
-                    </dependency>
-                </dependencies>
             </plugin>
         </plugins>
     </build>

Modified: incubator/cxf/trunk/common/xjc/dv/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/xjc/dv/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin?view=diff&rev=556005&r1=556004&r2=556005
==============================================================================
--- incubator/cxf/trunk/common/xjc/dv/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin (original)
+++ incubator/cxf/trunk/common/xjc/dv/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin Fri Jul 13 07:11:06 2007
@@ -1 +1 @@
-org.apache.cxf.xjc.dv.DefaultValuePlugin
+org.apache.cxf.xjc.dv.DefaultValuePlugin
\ No newline at end of file

Modified: incubator/cxf/trunk/common/xjc/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/xjc/pom.xml?view=diff&rev=556005&r1=556004&r2=556005
==============================================================================
--- incubator/cxf/trunk/common/xjc/pom.xml (original)
+++ incubator/cxf/trunk/common/xjc/pom.xml Fri Jul 13 07:11:06 2007
@@ -34,8 +34,11 @@
 
     <modules>
         <module>dv</module>
+        <module>ts</module>
         <module>dv-test</module>
+        <module>ts-test</module>
     </modules>
+
 
     <scm>
         <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/cxf/trunk/common/xjc</connection>

Added: incubator/cxf/trunk/common/xjc/ts-test/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/xjc/ts-test/pom.xml?view=auto&rev=556005
==============================================================================
--- incubator/cxf/trunk/common/xjc/ts-test/pom.xml (added)
+++ incubator/cxf/trunk/common/xjc/ts-test/pom.xml Fri Jul 13 07:11:06 2007
@@ -0,0 +1,104 @@
+<!--
+  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.
+-->
+<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>
+    <groupId>org.apache.cxf</groupId>
+    <artifactId>cxf-xjc-ts-test</artifactId>
+    <packaging>jar</packaging>
+    <version>2.1-incubator-SNAPSHOT</version>
+    <name>Apache CXF XJC toString Plugin Tests</name>
+    <url>http://cwiki.apache.org/CXF</url>
+
+    <parent>
+        <groupId>org.apache.cxf</groupId>
+        <artifactId>cxf-parent</artifactId>
+        <version>2.1-incubator-SNAPSHOT</version>
+        <relativePath>../../../parent/pom.xml</relativePath>
+    </parent>
+
+    <pluginRepositories>
+        <pluginRepository>
+            <id>java.net</id>
+            <name>java.net Maven Repository</name>
+            <url>http://download.java.net/maven/1/</url>
+            <layout>legacy</layout>
+        </pluginRepository>
+    </pluginRepositories>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>javax.xml.bind</groupId>
+            <artifactId>jaxb-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.xml.bind</groupId>
+            <artifactId>jaxb-impl</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.xml.bind</groupId>
+            <artifactId>jaxb-xjc</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-common-utilities</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+           <groupId>commons-lang</groupId>
+           <artifactId>commons-lang</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>com.sun.tools.xjc.maven2</groupId>
+                <artifactId>maven-jaxb-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <configuration>
+                            <generateDirectory>${basedir}/target/generated/src/test/java</generateDirectory>
+                            <schemaDirectory>${basedir}/src/test/resources/schemas/configuration</schemaDirectory>
+                            <includeSchema>*.xsd</includeSchema>
+                            <extension>true</extension>
+                            <args>-Xts</args>
+                        </configuration>
+                        <goals>
+                            <goal>generate</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/cxf/trunk/common/xjc/ts-test</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/cxf/trunk/common/xjc/ts-test</developerConnection>
+      <url>http://svn.apache.org/viewvc/incubator/cxf/trunk/cxf-parent/cxf-xjc-ts-test</url>
+  </scm>
+
+</project>

Propchange: incubator/cxf/trunk/common/xjc/ts-test/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/common/xjc/ts-test/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/xjc/ts-test/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/common/xjc/ts-test/src/test/java/org/apache/cxf/xjc/ts/ToStringTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/xjc/ts-test/src/test/java/org/apache/cxf/xjc/ts/ToStringTest.java?view=auto&rev=556005
==============================================================================
--- incubator/cxf/trunk/common/xjc/ts-test/src/test/java/org/apache/cxf/xjc/ts/ToStringTest.java (added)
+++ incubator/cxf/trunk/common/xjc/ts-test/src/test/java/org/apache/cxf/xjc/ts/ToStringTest.java Fri Jul 13 07:11:06 2007
@@ -0,0 +1,68 @@
+/**
+ * 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.
+ */
+
+package org.apache.cxf.xjc.ts;
+
+import java.lang.reflect.Method;
+
+
+import org.apache.cxf.configuration.foo.Foo;
+import org.apache.cxf.configuration.foo.TpAddress;
+import org.apache.cxf.configuration.foo.TpAddressPresentation;
+import org.junit.Assert;
+import org.junit.Test;
+
+
+
+public class ToStringTest extends Assert {
+
+    @Test
+    public void testFooToStringOverride() throws Exception {
+        
+        Foo foo = new org.apache.cxf.configuration.foo.ObjectFactory().createFoo();
+
+        Method method = foo.getClass().getMethod("toString");
+        assertEquals("toString is overridden", foo.getClass(),
+                     method.getDeclaringClass());
+        
+        String fooS = foo.toString();
+        assertTrue("contains null", fooS.indexOf("null") != -1);
+    }    
+
+    
+    @Test
+    public void testAddressToStringOverride() throws Exception {
+        
+        TpAddress foo = new org.apache.cxf.configuration.foo.ObjectFactory().createTpAddress();
+
+        Method method = foo.getClass().getMethod("toString");
+        assertEquals("toString is overridden", foo.getClass(),
+                     method.getDeclaringClass());
+     
+        TpAddressPresentation value = TpAddressPresentation.P_ADDRESS_PRESENTATION_ALLOWED;
+        foo.setPresentation(value);
+        String fooS = foo.toString();
+        assertTrue("contains null", fooS.indexOf("null") != -1);
+        assertTrue("contains P_ADDRESS_PRESENTATION_ALLOWED", 
+                   fooS.indexOf("P_ADDRESS_PRESENTATION_ALLOWED") != -1);
+        
+
+    }    
+
+}

Propchange: incubator/cxf/trunk/common/xjc/ts-test/src/test/java/org/apache/cxf/xjc/ts/ToStringTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/common/xjc/ts-test/src/test/java/org/apache/cxf/xjc/ts/ToStringTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/common/xjc/ts-test/src/test/resources/schemas/configuration/foo.xsd
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/xjc/ts-test/src/test/resources/schemas/configuration/foo.xsd?view=auto&rev=556005
==============================================================================
--- incubator/cxf/trunk/common/xjc/ts-test/src/test/resources/schemas/configuration/foo.xsd (added)
+++ incubator/cxf/trunk/common/xjc/ts-test/src/test/resources/schemas/configuration/foo.xsd Fri Jul 13 07:11:06 2007
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://cxf.apache.org/configuration/foo" targetNamespace="http://cxf.apache.org/configuration/foo" elementFormDefault="qualified">
+
+    <xs:element name="foo" type="tns:foo"/>
+    
+    <xs:simpleType name="celsius">
+        <xs:restriction base="xs:int">
+            <xs:minExclusive value="-273"/>
+        </xs:restriction>
+    </xs:simpleType>
+    
+    <xs:simpleType name="cel">
+        <xs:restriction base="tns:celsius">
+            <xs:minExclusive value="0"/>
+        </xs:restriction>
+    </xs:simpleType>
+
+    <xs:complexType name="foo">        
+        <xs:sequence>
+            <xs:element name="stringElem" type="xs:string" default="hello" minOccurs="0"></xs:element>
+            <xs:element name="booleanElem" type="xs:boolean" default="true" minOccurs="0"></xs:element>
+            <xs:element name="integerElem" type="xs:integer" default="11" minOccurs="0"></xs:element>
+            <xs:element name="intElem" type="xs:int" default="12" minOccurs="0"></xs:element>
+            <xs:element name="longElem" type="xs:long" default="13" minOccurs="0"></xs:element>
+            <xs:element name="shortElem" type="xs:short" default="14" minOccurs="0"></xs:element>
+            <xs:element name="decimalElem" type="xs:decimal" default="15" minOccurs="0"></xs:element>
+            <xs:element name="floatElem" type="xs:float" default="16" minOccurs="0"></xs:element>
+            <xs:element name="doubleElem" type="xs:double" default="17" minOccurs="0"></xs:element>
+            <xs:element name="byteElem" type="xs:byte" default="18" minOccurs="0"></xs:element>
+            <xs:element name="qnameElem" type="xs:QName" default="xs:string" minOccurs="0"></xs:element>
+            <xs:element name="base64BinaryElem" type="xs:base64Binary" default="abcdefgh" minOccurs="0"></xs:element>
+            <xs:element name="hexBinaryElem" type="xs:hexBinary" default="ffff" minOccurs="0"></xs:element>
+            <xs:element name="unsignedIntElem" type="xs:unsignedInt" default="19" minOccurs="0"></xs:element>
+            <xs:element name="unsignedShortElem" type="xs:unsignedShort" default="20" minOccurs="0"></xs:element>
+            <xs:element name="unsignedByteElem" type="xs:unsignedByte" default="21" minOccurs="0"></xs:element>
+            <xs:element name="durationElem" type="xs:duration" default="PT3H" minOccurs="0"></xs:element>
+            <xs:element name="temperature" type="tns:celsius" default="37" minOccurs="0"></xs:element>
+            <xs:element name="roomTemperature" type="tns:cel" default="38" minOccurs="0"></xs:element>
+            
+            <xs:element name="point" type="tns:point" minOccurs="0"></xs:element>
+
+            <xs:element name="address" minOccurs="0">
+              <xs:complexType>
+                <xs:sequence>
+                    <xs:element name="city" type="xs:string"></xs:element>
+                    <xs:element name="zip" type="xs:int"></xs:element>
+                    <xs:element name="street" type="xs:string"></xs:element>
+                    <xs:element name="nr" type="xs:int"></xs:element>
+                </xs:sequence>
+              </xs:complexType>
+            </xs:element>
+        </xs:sequence>
+
+        <xs:attribute name="stringAttr" type="xs:string" default="hello"/>
+        <xs:attribute name="booleanAttr" type="xs:boolean" default="true"/>
+        <xs:attribute name="integerAttr" type="xs:integer" default="111"/>
+        <xs:attribute name="intAttr" type="xs:int" default="112"/>
+        <xs:attribute name="longAttr" type="xs:long" default="113"/>
+        <xs:attribute name="shortAttr" type="xs:short" default="114"/>
+        <xs:attribute name="decimalAttr" type="xs:decimal" default="115"/>
+        <xs:attribute name="floatAttr" type="xs:float" default="116"/>
+        <xs:attribute name="doubleAttr" type="xs:double" default="117"/>
+        <xs:attribute name="byteAttr" type="xs:byte" default="118"/>
+        <xs:attribute name="qnameAttr" type="xs:QName" default="xs:schema"/>
+        <xs:attribute name="base64BinaryAttr" type="xs:base64Binary" default="wxyz"/>
+        <xs:attribute name="hexBinaryAttr" type="xs:hexBinary" default="aaaa"/>
+        <xs:attribute name="unsignedIntAttr" type="xs:unsignedInt" default="119"/>
+        <xs:attribute name="unsignedShortAttr" type="xs:unsignedShort" default="120"/>
+        <xs:attribute name="unsignedByteAttr" type="xs:unsignedByte" default="121"/>
+        <xs:attribute name="durationAttr" type="xs:duration" default="PT3S"/>
+        
+        <xs:attribute name="stringAttrNoDefault" type="xs:string"/>
+        <xs:attribute name="booleanAttrNoDefault" type="xs:boolean"/>
+        <xs:attribute name="integerAttrNoDefault" type="xs:integer"/>
+        <xs:attribute name="intAttrNoDefault" type="xs:int"/>
+        <xs:attribute name="longAttrNoDefault" type="xs:long"/>
+        <xs:attribute name="shortAttrNoDefault" type="xs:short"/>
+        <xs:attribute name="decimalAttrNoDefault" type="xs:decimal"/>
+        <xs:attribute name="floatAttrNoDefault" type="xs:float"/>
+        <xs:attribute name="doubleAttrNoDefault" type="xs:double"/>
+        <xs:attribute name="byteAttrNoDefault" type="xs:byte"/>
+        <xs:attribute name="qnameAttrNoDefault" type="xs:QName"/>
+        <xs:attribute name="base64BinaryAttrNoDefault" type="xs:base64Binary"/>
+        <xs:attribute name="hexBinaryAttrNoDefault" type="xs:hexBinary"/>
+        <xs:attribute name="unsignedIntAttrNoDefault" type="xs:unsignedInt"/>
+        <xs:attribute name="unsignedShortAttrNoDefault" type="xs:unsignedShort"/>
+        <xs:attribute name="unsignedByteAttrNoDefault" type="xs:unsignedByte"/>
+        <xs:attribute name="durationAttrNoDefault" type="xs:duration"/>
+    </xs:complexType>
+    
+    <xs:complexType name="point">
+        <xs:sequence>
+            <xs:element name="x" type="xs:int"></xs:element>
+            <xs:element name="y" type="xs:int"></xs:element>
+        </xs:sequence>
+    </xs:complexType>    
+
+    <xs:simpleType name="TpAddressPresentation">
+     <xs:restriction base="xs:string">
+       <xs:enumeration value="P_ADDRESS_PRESENTATION_UNDEFINED"/>
+       <xs:enumeration value="P_ADDRESS_PRESENTATION_ALLOWED"/>
+       <xs:enumeration value="P_ADDRESS_PRESENTATION_RESTRICTED"/>
+       <xs:enumeration value="P_ADDRESS_PRESENTATION_ADDRESS_NOT_AVAILABLE"/>
+     </xs:restriction>
+   </xs:simpleType>
+
+   <xs:complexType name="TpAddress">
+    <xs:complexContent>
+      <xs:restriction base="xs:anyType">
+        <xs:sequence>
+          <xs:element name="AddrString" type="xs:string"/>
+          <xs:element name="Name" type="xs:string"/>
+          <xs:element name="Presentation" type="tns:TpAddressPresentation"/>
+          <xs:element name="SubAddressString" type="xs:string"/>
+          <xs:element name="afoo" type ="tns:foo"/>
+        </xs:sequence>
+      </xs:restriction>
+    </xs:complexContent>
+  </xs:complexType>
+
+</xs:schema>

Propchange: incubator/cxf/trunk/common/xjc/ts-test/src/test/resources/schemas/configuration/foo.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/common/xjc/ts-test/src/test/resources/schemas/configuration/foo.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/xjc/ts-test/src/test/resources/schemas/configuration/foo.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/common/xjc/ts/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/xjc/ts/pom.xml?view=auto&rev=556005
==============================================================================
--- incubator/cxf/trunk/common/xjc/ts/pom.xml (added)
+++ incubator/cxf/trunk/common/xjc/ts/pom.xml Fri Jul 13 07:11:06 2007
@@ -0,0 +1,65 @@
+<!--
+  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.
+-->
+<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>
+    <groupId>org.apache.cxf</groupId>
+    <artifactId>cxf-xjc-ts</artifactId>
+    <packaging>jar</packaging>
+    <version>2.1-incubator-SNAPSHOT</version>
+    <name>Apache CXF XJC toString Plugin</name>
+    <url>http://cwiki.apache.org/CXF</url>
+
+    <parent>
+        <groupId>org.apache.cxf</groupId>
+        <artifactId>cxf-parent</artifactId>
+        <version>2.1-incubator-SNAPSHOT</version>
+        <relativePath>../../../parent/pom.xml</relativePath>
+    </parent>
+
+    <properties>
+        <maven.test.skip>true</maven.test.skip>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-common-utilities</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.xml.bind</groupId>
+            <artifactId>jaxb-xjc</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.xml.bind</groupId>
+            <artifactId>jaxb-impl</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+        </dependency>
+    </dependencies>
+
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/cxf/trunk/common/xjc/ts</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/cxf/trunk/common/xjc/ts</developerConnection>
+      <url>http://svn.apache.org/viewvc/incubator/cxf/trunk/cxf-parent/cxf-xjc-ts</url>
+  </scm>
+
+</project>

Propchange: incubator/cxf/trunk/common/xjc/ts/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/common/xjc/ts/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/xjc/ts/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/common/xjc/ts/src/main/java/org/apache/cxf/xjc/ts/Messages.properties
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/xjc/ts/src/main/java/org/apache/cxf/xjc/ts/Messages.properties?view=auto&rev=556005
==============================================================================
--- incubator/cxf/trunk/common/xjc/ts/src/main/java/org/apache/cxf/xjc/ts/Messages.properties (added)
+++ incubator/cxf/trunk/common/xjc/ts/src/main/java/org/apache/cxf/xjc/ts/Messages.properties Fri Jul 13 07:11:06 2007
@@ -0,0 +1,20 @@
+#
+#
+#    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.
+#
+#

Propchange: incubator/cxf/trunk/common/xjc/ts/src/main/java/org/apache/cxf/xjc/ts/Messages.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/common/xjc/ts/src/main/java/org/apache/cxf/xjc/ts/Messages.properties
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/xjc/ts/src/main/java/org/apache/cxf/xjc/ts/Messages.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/cxf/trunk/common/xjc/ts/src/main/java/org/apache/cxf/xjc/ts/ToStringPlugin.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/xjc/ts/src/main/java/org/apache/cxf/xjc/ts/ToStringPlugin.java?view=auto&rev=556005
==============================================================================
--- incubator/cxf/trunk/common/xjc/ts/src/main/java/org/apache/cxf/xjc/ts/ToStringPlugin.java (added)
+++ incubator/cxf/trunk/common/xjc/ts/src/main/java/org/apache/cxf/xjc/ts/ToStringPlugin.java Fri Jul 13 07:11:06 2007
@@ -0,0 +1,107 @@
+/**
+ * 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.
+ */
+
+package org.apache.cxf.xjc.ts;
+
+import java.io.IOException;
+import java.util.logging.Logger;
+
+import org.xml.sax.ErrorHandler;
+
+import com.sun.codemodel.JClass;
+import com.sun.codemodel.JDefinedClass;
+import com.sun.codemodel.JDocComment;
+import com.sun.codemodel.JExpr;
+import com.sun.codemodel.JFieldRef;
+import com.sun.codemodel.JInvocation;
+import com.sun.codemodel.JMethod;
+import com.sun.codemodel.JMod;
+import com.sun.tools.xjc.BadCommandLineException;
+import com.sun.tools.xjc.Options;
+import com.sun.tools.xjc.Plugin;
+import com.sun.tools.xjc.outline.ClassOutline;
+import com.sun.tools.xjc.outline.Outline;
+
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.jaxb.JAXBToStringBuilder;
+import org.apache.cxf.jaxb.JAXBToStringStyle;
+
+
+/**
+ * Modifies the JAXB code model to override the Object.toString() method with an 
+ * implementation that provides a String representation of the xml content.
+ */
+public class ToStringPlugin extends Plugin {
+    
+    private static final Logger LOG = LogUtils.getL7dLogger(ToStringPlugin.class);
+
+    private String styleFieldName = "DEFAULT_STYLE";
+    public String getOptionName() {
+        return "Xts";
+    }
+
+    public String getUsage() {
+        return "-Xts                 : Activate plugin to add a toString() method to generated classes\n"
+            +  "-Xts:style:multiline : Have toString produce multi line output\n"
+            +  "-Xts:style:simple    : Have toString produce single line terse output\n";
+    }
+
+    public int parseArgument(Options opt, String[] args, int index) 
+        throws BadCommandLineException, IOException {
+        int ret = 0;
+        if (args[index].equals("-Xts:style:multiline")) {
+            styleFieldName = "MULTI_LINE_STYLE";
+            ret = 1;
+        } else if (args[index].equals("-Xts:style:simple")) {
+            styleFieldName = "SIMPLE_STYLE";
+            ret = 1;
+        }
+        return ret;
+    }
+    
+    public boolean run(Outline outline, Options opt, ErrorHandler errorHandler) {
+        LOG.fine("Running toString() plugin.");
+        
+        final JClass toStringDelegateImpl = outline.getCodeModel().ref(JAXBToStringBuilder.class);
+        final JClass styleClass = outline.getCodeModel().ref(JAXBToStringStyle.class);
+        final JFieldRef toStringDelegateStyleParam = styleClass.staticRef(styleFieldName);
+        
+        for (ClassOutline co : outline.getClasses()) {
+            addToStringMethod(co, toStringDelegateImpl, toStringDelegateStyleParam);
+        }
+        
+        return true;
+    }
+
+    private void addToStringMethod(ClassOutline co, 
+                                   JClass delegateImpl, 
+                                   JFieldRef toStringDelegateStyleParam) {
+        final JDefinedClass implementation = co.implClass;
+        final JMethod toStringMethod = implementation.method(JMod.PUBLIC, String.class, "toString");
+        final JInvocation invoke = delegateImpl.staticInvoke("valueOf");
+        invoke.arg(JExpr._this());
+        invoke.arg(toStringDelegateStyleParam);
+        toStringMethod.body()._return(invoke);
+        
+        JDocComment doc = toStringMethod.javadoc();
+        doc.add("Generates a String representation of the contents of this type.");
+        doc.add("\nThis is an extension method, produced by the 'ts' xjc plugin");
+        toStringMethod.annotate(Override.class);
+    }
+}

Propchange: incubator/cxf/trunk/common/xjc/ts/src/main/java/org/apache/cxf/xjc/ts/ToStringPlugin.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/common/xjc/ts/src/main/java/org/apache/cxf/xjc/ts/ToStringPlugin.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/common/xjc/ts/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/xjc/ts/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin?view=auto&rev=556005
==============================================================================
--- incubator/cxf/trunk/common/xjc/ts/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin (added)
+++ incubator/cxf/trunk/common/xjc/ts/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin Fri Jul 13 07:11:06 2007
@@ -0,0 +1 @@
+org.apache.cxf.xjc.ts.ToStringPlugin
\ No newline at end of file

Modified: incubator/cxf/trunk/distribution/bundle/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/bundle/pom.xml?view=diff&rev=556005&r1=556004&r2=556005
==============================================================================
--- incubator/cxf/trunk/distribution/bundle/pom.xml (original)
+++ incubator/cxf/trunk/distribution/bundle/pom.xml Fri Jul 13 07:11:06 2007
@@ -95,6 +95,12 @@
 		</dependency>
 		<dependency>
 			<groupId>${pom.groupId}</groupId>
+			<artifactId>cxf-xjc-ts</artifactId>
+			<version>${pom.version}</version>
+		    <optional>true</optional>
+		</dependency>
+		<dependency>
+			<groupId>${pom.groupId}</groupId>
 			<artifactId>cxf-xjc-dv</artifactId>
 			<version>${pom.version}</version>
 		    <optional>true</optional>
@@ -263,6 +269,9 @@
 							  </transformer>
 							  <transformer implementation="org.codehaus.mojo.shade.resource.AppendingTransformer">
 							    <resource>META-INF/spring.handlers</resource>
+							  </transformer>
+							  <transformer implementation="org.codehaus.mojo.shade.resource.AppendingTransformer">
+							    <resource>META-INF/services/com.sun.tools.xjc.Plugin</resource>
 							  </transformer>
 							  <transformer implementation="org.codehaus.mojo.shade.resource.AppendingTransformer">
 							    <resource>META-INF/spring.schemas</resource>

Modified: incubator/cxf/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/parent/pom.xml?view=diff&rev=556005&r1=556004&r2=556005
==============================================================================
--- incubator/cxf/trunk/parent/pom.xml (original)
+++ incubator/cxf/trunk/parent/pom.xml Fri Jul 13 07:11:06 2007
@@ -126,6 +126,18 @@
                     <groupId>com.sun.tools.xjc.maven2</groupId>
                     <artifactId>maven-jaxb-plugin</artifactId>
                     <version>1.1</version>
+                    <dependencies>
+                        <dependency>
+		             <groupId>org.apache.cxf</groupId>
+                             <artifactId>cxf-xjc-dv</artifactId>
+                             <version>${project.version}</version>
+                        </dependency>
+                        <dependency>
+                             <groupId>org.apache.cxf</groupId>
+                             <artifactId>cxf-xjc-ts</artifactId>
+                             <version>${project.version}</version>
+                        </dependency>
+                    </dependencies>
                 </plugin>
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
@@ -708,13 +720,16 @@
                 <artifactId>xbean</artifactId>
                 <version>${xmlbeans.version}</version>
             </dependency>
-
             <dependency>
                 <groupId>xml-resolver</groupId>
                 <artifactId>xml-resolver</artifactId>
                 <version>1.2</version>
             </dependency>
-
+            <dependency>
+                <groupId>commons-lang</groupId>
+                <artifactId>commons-lang</artifactId>
+                <version>2.1</version>
+            </dependency>
         </dependencies>
     </dependencyManagement>
 



Mime
View raw message