<!--
  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>
    <artifactId>cxf-rt-databinding-sdo</artifactId>
    <packaging>jar</packaging>
    <name>Apache CXF Runtime SDO DataBinding</name>
    <url>http://cxf.apache.org</url>

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

    <properties>
        <cxf.pmd.eclipse.ruleset>cxf-pmd-ruleset-generated.xml</cxf.pmd.eclipse.ruleset>
        <cxf.compile.flags>-Xlint:unchecked,fallthrough,finally</cxf.compile.flags>
        <cxf.compile.show.deprecation>false</cxf.compile.show.deprecation>
    </properties>

    <dependencies>

        <dependency>
            <groupId>org.apache.tuscany.sdo</groupId>
            <artifactId>tuscany-sdo-impl</artifactId>
            <version>1.1.1</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.codehaus.woodstox</groupId>
                    <artifactId>wstx-asl</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.tuscany.sdo</groupId>
            <artifactId>tuscany-sdo-tools</artifactId>
            <version>1.1.1</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-api</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-core</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>${cxf.stax.impl.groupId}</groupId>
            <artifactId>${cxf.stax.impl.artifactId}</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-tools-wsdlto-core</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>


        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.easymock</groupId>
            <artifactId>easymockclassextension</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-testutils</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-tools-wsdlto-frontend-jaxws</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-transports-local</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-transports-http</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-frontend-jaxws</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <repositories>
        <!--  temporary add the apache snapshot repo so tuscany folks can just grab this module and build it -->
        <repository>
            <id>apache.snapshots</id>
            <name>Apache Snapshot Repository</name>
            <url>http://repository.apache.org/snapshots</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
    </repositories>

    <build>
        <plugins>
            <plugin>
                 <groupId>org.apache.cxf</groupId>
                 <artifactId>cxf-codegen-plugin</artifactId>
                 <version>${project.version}</version>
                 <executions>
                     <execution>
                         <id>generate-test-sources-static</id>
                         <phase>generate-test-sources</phase>
                         <configuration>
                             <fork>${cxf.codegenplugin.forkmode}</fork>
                             <testSourceRoot>${basedir}/target/generated/src/test/java</testSourceRoot>
                             <testWsdlRoot>${basedir}/src/test/resources/wsdl_sdo</testWsdlRoot>
                             <wsdlOptions>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/test/resources/wsdl_sdo/HelloService_static.wsdl</wsdl>
                                    <extraargs>
                                        <extraarg>-db</extraarg>
                                        <extraarg>sdo</extraarg>
                                        <extraarg>-p</extraarg>
                                        <extraarg>http://apache.org/cxf/databinding/sdo/hello_world_soap_http/types=helloworld.static_types.sdo</extraarg>
                                        <extraarg>-p</extraarg>
                                        <extraarg>http://apache.org/cxf/databinding/sdo/hello_world_soap_http=helloworld.static_types.ws</extraarg>
                                    </extraargs>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/test/resources/wsdl_sdo/HelloService_dynamic.wsdl</wsdl>
                                    <extraargs>
                                        <extraarg>-db</extraarg>
                                        <extraarg>sdo-dynamic</extraarg>
                                        <extraarg>-p</extraarg>
                                        <extraarg>http://apache.org/cxf/databinding/sdo/hello_world_soap_http=helloworld.dynamic_types.ws</extraarg>
                                    </extraargs>
                                </wsdlOption>
                            </wsdlOptions>
                         </configuration>
                         <goals>
                             <goal>wsdl2java</goal>
                         </goals>
                     </execution>
                 </executions>
             </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>jdk15</id>
            <activation>
                <jdk>1.5</jdk>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.apache.geronimo.specs</groupId>
                    <artifactId>geronimo-stax-api_1.0_spec</artifactId>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>setup.eclipse</id>
            <build>
                <defaultGoal>process-test-sources</defaultGoal>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>setup.eclipse.project.sdo</id>
                                <phase>process-test-sources</phase>
                                <configuration>
                                     <tasks>
                                         <echo file="${basedir}/.settings/org.eclipse.jdt.core.prefs" append="true">
org.eclipse.jdt.core.compiler.problem.unusedLocal=ignore
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
                                         </echo>
                                     </tasks>
                                </configuration>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
