<!--
  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-testutils</artifactId>
    <packaging>jar</packaging>
    <version>2.0.6.16-fuse</version>
    <name>Apache CXF Test Utilities</name>
    <url>http://cwiki.apache.org/CXF</url>

    <parent>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-parent</artifactId>
        <version>2.0.6.16-fuse</version>
        <relativePath>../parent/pom.xml</relativePath>
    </parent>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.codehaus.jra</groupId>
            <artifactId>jra</artifactId>
            <version>1.0-alpha-3</version>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.xml.ws</groupId>
            <artifactId>jaxws-api</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.xml.soap</groupId>
            <artifactId>saaj-api</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-annotation_1.0_spec</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-activation_1.1_spec</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-api</artifactId>
            <version>${project.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>ant</groupId>
                        <artifactId>ant-trax</artifactId>
                        <version>1.6.5</version>
                    </dependency>
                </dependencies>

                <executions>
                    <execution>
                        <!--
                            Run in validate phase to ensure wsdls exist
                            before running wsdl2java in generate-sources
                            phase.
                        -->
                        <id>validate</id>
                        <phase>validate</phase>
                        <configuration>
                            <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
                            <tasks>
                                <property name="generated.target" value="${basedir}/target/generated" />
                                <property name="generated.src.test" value="${generated.target}/src/main/java" />
                                <property name="generated.resources.test" value="${generated.target}/src/main/resources" />
                                <property name="generated.wsdl.test" value="${generated.resources.test}/" />
                                <property name="test.resources.dir" location="${basedir}/src/main/resources" />

                                <mkdir dir="${generated.resources.test}/wsdl/type_test" />
                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_ID_xsd.xsl" in="${test.resources.dir}/wsdl/type_test/type_test.xsd" out="${generated.resources.test}/wsdl/type_test/type_test_1.xsd">
                                    <param name="groupID" expression="1" />
                                </xslt>
                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_ID_xsd.xsl" in="${test.resources.dir}/wsdl/type_test/type_test.xsd" out="${generated.resources.test}/wsdl/type_test/type_test_2.xsd">
                                    <param name="groupID" expression="2" />
                                </xslt>
                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_ID_xsd.xsl" in="${test.resources.dir}/wsdl/type_test/type_test.xsd" out="${generated.resources.test}/wsdl/type_test/type_test_3.xsd">
                                    <param name="groupID" expression="3" />
                                </xslt>
                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_wsdl.xsl" in="${test.resources.dir}/wsdl/type_test/type_test.xsd" out="${generated.resources.test}/wsdl/type_test/type_test_doclit.wsdl">
                                    <param name="inc_xsd_path" expression="." />
                                    <param name="use_style" expression="document" />
                                    <param name="tns_suffix" expression="doc" />
                                </xslt>
                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_wsdl.xsl" in="${test.resources.dir}/wsdl/type_test/type_test.xsd" out="${generated.resources.test}/wsdl/type_test/type_test_rpclit.wsdl">
                                    <param name="inc_xsd_path" expression="." />
                                    <param name="use_style" expression="rpc" />
                                    <param name="tns_suffix" expression="rpc" />
                                </xslt>
                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_wsdl.xsl" in="${test.resources.dir}/wsdl/type_test/type_test.xsd" out="${generated.resources.test}/wsdl/type_test/type_test_xml_inc.wsdl">
                                    <param name="inc_xsd_path" expression="." />
                                    <param name="use_style" expression="document" />
                                    <param name="tns_suffix" expression="xml" />
                                </xslt>
                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_xml_wsdl.xsl" in="${test.resources.dir}/wsdl/type_test/type_test.xsd" out="${generated.resources.test}/wsdl/type_test/type_test_xml.wsdl">
                                    <param name="inc_wsdl_path" expression="." />
                                    <param name="port" expression="9008" />
                                </xslt>
                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_soap_wsdl.xsl" in="${test.resources.dir}/wsdl/type_test/type_test.xsd" out="${generated.resources.test}/wsdl/type_test/type_test_doclit_soap.wsdl">
                                    <param name="inc_wsdl_path" expression="." />
                                    <param name="use_style" expression="document" />
                                    <param name="port" expression="9007" />
                                </xslt>
                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_soap_wsdl.xsl" in="${test.resources.dir}/wsdl/type_test/type_test.xsd" out="${generated.resources.test}/wsdl/type_test/type_test_rpclit_soap.wsdl">
                                    <param name="inc_wsdl_path" expression="." />
                                    <param name="use_style" expression="rpc" />
                                    <param name="port" expression="9006" />
                                </xslt>

                                <mkdir dir="${generated.src.test}/org/apache/cxf/systest/type_test" />

                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_impl_java.xsl" in="${test.resources.dir}/wsdl/type_test/type_test.xsd" out="${generated.src.test}/org/apache/cxf/systest/type_test/TypeTestImpl.java" />
                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_tester_java.xsl" in="${test.resources.dir}/wsdl/type_test/type_test.xsd" out="${generated.src.test}/org/apache/cxf/systest/type_test/TypeTestTester.java" />

                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-codegen-plugin</artifactId>
                <version>${project.version}</version>
                <executions>
                    <execution>
                        <id>generate-sources</id>
                        <phase>generate-sources</phase>
                        <configuration>
                            <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
                            <wsdlOptions>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world.wsdl</wsdl>
                                    <extraargs>
                                        <extraarg>-b</extraarg>
                                        <extraarg>
                                            ${basedir}/src/main/resources/wsdl/async_binding.xml
                                        </extraarg>
                                    </extraargs>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_soap12.wsdl</wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_secure.wsdl</wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/greeter_control.wsdl</wsdl>
                                    <extraargs>
                                        <extraarg>-b</extraarg>
                                        <extraarg>
                                            ${basedir}/src/main/resources/wsdl/greeter_control.xjb
                                        </extraarg>
                                    </extraargs>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/mtom_xop.wsdl</wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/swa-mime.wsdl</wsdl>
                                    <extraargs>
                                        <extraarg>-b</extraarg>
                                        <extraarg>
                                            ${basedir}/src/main/resources/wsdl/swa-mime-binding.xml
                                        </extraarg>
                                    </extraargs>

                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_xml_mixed.wsdl</wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_xml_bare.wsdl</wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>
                                        ${basedir}/src/main/resources/wsdl/hello_world_xml_wrapped.wsdl
                                    </wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_rpc_lit.wsdl</wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_mixedstyle.wsdl</wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_doc_lit.wsdl</wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_soap_action.wsdl</wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/doc_lit_bare.wsdl</wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/jms_test.wsdl</wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/handler_test.wsdl</wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/soap_header.wsdl</wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/soapheader.wsdl</wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/soapheader2.wsdl</wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/soapheader_rpc.wsdl</wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/locator.wsdl</wsdl>
                                    <!--extraargs>
                                    <extraarg>-p</extraarg>
                                    <extraarg>org.apache.cxf.testutils.locator</extraarg>
                                    </extraargs-->
                                </wsdlOption>

                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/schema_validation.wsdl</wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>
                                        ${basedir}/src/main/resources/wsdl/anonymous_complex_type.wsdl
                                    </wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/basic_callback_test.wsdl</wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/nested_callback.wsdl</wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>
                                        ${basedir}/src/main/resources/wsdl/hello_world_underscore.wsdl
                                    </wsdl>
                                </wsdlOption>

                                <wsdlOption>
                                    <wsdl>
                                        ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_xml.wsdl
                                    </wsdl>
                                    <dependencies>
                                        <dependency>
                                            ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_xml_inc.wsdl
                                        </dependency>
                                        <dependency>
                                            ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_1.xsd
                                        </dependency>
                                        <dependency>
                                            ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_2.xsd
                                        </dependency>
                                        <dependency>
                                            ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_3.xsd
                                        </dependency>
                                    </dependencies>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>
                                        ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_doclit_soap.wsdl
                                    </wsdl>
                                    <dependencies>
                                        <dependency>
                                            ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_doclit.wsdl
                                        </dependency>
                                        <dependency>
                                            ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_1.xsd
                                        </dependency>
                                        <dependency>
                                            ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_2.xsd
                                        </dependency>
                                        <dependency>
                                            ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_3.xsd
                                        </dependency>
                                    </dependencies>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>
                                        ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_rpclit_soap.wsdl
                                    </wsdl>
                                    <dependencies>
                                        <dependency>
                                            ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_rpclit.wsdl
                                        </dependency>
                                        <dependency>
                                            ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_1.xsd
                                        </dependency>
                                        <dependency>
                                            ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_2.xsd
                                        </dependency>
                                        <dependency>
                                            ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_3.xsd
                                        </dependency>
                                    </dependencies>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/addNumbers.wsdl</wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/calculator.wsdl</wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/jaxb_element_test.wsdl</wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/ordered_param_holder.wsdl</wsdl>
                                </wsdlOption>

                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_services.wsdl</wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/header_doc_lit.wsdl</wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/header_rpc_lit.wsdl</wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/any.wsdl</wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/factory_pattern.wsdl</wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_jbi.wsdl</wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/test_chars.wsdl</wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/inherit.wsdl</wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_fault.wsdl</wsdl>
                                </wsdlOption>                                

                            </wsdlOptions>
                        </configuration>
                        <goals>
                            <goal>wsdl2java</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-common-xsd</artifactId>
                <version>${version}</version>
                <executions>
                    <execution>
                        <id>generate-sources</id>
                        <phase>generate-sources</phase>
                        <configuration>
                            <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
                            <xsdOptions>
                                <xsdOption>
                                    <xsd>${basedir}/src/main/resources/wsdl/oob_headertype.xsd</xsd>
                                    <extension>true</extension>
                                    <extensionArgs>
                                        <extensionArg>-Xdv</extensionArg>
                                    </extensionArgs>
                                </xsdOption>
                            </xsdOptions>
                        </configuration>
                        <goals>
                            <goal>xsdtojava</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.cxf</groupId>
                        <artifactId>cxf-xjc-dv</artifactId>
                        <version>${version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.apache.cxf</groupId>
                        <artifactId>cxf-common-utilities</artifactId>
                        <version>${version}</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>


    <scm>
        <connection>scm:svn:http://projects.open.iona.com/projects/svn/iona/cxf/tags/cxf-2.0.6.1-fuse-SNAPSHOT/testutils</connection>
        <developerConnection>scm:svn:https://projects.open.iona.com/projects/svn/iona/cxf/tags/cxf-2.0.6.1-fuse-SNAPSHOT/testutils</developerConnection>
    </scm>

</project>
