You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2009/10/03 04:29:49 UTC

svn commit: r821223 - in /cxf/trunk: common/xjc/ common/xjc/boolean-test/ common/xjc/boolean-test/src/ common/xjc/boolean-test/src/test/ common/xjc/boolean-test/src/test/java/ common/xjc/boolean-test/src/test/java/org/ common/xjc/boolean-test/src/test/...

Author: dkulp
Date: Sat Oct  3 02:29:47 2009
New Revision: 821223

URL: http://svn.apache.org/viewvc?rev=821223&view=rev
Log:
[CXF-2410] Add xjc plugin for boolean getters.
Patch from RĂ©mi Flament applied

Added:
    cxf/trunk/common/xjc/boolean/
    cxf/trunk/common/xjc/boolean-test/
    cxf/trunk/common/xjc/boolean-test/pom.xml   (with props)
    cxf/trunk/common/xjc/boolean-test/src/
    cxf/trunk/common/xjc/boolean-test/src/test/
    cxf/trunk/common/xjc/boolean-test/src/test/java/
    cxf/trunk/common/xjc/boolean-test/src/test/java/org/
    cxf/trunk/common/xjc/boolean-test/src/test/java/org/apache/
    cxf/trunk/common/xjc/boolean-test/src/test/java/org/apache/cxf/
    cxf/trunk/common/xjc/boolean-test/src/test/java/org/apache/cxf/xjc/
    cxf/trunk/common/xjc/boolean-test/src/test/java/org/apache/cxf/xjc/bg/
    cxf/trunk/common/xjc/boolean-test/src/test/java/org/apache/cxf/xjc/bg/BooleanGetterPluginTest.java   (with props)
    cxf/trunk/common/xjc/boolean-test/src/test/resources/
    cxf/trunk/common/xjc/boolean-test/src/test/resources/schemas/
    cxf/trunk/common/xjc/boolean-test/src/test/resources/schemas/configuration/
    cxf/trunk/common/xjc/boolean-test/src/test/resources/schemas/configuration/foo.xsd   (with props)
    cxf/trunk/common/xjc/boolean/pom.xml
      - copied, changed from r821216, cxf/trunk/common/xjc/pom.xml
    cxf/trunk/common/xjc/boolean/src/
    cxf/trunk/common/xjc/boolean/src/main/
    cxf/trunk/common/xjc/boolean/src/main/java/
    cxf/trunk/common/xjc/boolean/src/main/java/com/
    cxf/trunk/common/xjc/boolean/src/main/java/com/sun/
    cxf/trunk/common/xjc/boolean/src/main/java/com/sun/tools/
    cxf/trunk/common/xjc/boolean/src/main/java/com/sun/tools/xjc/
    cxf/trunk/common/xjc/boolean/src/main/java/com/sun/tools/xjc/addon/
    cxf/trunk/common/xjc/boolean/src/main/java/com/sun/tools/xjc/addon/apache_cxf/
    cxf/trunk/common/xjc/boolean/src/main/java/com/sun/tools/xjc/addon/apache_cxf/bg/
    cxf/trunk/common/xjc/boolean/src/main/java/com/sun/tools/xjc/addon/apache_cxf/bg/BooleanGetterPlugin.java   (with props)
    cxf/trunk/common/xjc/boolean/src/main/java/org/
    cxf/trunk/common/xjc/boolean/src/main/java/org/apache/
    cxf/trunk/common/xjc/boolean/src/main/java/org/apache/cxf/
    cxf/trunk/common/xjc/boolean/src/main/java/org/apache/cxf/xjc/
    cxf/trunk/common/xjc/boolean/src/main/java/org/apache/cxf/xjc/bg/
    cxf/trunk/common/xjc/boolean/src/main/java/org/apache/cxf/xjc/bg/BooleanGetterPlugin.java   (with props)
    cxf/trunk/common/xjc/boolean/src/main/resources/
    cxf/trunk/common/xjc/boolean/src/main/resources/META-INF/
    cxf/trunk/common/xjc/boolean/src/main/resources/META-INF/services/
    cxf/trunk/common/xjc/boolean/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin
Modified:
    cxf/trunk/common/xjc/dv-test/pom.xml
    cxf/trunk/common/xjc/pom.xml
    cxf/trunk/common/xjc/ts-test/pom.xml
    cxf/trunk/common/xjc/wsdlextension-test/pom.xml
    cxf/trunk/distribution/bundle/all/pom.xml
    cxf/trunk/distribution/manifest/pom.xml
    cxf/trunk/distribution/pom.xml

Added: cxf/trunk/common/xjc/boolean-test/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/common/xjc/boolean-test/pom.xml?rev=821223&view=auto
==============================================================================
--- cxf/trunk/common/xjc/boolean-test/pom.xml (added)
+++ cxf/trunk/common/xjc/boolean-test/pom.xml Sat Oct  3 02:29:47 2009
@@ -0,0 +1,142 @@
+<!--
+	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.xjcplugins</groupId>
+	<artifactId>cxf-xjc-boolean-test</artifactId>
+	<packaging>jar</packaging>
+	<version>2.3.0-SNAPSHOT</version>
+	<name>Apache CXF XJC Boolean Getter Plugin Tests</name>
+	<url>http://cxf.apache.org</url>
+
+	<parent>
+		<groupId>org.apache.cxf</groupId>
+		<artifactId>cxf-parent</artifactId>
+		<version>2.3.0-SNAPSHOT</version>
+		<relativePath>../../../parent/pom.xml</relativePath>
+	</parent>
+
+
+	<dependencies>
+
+		<dependency>
+			<groupId>javax.xml.bind</groupId>
+			<artifactId>jaxb-api</artifactId>
+			<version>2.1</version>
+		</dependency>
+		<dependency>
+			<groupId>com.sun.xml.bind</groupId>
+			<artifactId>jaxb-impl</artifactId>
+			<version>2.1.12</version>
+		</dependency>
+		<dependency>
+			<groupId>com.sun.xml.bind</groupId>
+			<artifactId>jaxb-xjc</artifactId>
+			<version>2.1.12</version>
+		</dependency>
+
+		<dependency>
+			<groupId>jaxme</groupId>
+			<artifactId>jaxme2</artifactId>
+			<scope>test</scope>
+		</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>
+	</dependencies>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>jaxb2-maven-plugin</artifactId>
+
+				<executions>
+					<execution>
+						<goals>
+							<goal>xjc</goal>
+						</goals>
+					</execution>
+				</executions>
+				<configuration>
+					<outputDirectory>
+						${basedir}/target/generated/src/test/java
+					</outputDirectory>
+					<schemaDirectory>
+						${basedir}/src/test/resources/schemas/configuration
+					</schemaDirectory>
+					<arguments>-Xbg</arguments>
+					<extension>true</extension>
+					<quiet>true</quiet>
+				</configuration>
+
+
+
+				<dependencies>
+					<dependency>
+						<groupId>javax.xml.bind</groupId>
+						<artifactId>jaxb-api</artifactId>
+						<version>${jaxb.version}</version>
+					</dependency>
+					<dependency>
+						<groupId>com.sun.xml.bind</groupId>
+						<artifactId>jaxb-impl</artifactId>
+						<version>${jaxb.impl.version}</version>
+					</dependency>
+					<dependency>
+						<groupId>com.sun.xml.bind</groupId>
+						<artifactId>jaxb-xjc</artifactId>
+						<version>${jaxb.xjc.version}</version>
+					</dependency>
+					<dependency>
+                        <groupId>org.apache.cxf.xjcplugins</groupId>
+						<artifactId>cxf-xjc-boolean</artifactId>
+						<version>${project.version}</version>
+					</dependency>
+					<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>
+                    <dependency>
+                        <groupId>org.apache.cxf</groupId>
+                        <artifactId>cxf-xjc-wsdlextension</artifactId>
+                        <version>${project.version}</version>
+                    </dependency>
+				</dependencies>
+			</plugin>
+		</plugins>
+	</build>
+
+
+</project>

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

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

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

Added: cxf/trunk/common/xjc/boolean-test/src/test/java/org/apache/cxf/xjc/bg/BooleanGetterPluginTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/xjc/boolean-test/src/test/java/org/apache/cxf/xjc/bg/BooleanGetterPluginTest.java?rev=821223&view=auto
==============================================================================
--- cxf/trunk/common/xjc/boolean-test/src/test/java/org/apache/cxf/xjc/bg/BooleanGetterPluginTest.java (added)
+++ cxf/trunk/common/xjc/boolean-test/src/test/java/org/apache/cxf/xjc/bg/BooleanGetterPluginTest.java Sat Oct  3 02:29:47 2009
@@ -0,0 +1,40 @@
+/**
+ * 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.bg;
+
+import javax.xml.bind.DatatypeConverter;
+
+import org.apache.cxf.configuration.foo.Foo;
+import org.apache.ws.jaxme.impl.DatatypeConverterImpl;
+
+import org.junit.Test;
+
+public class BooleanGetterPluginTest {
+
+    @Test
+    public void testBooleanGetter() throws Exception {
+
+        DatatypeConverter.setDatatypeConverter(new DatatypeConverterImpl());
+
+        Foo foo = new org.apache.cxf.configuration.foo.ObjectFactory().createFoo();
+
+        foo.getBooleanAttr();
+    }
+
+}

Propchange: cxf/trunk/common/xjc/boolean-test/src/test/java/org/apache/cxf/xjc/bg/BooleanGetterPluginTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/common/xjc/boolean-test/src/test/java/org/apache/cxf/xjc/bg/BooleanGetterPluginTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/common/xjc/boolean-test/src/test/resources/schemas/configuration/foo.xsd
URL: http://svn.apache.org/viewvc/cxf/trunk/common/xjc/boolean-test/src/test/resources/schemas/configuration/foo.xsd?rev=821223&view=auto
==============================================================================
--- cxf/trunk/common/xjc/boolean-test/src/test/resources/schemas/configuration/foo.xsd (added)
+++ cxf/trunk/common/xjc/boolean-test/src/test/resources/schemas/configuration/foo.xsd Sat Oct  3 02:29:47 2009
@@ -0,0 +1,133 @@
+<?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:simpleType name="drivingDecision">
+    	<xs:restriction base="xs:string">
+    		<xs:enumeration value="RightTurn"/>
+    		<xs:enumeration value="LeftTurn"/>
+    		<xs:enumeration value="U-Turn"/>
+    	</xs:restriction>
+    </xs:simpleType>
+
+    <xs:complexType name="pageColor">
+	<xs:sequence>
+	    <xs:element name="background" type="xs:string" default="red"/>
+	    <xs:element name="foreground" type="xs:string" default="blue"/>
+    	</xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="foo">        
+        <xs:sequence>
+	    <xs:element name="pageColor" type="tns:pageColor" minOccurs="0"></xs:element>
+            <xs:element name="driving" type="tns:drivingDecision" default="LeftTurn" minOccurs="0"></xs:element>
+            <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:schema>

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

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

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

Copied: cxf/trunk/common/xjc/boolean/pom.xml (from r821216, cxf/trunk/common/xjc/pom.xml)
URL: http://svn.apache.org/viewvc/cxf/trunk/common/xjc/boolean/pom.xml?p2=cxf/trunk/common/xjc/boolean/pom.xml&p1=cxf/trunk/common/xjc/pom.xml&r1=821216&r2=821223&rev=821223&view=diff
==============================================================================
--- cxf/trunk/common/xjc/pom.xml (original)
+++ cxf/trunk/common/xjc/boolean/pom.xml Sat Oct  3 02:29:47 2009
@@ -18,34 +18,40 @@
 -->
 <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</artifactId>
-    <packaging>pom</packaging>
+    <groupId>org.apache.cxf.xjcplugins</groupId>
+    <artifactId>cxf-xjc-boolean</artifactId>
+    <packaging>jar</packaging>
     <version>2.3.0-SNAPSHOT</version>
-    <name>Apache CXF XJC Plugins</name>
+    <name>Apache CXF XJC Boolean Getter Plugin</name>
     <url>http://cxf.apache.org</url>
 
     <parent>
         <groupId>org.apache.cxf</groupId>
         <artifactId>cxf-parent</artifactId>
         <version>2.3.0-SNAPSHOT</version>
-        <relativePath>../../parent/pom.xml</relativePath>
+        <relativePath>../../../parent/pom.xml</relativePath>
     </parent>
 
-    <modules>
-        <module>dv</module>
-        <module>ts</module>
-        <module>wsdlextension</module>
-	<module>bug671</module>
-        <module>dv-test</module>
-        <module>ts-test</module>
-        <module>wsdlextension-test</module>
-    </modules>
+    <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>
+        
+    </dependencies>
 
-    <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/cxf/trunk/common/xjc</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/cxf/trunk/common/xjc</developerConnection>
-    </scm>
 
 </project>

Added: cxf/trunk/common/xjc/boolean/src/main/java/com/sun/tools/xjc/addon/apache_cxf/bg/BooleanGetterPlugin.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/xjc/boolean/src/main/java/com/sun/tools/xjc/addon/apache_cxf/bg/BooleanGetterPlugin.java?rev=821223&view=auto
==============================================================================
--- cxf/trunk/common/xjc/boolean/src/main/java/com/sun/tools/xjc/addon/apache_cxf/bg/BooleanGetterPlugin.java (added)
+++ cxf/trunk/common/xjc/boolean/src/main/java/com/sun/tools/xjc/addon/apache_cxf/bg/BooleanGetterPlugin.java Sat Oct  3 02:29:47 2009
@@ -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 com.sun.tools.xjc.addon.apache_cxf.bg;
+
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.SAXException;
+
+import com.sun.tools.xjc.Options;
+import com.sun.tools.xjc.Plugin;
+import com.sun.tools.xjc.outline.Outline;
+
+/**
+ * Thin wrapper around the BooleanGetterPlugin. This must be in the com.sun.tools.xjc.addon package for it to
+ * work with Java 6. See https://issues.apache.org/jira/browse/CXF-1880.
+ */
+public class BooleanGetterPlugin extends Plugin {
+
+    org.apache.cxf.xjc.bg.BooleanGetterPlugin impl = 
+        new org.apache.cxf.xjc.bg.BooleanGetterPlugin();
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see com.sun.tools.xjc.Plugin#getOptionName()
+     */
+    @Override
+    public String getOptionName() {
+        return impl.getOptionName();
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see com.sun.tools.xjc.Plugin#getUsage()
+     */
+    @Override
+    public String getUsage() {
+        return impl.getUsage();
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see com.sun.tools.xjc.Plugin#run(com.sun.tools.xjc.outline.Outline, com.sun.tools.xjc.Options,
+     *      org.xml.sax.ErrorHandler)
+     */
+    @Override
+    public boolean run(Outline outline, Options opt, ErrorHandler errorHandler) throws SAXException {
+        return impl.run(outline, opt, errorHandler);
+    }
+}

Propchange: cxf/trunk/common/xjc/boolean/src/main/java/com/sun/tools/xjc/addon/apache_cxf/bg/BooleanGetterPlugin.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/common/xjc/boolean/src/main/java/com/sun/tools/xjc/addon/apache_cxf/bg/BooleanGetterPlugin.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/common/xjc/boolean/src/main/java/org/apache/cxf/xjc/bg/BooleanGetterPlugin.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/xjc/boolean/src/main/java/org/apache/cxf/xjc/bg/BooleanGetterPlugin.java?rev=821223&view=auto
==============================================================================
--- cxf/trunk/common/xjc/boolean/src/main/java/org/apache/cxf/xjc/bg/BooleanGetterPlugin.java (added)
+++ cxf/trunk/common/xjc/boolean/src/main/java/org/apache/cxf/xjc/bg/BooleanGetterPlugin.java Sat Oct  3 02:29:47 2009
@@ -0,0 +1,70 @@
+/**
+ * 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.bg;
+
+import java.util.Collection;
+import java.util.logging.Logger;
+
+import org.xml.sax.ErrorHandler;
+
+import com.sun.codemodel.JMethod;
+import com.sun.tools.xjc.Options;
+import com.sun.tools.xjc.outline.ClassOutline;
+import com.sun.tools.xjc.outline.Outline;
+
+import org.apache.cxf.common.logging.LogUtils;
+
+/**
+ * Generate getters named getXXX() for Booleans instead of isXXX(). Useful to use generated beans with tools
+ * that needs introspections, like dozer.
+ */
+public class BooleanGetterPlugin {
+
+    private static final Logger LOG = LogUtils.getL7dLogger(BooleanGetterPlugin.class);
+
+    public BooleanGetterPlugin() {
+    }
+
+    public String getOptionName() {
+        return "Xbg";
+    }
+
+    public String getUsage() {
+        return "  -Xbg                 : Generate getters methods for Booleans";
+    }
+
+    public boolean run(Outline outline, Options opt, ErrorHandler errorHandler) {
+        LOG.info("Running boolean getter plugin.");
+        for (ClassOutline classOutline : outline.getClasses()) {
+            Collection<JMethod> methods = classOutline.implClass.methods();
+            for (JMethod method : methods) {
+                if (method.name().startsWith("is")) {
+                    String newName = "get" + method.name().substring(2);
+                    LOG.info("Changing method name from " + method.name() + " to " + newName);
+                    method.javadoc().add(
+                                         "\nThis getter has been renamed from " + method.name() + "() to "
+                                             + newName + "() by cxf-xjc-boolean plugin.");
+                    method.name(newName);
+                }
+            }
+        }
+        return true;
+    }
+
+}

Propchange: cxf/trunk/common/xjc/boolean/src/main/java/org/apache/cxf/xjc/bg/BooleanGetterPlugin.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/common/xjc/boolean/src/main/java/org/apache/cxf/xjc/bg/BooleanGetterPlugin.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/common/xjc/boolean/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin
URL: http://svn.apache.org/viewvc/cxf/trunk/common/xjc/boolean/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin?rev=821223&view=auto
==============================================================================
--- cxf/trunk/common/xjc/boolean/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin (added)
+++ cxf/trunk/common/xjc/boolean/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin Sat Oct  3 02:29:47 2009
@@ -0,0 +1 @@
+com.sun.tools.xjc.addon.apache_cxf.bg.BooleanGetterPlugin
\ No newline at end of file

Modified: cxf/trunk/common/xjc/dv-test/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/common/xjc/dv-test/pom.xml?rev=821223&r1=821222&r2=821223&view=diff
==============================================================================
--- cxf/trunk/common/xjc/dv-test/pom.xml (original)
+++ cxf/trunk/common/xjc/dv-test/pom.xml Sat Oct  3 02:29:47 2009
@@ -85,9 +85,28 @@
                     <extension>true</extension>
                     <quiet>true</quiet>
                 </configuration>
-
                 <dependencies>
                     <dependency>
+                        <groupId>javax.xml.bind</groupId>
+                        <artifactId>jaxb-api</artifactId>
+                        <version>${jaxb.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>com.sun.xml.bind</groupId>
+                        <artifactId>jaxb-impl</artifactId>
+                        <version>${jaxb.impl.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>com.sun.xml.bind</groupId>
+                        <artifactId>jaxb-xjc</artifactId>
+                        <version>${jaxb.xjc.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.cxf.xjcplugins</groupId>
+                        <artifactId>cxf-xjc-boolean</artifactId>
+                        <version>${project.version}</version>
+                    </dependency>
+                    <dependency>
                         <groupId>org.apache.cxf</groupId>
                         <artifactId>cxf-xjc-dv</artifactId>
                         <version>${project.version}</version>

Modified: cxf/trunk/common/xjc/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/common/xjc/pom.xml?rev=821223&r1=821222&r2=821223&view=diff
==============================================================================
--- cxf/trunk/common/xjc/pom.xml (original)
+++ cxf/trunk/common/xjc/pom.xml Sat Oct  3 02:29:47 2009
@@ -36,7 +36,9 @@
         <module>dv</module>
         <module>ts</module>
         <module>wsdlextension</module>
+	<module>boolean</module>
 	<module>bug671</module>
+	<module>boolean-test</module>
         <module>dv-test</module>
         <module>ts-test</module>
         <module>wsdlextension-test</module>

Modified: cxf/trunk/common/xjc/ts-test/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/common/xjc/ts-test/pom.xml?rev=821223&r1=821222&r2=821223&view=diff
==============================================================================
--- cxf/trunk/common/xjc/ts-test/pom.xml (original)
+++ cxf/trunk/common/xjc/ts-test/pom.xml Sat Oct  3 02:29:47 2009
@@ -57,8 +57,8 @@
             <version>${project.version}</version>
         </dependency>
         <dependency>
-           <groupId>commons-lang</groupId>
-           <artifactId>commons-lang</artifactId>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
         </dependency>
     </dependencies>
 
@@ -85,6 +85,26 @@
 
                 <dependencies>
                     <dependency>
+                        <groupId>javax.xml.bind</groupId>
+                        <artifactId>jaxb-api</artifactId>
+                        <version>${jaxb.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>com.sun.xml.bind</groupId>
+                        <artifactId>jaxb-impl</artifactId>
+                        <version>${jaxb.impl.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>com.sun.xml.bind</groupId>
+                        <artifactId>jaxb-xjc</artifactId>
+                        <version>${jaxb.xjc.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.cxf.xjcplugins</groupId>
+                        <artifactId>cxf-xjc-boolean</artifactId>
+                        <version>${project.version}</version>
+                    </dependency>
+                    <dependency>
                         <groupId>org.apache.cxf</groupId>
                         <artifactId>cxf-xjc-dv</artifactId>
                         <version>${project.version}</version>

Modified: cxf/trunk/common/xjc/wsdlextension-test/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/common/xjc/wsdlextension-test/pom.xml?rev=821223&r1=821222&r2=821223&view=diff
==============================================================================
--- cxf/trunk/common/xjc/wsdlextension-test/pom.xml (original)
+++ cxf/trunk/common/xjc/wsdlextension-test/pom.xml Sat Oct  3 02:29:47 2009
@@ -82,9 +82,28 @@
                     <extension>true</extension>
                     <quiet>true</quiet>
                 </configuration>
-
                 <dependencies>
                     <dependency>
+                        <groupId>javax.xml.bind</groupId>
+                        <artifactId>jaxb-api</artifactId>
+                        <version>${jaxb.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>com.sun.xml.bind</groupId>
+                        <artifactId>jaxb-impl</artifactId>
+                        <version>${jaxb.impl.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>com.sun.xml.bind</groupId>
+                        <artifactId>jaxb-xjc</artifactId>
+                        <version>${jaxb.xjc.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.cxf.xjcplugins</groupId>
+                        <artifactId>cxf-xjc-boolean</artifactId>
+                        <version>${project.version}</version>
+                    </dependency>
+                    <dependency>
                         <groupId>org.apache.cxf</groupId>
                         <artifactId>cxf-xjc-dv</artifactId>
                         <version>${project.version}</version>

Modified: cxf/trunk/distribution/bundle/all/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/bundle/all/pom.xml?rev=821223&r1=821222&r2=821223&view=diff
==============================================================================
--- cxf/trunk/distribution/bundle/all/pom.xml (original)
+++ cxf/trunk/distribution/bundle/all/pom.xml Sat Oct  3 02:29:47 2009
@@ -106,6 +106,11 @@
             <artifactId>cxf-xjc-bug671</artifactId>
             <version>${pom.version}</version>
         </dependency>
+        <dependency>
+            <groupId>${pom.groupId}.xjcplugins</groupId>
+            <artifactId>cxf-xjc-boolean</artifactId>
+            <version>${pom.version}</version>
+        </dependency>
         
         <dependency>
             <groupId>${pom.groupId}</groupId>

Modified: cxf/trunk/distribution/manifest/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/manifest/pom.xml?rev=821223&r1=821222&r2=821223&view=diff
==============================================================================
--- cxf/trunk/distribution/manifest/pom.xml (original)
+++ cxf/trunk/distribution/manifest/pom.xml Sat Oct  3 02:29:47 2009
@@ -114,6 +114,11 @@
             <version>${pom.version}</version>
         </dependency>
         <dependency>
+            <groupId>${pom.groupId}.xjcplugins</groupId>
+            <artifactId>cxf-xjc-boolean</artifactId>
+            <version>${pom.version}</version>
+        </dependency>
+        <dependency>
             <groupId>${pom.groupId}</groupId>
             <artifactId>cxf-api</artifactId>
             <version>${pom.version}</version>

Modified: cxf/trunk/distribution/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/pom.xml?rev=821223&r1=821222&r2=821223&view=diff
==============================================================================
--- cxf/trunk/distribution/pom.xml (original)
+++ cxf/trunk/distribution/pom.xml Sat Oct  3 02:29:47 2009
@@ -119,6 +119,11 @@
             <version>${pom.version}</version>
         </dependency>
         <dependency>
+            <groupId>${pom.groupId}.xjcplugins</groupId>
+            <artifactId>cxf-xjc-boolean</artifactId>
+            <version>${pom.version}</version>
+        </dependency>
+        <dependency>
             <groupId>${pom.groupId}</groupId>
             <artifactId>cxf-api</artifactId>
             <version>${pom.version}</version>