<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ ***** BEGIN LICENSE BLOCK *****
  ~ Version: MPL 1.1/GPL 2.0/LGPL 2.1
  ~
  ~ The contents of this file are subject to the Mozilla Public License Version
  ~ 1.1 (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.mozilla.org/MPL/
  ~
  ~ Software distributed under the License is distributed on an "AS IS" basis,
  ~ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  ~ for the specific language governing rights and limitations under the
  ~ License.
  ~
  ~ The Original Code is part of dcm4che, an implementation of DICOM(TM) in
  ~ Java(TM), hosted at https://github.com/dcm4che.
  ~
  ~ The Initial Developer of the Original Code is
  ~ J4Care.
  ~ Portions created by the Initial Developer are Copyright (C) 2015-2018
  ~ the Initial Developer. All Rights Reserved.
  ~
  ~ Contributor(s):
  ~ See @authors listed below
  ~
  ~ Alternatively, the contents of this file may be used under the terms of
  ~ either the GNU General Public License Version 2 or later (the "GPL"), or
  ~ the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  ~ in which case the provisions of the GPL or the LGPL are applicable instead
  ~ of those above. If you wish to allow use of your version of this file only
  ~ under the terms of either the GPL or the LGPL, and not to allow others to
  ~ use your version of this file under the terms of the MPL, indicate your
  ~ decision by deleting the provisions above and replace them with the notice
  ~ and other provisions required by the GPL or the LGPL. If you do not delete
  ~ the provisions above, a recipient may use your version of this file under
  ~ the terms of any one of the MPL, the GPL or the LGPL.
  ~
  ~ ***** END LICENSE BLOCK *****
  ~
  -->

<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/xsd/maven-4.0.0.xsd">
  <parent>
    <artifactId>dcm4che-parent</artifactId>
    <groupId>org.dcm4che</groupId>
    <version>5.29.2</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <artifactId>dcm4che-xdsi</artifactId>
  <packaging>bundle</packaging>

  <dependencies>
    <dependency>
      <groupId>org.dcm4che</groupId>
      <artifactId>dcm4che-core</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <!-- used to pull correct dependencies for jaxws-tools-maven-plugin  -->
    <dependency>
      <groupId>org.jboss.ws.cxf</groupId>
      <artifactId>jbossws-cxf-client</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-frontend-simple</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>gnu.getopt</groupId>
      <artifactId>java-getopt</artifactId>
      <version>1.0.13</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.17</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
      </plugin>
      <plugin>
        <groupId>org.jboss.ws.plugins</groupId>
        <artifactId>jaxws-tools-maven-plugin</artifactId>
        <configuration>
          <extension>true</extension>
          <verbose>true</verbose>
          <target>2.2</target>
          <endpointClass/>
          <!-- some JDK implementations forbid file access for external schema,
               see http://docs.oracle.com/javase/8/docs/api/javax/xml/XMLConstants.html#ACCESS_EXTERNAL_SCHEMA -->
          <argLine>-Djavax.xml.accessExternalDTD=all -Djavax.xml.accessExternalSchema=all</argLine>
          <fork>true</fork>
          <targetPackage>org.dcm4che3.xdsi</targetPackage>
        </configuration>
        <executions>
          <execution>
            <id>ImagingDocumentSource</id>
            <goals>
              <goal>wsconsume</goal>
            </goals>
            <configuration>
              <wsdls>
                <wsdl>${basedir}/src/main/resources/wsdl/XDS-I.b_ImagingDocumentSource.wsdl</wsdl>
              </wsdls>
              <wsdlLocation>/wsdl/XDS-I.b_ImagingDocumentSource.wsdl</wsdlLocation>
            </configuration>
          </execution>
          <execution>
            <id>DocumentRepository</id>
            <goals>
              <goal>wsconsume</goal>
            </goals>
            <configuration>
              <wsdls>
                <wsdl>${basedir}/src/main/resources/wsdl/XDS.b_DocumentRepository.wsdl</wsdl>
              </wsdls>
              <wsdlLocation>/wsdl/XDS.b_DocumentRepository.wsdl</wsdlLocation>
            </configuration>
          </execution>
        </executions>
      </plugin>

    </plugins>

  </build>

</project>