<!--
  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.1.3.1-fuse</version>
    <name>Apache CXF Test Utilities</name>
    <url>http://cxf.apache.org</url>

    <parent>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-parent</artifactId>
        <version>2.1.3.1-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>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-jaxws_2.1_spec</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-wsdl-validator-plugin</artifactId>
                <version>${project.version}</version>
                <configuration>
                   <wsdlRoot>${basedir}/src/main/resources/wsdl</wsdlRoot>
                </configuration>
                <executions>
                    <!-- execution>
                        <id>validate</id>
                        <phase>validate</phase>
                        <goals>
                          <goal>wsdlvalidator</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>target/generated/src/main/java</sourceRoot>
                            <wsdlRoot>src/main/resources/wsdl</wsdlRoot>
                            <wsdlOptions>
                                <wsdlOption>
                                    <wsdl>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>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>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>
                            </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://svn.apache.org/repos/asf/cxf/trunk/testutils</connection>
        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/cxf/trunk/testutils</developerConnection>
      <url>http://projects.open.iona.com/projects/trac/iona/browser/cxf/trunk/cxf-parent/cxf-testutils</url>
  </scm>

</project>
