<?xml version="1.0" encoding="UTF-8"?>
<!--
 Copyright (c) 2010-2012 EBM WebSourcing, 2012-2023 Linagora

 This program/library is free software: you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as published by
 the Free Software Foundation, either version 2.1 of the License, or (at your
 option) any later version.

 This program/library is distributed in the hope that it will be useful, but
 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
 for more details.

 You should have received a copy of the GNU Lesser General Public License
 along with this program/library; If not, see http://www.gnu.org/licenses/
 for the GNU Lesser General Public License version 2.1.
-->
<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>
      <artifactId>petals-cdkbased-components-parent</artifactId>
      <groupId>org.ow2.petals</groupId>
      <relativePath>../../cdk-based-parent/pom.xml</relativePath>
      <version>1.2.0</version>
   </parent>

   <name>Petals ESB - Components - BC Rest - Binding component</name>
   <artifactId>petals-bc-rest</artifactId>
   <groupId>org.ow2.petals</groupId>
   <version>2.4.0</version>
   <packaging>jbi-component</packaging>
   <description>petals-bc-rest Binding Component description</description>

   <properties>
      <jetty.version>9.4.11.v20180605</jetty.version>
      <jersey.version>2.33</jersey.version>
      <jackson.version>2.11.3</jackson.version>
      <grizzly.version>2.4.4</grizzly.version>
   </properties>

   <dependencyManagement>
      <dependencies>
         <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <!-- use a recent version of gson -->
            <version>2.8.0</version>
         </dependency>
         <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-bom</artifactId>
            <version>${jetty.version}</version>
            <type>pom</type>
            <scope>import</scope>
         </dependency>
         <dependency>
            <groupId>com.fasterxml.jackson</groupId>
            <artifactId>jackson-bom</artifactId>
            <!-- Conflicts between jjwt and jersey libs -->
            <version>${jackson.version}</version>
            <scope>import</scope>
            <type>pom</type>
         </dependency>
         <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <!-- it is not included in the bom -->
            <artifactId>jackson-annotations</artifactId>
            <!-- Conflicts between jjwt and jersey libs -->
            <version>${jackson.version}</version>
         </dependency>
         
         <!-- We include patch about Apache HTTP Client Async -->
         <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
            <version>4.4.14</version>
         </dependency>
         <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore-nio</artifactId>
            <version>4.4.14</version>
         </dependency>
         <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.5.13</version>
            <exclusions>
               <exclusion>
                  <!-- In petals we relies on slf4j and
                       its bridge which implements commons-logging -->
                  <groupId>commons-logging</groupId>
                  <artifactId>commons-logging</artifactId>
               </exclusion>
            </exclusions>
         </dependency>
         <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpmime</artifactId>
            <version>4.5.13</version>
            <exclusions>
               <exclusion>
                  <!-- In petals we relies on slf4j and
                       its bridge which implements commons-logging -->
                  <groupId>commons-logging</groupId>
                  <artifactId>commons-logging</artifactId>
               </exclusion>
            </exclusions>
         </dependency>
      </dependencies>
   </dependencyManagement>

   <dependencies>
      <dependency>
         <groupId>org.eclipse.jetty</groupId>
         <artifactId>jetty-server</artifactId>
      </dependency>
      <dependency>
         <groupId>org.eclipse.jetty</groupId>
         <artifactId>jetty-servlet</artifactId>
      </dependency>
      <dependency>
         <groupId>org.eclipse.jetty</groupId>
         <artifactId>jetty-continuation</artifactId>
      </dependency>
      <dependency>
         <groupId>org.eclipse.jetty</groupId>
         <artifactId>jetty-util</artifactId>
      </dependency>
      <dependency>
         <groupId>org.eclipse.jetty</groupId>
         <artifactId>jetty-http</artifactId>
      </dependency>
      <dependency>
         <groupId>javax.servlet</groupId>
         <artifactId>javax.servlet-api</artifactId>
         <version>3.1.0</version>
      </dependency>

      <dependency>
         <groupId>org.apache.httpcomponents</groupId>
         <artifactId>httpasyncclient</artifactId>
         <version>4.1.4</version>
         <exclusions>
            <exclusion>
               <!-- In petals we relies on slf4j and
                    its bridge which implements commons-logging -->
               <groupId>commons-logging</groupId>
               <artifactId>commons-logging</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>jcl-over-slf4j</artifactId>
      </dependency>
      <dependency>
         <groupId>org.apache.httpcomponents</groupId>
         <artifactId>httpcore</artifactId>
      </dependency>
      <dependency>
         <groupId>org.apache.httpcomponents</groupId>
         <artifactId>httpclient</artifactId>
      </dependency>
      <dependency>
         <groupId>org.apache.httpcomponents</groupId>
         <artifactId>httpmime</artifactId>
      </dependency>
      <dependency>
         <groupId>org.apache.httpcomponents</groupId>
         <artifactId>httpcore-nio</artifactId>
      </dependency>
      <dependency>
         <groupId>org.glassfish.jersey.core</groupId>
         <artifactId>jersey-common</artifactId>
         <version>${jersey.version}</version>
      </dependency>
      <dependency>
         <groupId>com.sun.activation</groupId>
         <artifactId>jakarta.activation</artifactId>
      </dependency>
      <dependency>
         <groupId>jakarta.xml.bind</groupId>
         <artifactId>jakarta.xml.bind-api</artifactId>
         <exclusions>
            <exclusion>
               <!-- Already included in com.sun.activation:jakarta.activation -->
               <groupId>jakarta.activation</groupId>
               <artifactId>jakarta.activation-api</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <dependency>
         <groupId>jakarta.xml.ws</groupId>
         <artifactId>jakarta.xml.ws-api</artifactId>
         <exclusions>
            <exclusion>
               <!-- Already included in com.sun.activation:jakarta.activation coming with CDK -->
               <groupId>jakarta.activation</groupId>
               <artifactId>jakarta.activation-api</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <dependency>
         <groupId>jakarta.ws.rs</groupId>
         <artifactId>jakarta.ws.rs-api</artifactId>
      </dependency>
      <dependency>
         <groupId>de.odysseus.staxon</groupId>
         <artifactId>staxon</artifactId>
         <version>1.3</version>
      </dependency>
      <!-- gson is considered the fastest for small files -->
      <!-- TODO reenable staxon-gson when https://github.com/beckchr/staxon/issues/38 is fixed -->
      <!-- dependency>
         <groupId>de.odysseus.staxon</groupId>
         <artifactId>staxon-gson</artifactId>
         <version>1.3</version>
         <scope>runtime</scope>
      </dependency-->

      <!-- Petals Component dependencies -->
      <dependency>
         <groupId>org.ow2.petals</groupId>
         <artifactId>petals-jbi</artifactId>
      </dependency>
      <dependency>
         <groupId>org.ow2.petals</groupId>
         <artifactId>petals-jbi-ext</artifactId>
      </dependency>
      <dependency>
         <groupId>org.ow2.petals</groupId>
         <artifactId>petals-commons-log</artifactId>
      </dependency>
      <dependency>
         <groupId>org.ow2.petals</groupId>
         <artifactId>petals-cdk-api</artifactId>
      </dependency>
      <dependency>
         <groupId>org.ow2.petals</groupId>
         <artifactId>petals-cdk-core</artifactId>
      </dependency>
      <dependency>
         <groupId>org.ow2.petals</groupId>
         <artifactId>petals-cdk-jbidescriptor</artifactId>
      </dependency>
      <dependency>
         <groupId>org.ow2.petals</groupId>
         <artifactId>petals-cdk-steplog</artifactId>
      </dependency>
      <dependency>
         <groupId>org.ow2.petals</groupId>
         <artifactId>petals-cdk-junit</artifactId>
      </dependency>
      <dependency>
         <groupId>org.ow2.petals</groupId>
         <artifactId>petals-cdk-test-utils</artifactId>
      </dependency>
      <dependency>
         <groupId>org.ow2.petals</groupId>
         <artifactId>petals-message-exchange</artifactId>
         <scope>test</scope>
         <version>1.4.0</version>
      </dependency>
      <dependency>
         <groupId>commons-io</groupId>
         <artifactId>commons-io</artifactId>
         <version>2.11.0</version>
      </dependency>
      <dependency>
         <groupId>org.ow2.easycommons</groupId>
         <artifactId>easycommons-lang</artifactId>
      </dependency>
      <dependency>
         <groupId>org.ow2.easycommons</groupId>
         <artifactId>easycommons-util</artifactId>
      </dependency>
      <dependency>
         <groupId>org.ow2.easycommons</groupId>
         <artifactId>easycommons-stream</artifactId>
      </dependency>
      <dependency>
         <groupId>org.ow2.easycommons</groupId>
         <artifactId>easycommons-uuid</artifactId>
      </dependency>
      <dependency>
         <groupId>org.ow2.easycommons</groupId>
         <artifactId>easycommons-properties</artifactId>
      </dependency>
      <dependency>
         <groupId>org.ow2.easycommons</groupId>
         <artifactId>easycommons-json</artifactId>
         <version>1.2.0</version>
      </dependency>
      <dependency>
         <groupId>org.ow2.easywsdl</groupId>
         <artifactId>easywsdl-wsdl</artifactId>
      </dependency>
      <dependency>
         <groupId>org.ow2.easywsdl</groupId>
         <artifactId>easywsdl-ext-wsdl4complexwsdl</artifactId>
      </dependency>
      <dependency>
         <groupId>com.sun.mail</groupId>
         <artifactId>jakarta.mail</artifactId>
      </dependency>
      <dependency>
         <!--
            This dependency is used directly in this project by unit test but it is needed
            at runtime by CDK core, so its scope must be 'provided' (by Petals ESB Container
            bootstrap classloader) instead of 'test'
          -->
         <groupId>org.jvnet.jaxb2_commons</groupId>
         <artifactId>jaxb2-basics-runtime</artifactId>
         <scope>provided</scope>
      </dependency>
      <dependency>
         <groupId>io.jsonwebtoken</groupId>
         <artifactId>jjwt</artifactId>
         <version>0.9.1</version>
      </dependency>
      <dependency>
         <groupId>org.bouncycastle</groupId>
         <artifactId>bcprov-jdk15on</artifactId>
         <version>1.69</version>
      </dependency>
 
      <dependency>
         <groupId>org.ow2.petals</groupId>
         <artifactId>petals-junit-inmemoryloghandler</artifactId>
      </dependency>
      <dependency>
         <groupId>org.glassfish.jersey.core</groupId>
         <artifactId>jersey-server</artifactId>
         <version>${jersey.version}</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.glassfish.jersey.core</groupId>
         <artifactId>jersey-client</artifactId>
         <version>${jersey.version}</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.glassfish.jersey.media</groupId>
         <artifactId>jersey-media-multipart</artifactId>
         <version>${jersey.version}</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.glassfish.jersey.media</groupId>
         <artifactId>jersey-media-jaxb</artifactId>
         <version>${jersey.version}</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.glassfish.jersey.containers</groupId>
         <artifactId>jersey-container-grizzly2-http</artifactId>
         <version>${jersey.version}</version>
         <scope>test</scope>
      </dependency>
      <dependency>
          <groupId>org.glassfish.jersey.inject</groupId>
          <artifactId>jersey-hk2</artifactId>
          <version>${jersey.version}</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.glassfish.grizzly</groupId>
         <artifactId>grizzly-http-server</artifactId>
         <version>${grizzly.version}</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.glassfish.grizzly</groupId>
         <artifactId>grizzly-framework</artifactId>
         <version>${grizzly.version}</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.glassfish.jersey.media</groupId>
         <artifactId>jersey-media-json-jackson</artifactId>
         <scope>test</scope>
         <version>${jersey.version}</version>
         <exclusions>
            <exclusion>
               <!-- Already included in com.sun.activation:jakarta.activation coming with CDK -->
               <groupId>jakarta.activation</groupId>
               <artifactId>jakarta.activation-api</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <dependency>
         <groupId>com.fasterxml.jackson.core</groupId>
         <artifactId>jackson-annotations</artifactId>
         <!-- Scope set to compile because used explicitly in unit tests, and is required at runtime -->
      </dependency>
      <dependency>
         <groupId>org.apache.mina</groupId>
         <artifactId>mina-core</artifactId>
         <version>2.1.4</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>jakarta.validation</groupId>
         <artifactId>jakarta.validation-api</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>jakarta.annotation</groupId>
         <artifactId>jakarta.annotation-api</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <!-- This dependency is required by staxon-gson with scope 'runtime', and by unit
              test. So it is needed to set its scope to 'runtime' -->
         <groupId>com.google.code.gson</groupId>
         <artifactId>gson</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.awaitility</groupId>
         <artifactId>awaitility</artifactId>
      </dependency>
   </dependencies>

   <build>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
               <execution>
                  <id>analyze</id>
                  <configuration>
                     <usedDependencies>
                        <!-- Required by unit test runtime -->
                        <usedDependency>org.glassfish.jersey.media:jersey-media-json-jackson</usedDependency>
                        <usedDependency>org.glassfish.jersey.media:jersey-media-jaxb</usedDependency>
                        <usedDependency>org.glassfish.jersey.inject:jersey-hk2</usedDependency>
                        <!-- runtime -->
                        <!-- usedDependency>de.odysseus.staxon:staxon-gson</usedDependency-->
                     </usedDependencies>
                  </configuration>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.jvnet.jaxb2.maven2</groupId>
            <artifactId>maven-jaxb2-plugin</artifactId>
            <executions>
               <execution>
                  <id>generate</id>
                  <goals>
                     <goal>generate</goal>
                  </goals>
                  <phase>generate-test-sources</phase>
                  <configuration>
                     <addCompileSourceRoot>false</addCompileSourceRoot>
                     <addTestCompileSourceRoot>true</addTestCompileSourceRoot>
                     <schemaDirectory>${basedir}/src/test/resources/su/</schemaDirectory>
                     <schemaIncludes>
                        <include>ged/ged.wsdl</include>
                        <include>ged/ged-auth.wsdl</include>
                        <include>text/text.wsdl</include>
                        <include>school-cafeteria/school-cafeteria.wsdl</include>
                        <include>placeholders/placeholders.wsdl</include>
                     </schemaIncludes>
                     <generateDirectory>${project.build.directory}/generated-test-sources/xjc</generateDirectory>
                  </configuration>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>${maven-javadoc-plugin.version}</version>
            <executions>
               <execution>
                  <id>attach-test-javadocs</id>
                  <goals>
                     <goal>test-jar</goal>
                  </goals>
                  <configuration>
                     <excludePackageNames>org.city.administrative_procedures.school_cafeteria_registration._1,org.ow2.petals.bc.rest.unit_test.*,org.ow2.petals.tests.unit.placeholders._1</excludePackageNames>
                  </configuration>
               </execution>
            </executions>
         </plugin>
      </plugins>
   </build>

   <scm>
      <connection>scm:svn:https://svn.petalslink.org/svnroot/tags/petals-bc-rest-2.4.0</connection>
      <developerConnection>scm:svn:https://svn.petalslink.org/svnroot/tags/petals-bc-rest-2.4.0</developerConnection>
   </scm>
</project>
