<?xml version="1.0" encoding="UTF-8"?>
<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">

<!--

    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.
-->

  <parent>
    <groupId>org.apache.servicemix</groupId>
    <artifactId>bindingcomponents</artifactId>
    <version>3.2.3</version>
  </parent>

  <modelVersion>4.0.0</modelVersion>

  <groupId>org.apache.servicemix</groupId>
  <artifactId>servicemix-cxf-bc</artifactId>
  <packaging>jbi-component</packaging>
  <name>ServiceMix :: CXF</name>
  <description>A CXF Binding Component</description>

  <properties>
      <surefire.fork.mode>pertest</surefire.fork.mode>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.apache.servicemix</groupId>
      <artifactId>servicemix-jbi</artifactId>
      <version>${servicemix-version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.servicemix</groupId>
      <artifactId>servicemix-shared</artifactId>
      <version>${servicemix-version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.servicemix</groupId>
      <artifactId>servicemix-core</artifactId>
      <version>${servicemix-version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.servicemix</groupId>
      <artifactId>servicemix-services</artifactId>
      <version>${servicemix-version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-frontend-jaxws</artifactId>
      <version>${cxf-version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
      <version>1.1.1</version>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-ws-policy</artifactId>
      <version>${cxf-version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-ws-addr</artifactId>
      <version>${cxf-version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-ws-rm</artifactId>
      <version>${cxf-version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-ws-security</artifactId>
      <version>${cxf-version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-bindings-soap</artifactId>
      <version>${cxf-version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-transports-http-jetty</artifactId>
      <version>${cxf-version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-transports-jms</artifactId>
      <version>${cxf-version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-testutils</artifactId>
      <version>${cxf-version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-transports-jbi</artifactId>
      <version>${cxf-version}</version>
      <exclusions>
	    <exclusion>
	      <groupId>org.apache.servicemix</groupId>
	      <artifactId>servicemix-jbi</artifactId>
	    </exclusion>
	  </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-bindings-jbi</artifactId>
      <version>${cxf-version}</version>
      <exclusions>
	    <exclusion>
	      <groupId>org.apache.servicemix</groupId>
	      <artifactId>servicemix-jbi</artifactId>
	    </exclusion>
	  </exclusions>
    </dependency>

    <dependency>
      <groupId>org.mortbay.jetty</groupId>
      <artifactId>jetty</artifactId>
      <version>${jetty-version}</version>
    </dependency>
    <dependency>
      <groupId>org.mortbay.jetty</groupId>
      <artifactId>jetty-sslengine</artifactId>
      <version>${jetty-version}</version>
    </dependency>
    <dependency>
      <groupId>org.mortbay.jetty</groupId>
      <artifactId>jetty-util</artifactId>
      <version>${jetty-version}</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit-version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.servicemix</groupId>
      <artifactId>servicemix-cxf-se</artifactId>
      <version>${servicemix-version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-support</artifactId>
      <version>${spring-version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-aop</artifactId>
      <version>${spring-version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-jmx</artifactId>
      <version>${spring-version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context</artifactId>
      <version>${spring-version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-beans</artifactId>
      <version>${spring-version}</version>
      <scope>provided</scope>
    </dependency>
      <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-core</artifactId>
      <version>${spring-version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.derby</groupId>
      <artifactId>derby</artifactId>
      <version>${derby-version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.woden</groupId>
      <artifactId>woden</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
       <groupId>org.apache.geronimo.specs</groupId>
       <artifactId>geronimo-activation_1.1_spec</artifactId>
       <version>1.0-M1</version>
       <scope>provided</scope>
    </dependency>
    <dependency>
       <groupId>org.apache.servicemix</groupId>
       <artifactId>servicemix-jbi</artifactId>
       <scope>provided</scope>
    </dependency>
    <dependency>
       <groupId>stax</groupId>
       <artifactId>stax-api</artifactId>
       <scope>provided</scope>
    </dependency>
    <dependency>
       <groupId>org.codehaus.woodstox</groupId>
       <artifactId>wstx-asl</artifactId>
       <scope>provided</scope>
    </dependency>
    <dependency>
       <groupId>wsdl4j</groupId>
       <artifactId>wsdl4j</artifactId>
       <scope>provided</scope>
    </dependency>
    <dependency>
       <groupId>xalan</groupId>
       <artifactId>xalan</artifactId>
       <scope>provided</scope>
    </dependency>
    <dependency>
       <groupId>xerces</groupId>
       <artifactId>xercesImpl</artifactId>
       <scope>provided</scope>
    </dependency>
    <dependency>
       <groupId>xml-apis</groupId>
       <artifactId>xml-apis</artifactId>
       <scope>provided</scope>
    </dependency>
    <dependency>
       <groupId>org.apache.ws.commons.schema</groupId>
       <artifactId>XmlSchema</artifactId>
       <scope>provided</scope>
    </dependency>
    <dependency>
       <groupId>bouncycastle</groupId>
       <artifactId>bcprov-jdk14</artifactId>
       <version>${bcprov-version}</version>
       <scope>provided</scope>
    </dependency> 
    <dependency>
       <groupId>org.apache.ws.commons.neethi</groupId>
       <artifactId>neethi</artifactId>
       <version>2.0</version>
       <exclusions>
           <exclusion>
               <groupId>org.apache.ws.commons.axiom</groupId>
               <artifactId>axiom-api</artifactId>
           </exclusion>
           <exclusion>
               <groupId>org.apache.ws.commons.axiom</groupId>
               <artifactId>axiom-impl</artifactId>
           </exclusion>
           <exclusion>
               <groupId>woodstox</groupId>
               <artifactId>wstx-asl</artifactId>
           </exclusion>
       </exclusions>
 
    </dependency>
    <dependency>
        <groupId>commons-httpclient</groupId>
        <artifactId>commons-httpclient</artifactId>
        <scope>test</scope>
        <exclusions>         
            <exclusion>
                <groupId>commons-codec</groupId>
                <artifactId>commons-codec</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <scope>test</scope>
        <exclusions>
            <exclusion>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.servicemix.tooling</groupId>
        <artifactId>jbi-maven-plugin</artifactId>
        <version>${servicemix-version}</version>
        <extensions>true</extensions>
        <configuration>
          <type>binding-component</type>
          <component>org.apache.servicemix.cxfbc.CxfBcComponent</component>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.xbean</groupId>
        <artifactId>maven-xbean-plugin</artifactId>
        <version>${xbean-version}</version>
        <executions>
          <execution>
            <goals>
              <goal>mapping</goal>
            </goals>
            <configuration>
              <namespace>http://servicemix.apache.org/cxfbc/1.0</namespace>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <includes>
            <include>**/*Test*</include>
          </includes>
          <excludes>
            <exclude>**/*$*</exclude>
          </excludes>
          <forkMode>${surefire.fork.mode}</forkMode>
          <systemProperties>
            <property>
              <name>derby.system.home</name>
              <value>${basedir}/target/derby</value>
            </property>
                                                                                                                 222,39        22%
          </systemProperties>

        </configuration>
      </plugin>
      <plugin>
                <groupId>org.apache.cxf</groupId>
                    <artifactId>cxf-codegen-plugin</artifactId>
                    <version>${cxf-version}</version>
                    <executions>
                        <execution>
                            <id>generate-test-sources</id>
                            <phase>generate-sources</phase>
                            <configuration>
                                <sourceRoot>${basedir}/target/generated</sourceRoot>
                                <wsdlOptions>
                                     <wsdlOption>
                                             <wsdl>${basedir}/src/test/resources/hello_world.wsdl</wsdl>
	                                    <extraargs>
	                                        <extraarg>-verbose</extraarg>
        	                            </extraargs>
                                    </wsdlOption>
                                    <wsdlOption>
                                        <wsdl>${basedir}/src/test/resources/HelloWorld-DOC.wsdl</wsdl>
 					<extraargs>
	                                    <extraarg>-verbose</extraarg>
        	                        </extraargs>
                                    </wsdlOption>
                                    <wsdlOption>
                                        <wsdl>${basedir}/src/test/resources/org/apache/servicemix/cxfbc/fault/person.wsdl</wsdl>
                                        <extraargs>
                                            <extraarg>-verbose</extraarg>
                                        </extraargs>
				    </wsdlOption>
                                    <wsdlOption>
                                        <wsdl>${basedir}/src/test/resources/org/apache/servicemix/cxfbc/interceptors/quote.wsdl</wsdl>
                                        <extraargs>
                                            <extraarg>-verbose</extraarg>
                                        </extraargs>
                                    </wsdlOption>
                                    <wsdlOption>
                                        <wsdl>${basedir}/src/test/resources/org/apache/servicemix/cxfbc/ws/security/hello_world.wsdl</wsdl>
                                        <extraargs>
                                            <extraarg>-verbose</extraarg>
                                        </extraargs>
                                        <extraargs>
                                            <extraarg>-sn</extraarg>
                                            <extraarg>HelloWorldService</extraarg>
                                         </extraargs>
                                    </wsdlOption>

                                </wsdlOptions>

                            </configuration>
                            <goals>
                                <goal>wsdl2java</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

    </plugins>
  </build>

  <profiles>
    <profile>
      <id>ibmjdk</id>
      <activation>
        <property>
          <name>java.vendor</name>
          <value>IBM Corporation</value>
        </property>
      </activation>
      <!--
        Add the Sun jaxp-ri as a dependency when using the ibm jdk, so that
        cxf's dependency on the Sun saaj can work with the ibm jdk.
      -->
      <dependencies>
        <dependency>
          <groupId>com.sun.xml.parsers</groupId>
          <artifactId>jaxp-ri</artifactId>
          <version>1.4.2</version>
        </dependency>
      </dependencies>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <includes>
                <include>**/*Test*</include>
              </includes>
              <excludes>
                <exclude>**/*$*</exclude>
              </excludes>
              <forkMode>${surefire.fork.mode}</forkMode>
              <systemProperties>
                <property>
                  <name>derby.system.home</name>
                  <value>${basedir}/target/derby</value>
                </property>
                <!--
                  With Maven 2.0.7, it's possible that jaxp-ri will be placed
                  in front of woodstox on the classpath. If this happens, cxf
                  will not use woodstox, causing test failures (e.g.,
                  CxfBcProviderConsumerMtomTest). So, set these properties to
                  ensure woodstox is used.  Maven 2.0.9 doesn't require this
                  work-around since it consistently places jaxp-ri at the end
                  of the dependencies.
                -->
                <property>
                  <name>javax.xml.stream.XMLInputFactory</name>
                  <value>com.ctc.wstx.stax.WstxInputFactory</value>
                </property>
                <property>
                  <name>javax.xml.stream.XMLOutputFactory</name>
                  <value>com.ctc.wstx.stax.WstxOutputFactory</value>
                </property>
                <!--
                  To work around an issue with a couple of the security tests
                  we reorder the preference order of two of the jre's
                  Cryptography Package Providers defined in the master
                  security properties file.
                -->
                <property>
                  <name>java.security.properties</name>
                  <value>${basedir}/target/test-classes/ibm.security</value>
                </property>
                <!--
                  Turn down some of the logging to prevent the tests from
                  running too slowly.
                -->
                <property>
                  <name>log4j.configuration</name>
                  <value>${basedir}/target/test-classes/log4j-tests.properties</value>
                </property>
                <property>
                  <name>java.util.logging.config.file</name>
                  <value>${basedir}/target/test-classes/logging.properties</value>
                </property>
              </systemProperties>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
