<?xml version="1.0" encoding="UTF-8"?>
<!--
 Copyright (c) 2010-2012 EBM WebSourcing, 2012-2020 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/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.1.0.2</version>
   </parent>

   <name>Petals ESB - Components - BC Rest - Binding component</name>
   <artifactId>petals-bc-rest</artifactId>
   <groupId>org.ow2.petals</groupId>
   <version>2.2.2</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.25.1</jersey.version>
      <jackson.version>2.8.10</jackson.version>
      <grizzly.version>2.3.28</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.8</version>
         </dependency>
         <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore-nio</artifactId>
            <version>4.4.8</version>
         </dependency>
         
         <dependency>
            <!-- org.awaitility:awaitility and org.ow2.petals:petals-cdk-junit use different versions of org.objenesis:objenesis, we for the use of version 2.6 -->
            <groupId>org.objenesis</groupId>
            <artifactId>objenesis</artifactId>
            <version>2.6</version>
         </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.3</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>
         <version>4.5.3</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.3</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>httpcore-nio</artifactId>
      </dependency>
      <dependency>
         <groupId>org.glassfish.jersey.core</groupId>
         <artifactId>jersey-common</artifactId>
         <version>${jersey.version}</version>
      </dependency>
      <dependency>
         <groupId>javax.ws.rs</groupId>
         <artifactId>javax.ws.rs-api</artifactId>
         <version>2.0.1</version>
      </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>commons-io</groupId>
         <artifactId>commons-io</artifactId>
         <version>2.6</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.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>javax.mail</artifactId>
	 <exclusions>
	    <exclusion>
               <groupId>javax.activation</groupId>
               <artifactId>activation</artifactId>
	    </exclusion>
	 </exclusions>
      </dependency>
      <dependency>
         <groupId>org.jvnet.jaxb2_commons</groupId>
         <artifactId>jaxb2-basics-runtime</artifactId>
         <!-- Needed for test compilation, but also used by other dependencies, so scope set to 'compilation' instead of 'test' -->
      </dependency>
      <dependency>
         <groupId>io.jsonwebtoken</groupId>
         <artifactId>jjwt</artifactId>
         <version>0.7.0</version>
      </dependency>
      <dependency>
         <groupId>org.bouncycastle</groupId>
         <artifactId>bcprov-jdk15on</artifactId>
         <version>1.58</version>
      </dependency>
 
      <dependency>
         <groupId>org.ow2.petals</groupId>
         <artifactId>petals-junit-external-resources</artifactId>
         <scope>test</scope>
      </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.media</groupId>
         <artifactId>jersey-media-multipart</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.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>
      </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.0.4</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>javax.validation</groupId>
         <artifactId>validation-api</artifactId>
         <version>1.1.0.Final</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>javax.annotation</groupId>
         <artifactId>javax.annotation-api</artifactId>
         <version>1.2</version>
         <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>
         <version>3.1.0</version>
         <scope>test</scope>
      </dependency>
   </dependencies>

   <build>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
               <execution>
                  <id>analyze</id>
                  <configuration>
                     <usedDependencies>
                        <!-- Annotation coming with jersey-media-json-jackson are used -->
                        <usedDependency>org.glassfish.jersey.media:jersey-media-json-jackson</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>
      </plugins>
   </build>

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