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

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

  <parent>
    <groupId>org.apache.camel</groupId>
    <artifactId>components</artifactId>
    <version>2.20.2</version>
  </parent>

  <artifactId>camel-spring-ws</artifactId>
  <packaging>jar</packaging>
  <name>Camel :: Spring Web Services</name>
  <description>Camel support for Spring Web Services</description>

  <properties>
    <camel.osgi.import.before.defaults>
      org.springframework.beans.*;version="${spring-version-range}",
      org.springframework.util.*;version="${spring-version-range}"
    </camel.osgi.import.before.defaults>
    <camel.osgi.export.pkg>org.apache.camel.component.spring.ws.*</camel.osgi.export.pkg>
    <camel.osgi.export.service>org.apache.camel.spi.ComponentResolver;component=spring-ws</camel.osgi.export.service>
  </properties>

  <dependencies>

    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-spring</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <version>${javax.servlet-api-version}</version>
      <scope>provided</scope>
    </dependency>

    <!-- spring -->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
      <version>${spring-version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework.ws</groupId>
      <artifactId>spring-ws-core</artifactId>
      <version>${spring-ws-version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework.ws</groupId>
      <artifactId>spring-ws-support</artifactId>
      <version>${spring-ws-version}</version>
    </dependency>

    <!-- test dependencies -->
    <dependency>
      <groupId>org.springframework.ws</groupId>
      <artifactId>spring-ws-security</artifactId>
      <version>${spring-ws-version}</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>xalan</groupId>
          <artifactId>xalan</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-server</artifactId>
      <version>${jetty-version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-security</artifactId>
      <version>${jetty-version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-servlet</artifactId>
      <version>${jetty-version}</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>javax.servlet</groupId>
          <artifactId>servlet-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework.ws</groupId>
      <artifactId>spring-ws-test</artifactId>
      <version>${spring-ws-version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-test-spring</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-jaxb</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>commons-httpclient</groupId>
      <artifactId>commons-httpclient</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>net.javacrumbs</groupId>
      <artifactId>smock-springws</artifactId>
      <version>0.5</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.easytesting</groupId>
      <artifactId>fest-assert</artifactId>
      <version>1.4</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>  
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-api</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-slf4j-impl</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>net.javacrumbs</groupId>
      <artifactId>spring-ws-test</artifactId>
      <version>${javacrumbs-version}</version>
      <exclusions>
        <exclusion>
          <groupId>xmlunit</groupId>
          <artifactId>xmlunit</artifactId>
        </exclusion>
      </exclusions>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <profiles>
    <profile>
      <id>java9</id>
      <activation>
        <jdk>9</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <argLine>--patch-module java.xml.bind=${project.basedir}/target/java9/stax-ex-1.7.8.jar  --patch-module java.xml.ws=${project.basedir}/target/java9/saaj-impl-1.3.28.jar --patch-module java.xml.ws.annotation=${project.basedir}/target/java9/javax.annotation-api-1.2.jar ${camel.surefire.fork.vmargs} --add-exports=java.xml/com.sun.org.apache.xerces.internal.dom=java.xml.ws --add-exports=java.xml.bind/org.jvnet.staxex.util=java.xml.ws</argLine>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <version>2.10</version>
            <executions>
              <execution>
                <id>copy</id>
                <phase>validate</phase>
                <goals>
                  <goal>copy</goal>
                </goals>
                <configuration>
                  <artifactItems>
                    <artifactItem>
                      <groupId>org.jvnet.staxex</groupId>
                      <artifactId>stax-ex</artifactId>
                      <version>1.7.8</version>
                      <type>jar</type>
                      <overWrite>false</overWrite>
                      <outputDirectory>${project.basedir}/target/java9</outputDirectory>
                    </artifactItem>
                    <artifactItem>
                      <groupId>javax.annotation</groupId>
                      <artifactId>javax.annotation-api</artifactId>
                      <version>1.2</version>
                      <type>jar</type>
                      <overWrite>false</overWrite>
                      <outputDirectory>${project.basedir}/target/java9</outputDirectory>
                    </artifactItem>
                    <artifactItem>
                      <groupId>com.sun.xml.messaging.saaj</groupId>
                      <artifactId>saaj-impl</artifactId>
                      <version>1.3.28</version>
                      <type>jar</type>
                      <overWrite>false</overWrite>
                      <outputDirectory>${project.basedir}/target/java9</outputDirectory>
                    </artifactItem>
                  </artifactItems>
                  <overWriteReleases>false</overWriteReleases>
                  <overWriteSnapshots>true</overWriteSnapshots>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
