<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">
  <modelVersion>4.0.0</modelVersion>
  <artifactId>symphony-java-client-bindings</artifactId>
  <packaging>jar</packaging>
  <name>Symphony Java Client Bindings</name>
  <version>4.54.3</version>

  <parent>
    <groupId>com.github.deutschebank.symphony</groupId>
    <artifactId>symphony-java-client-parent</artifactId>
    <version>4.54.3</version>
  </parent>

  <developers>
    <developer>
      <name>Rob Moffat</name>
      <email>robert.moffat@db.com</email>
    </developer>
  </developers>

  <properties>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
  </properties>

  <build>
    <plugins>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>3.0.0</version>
        <executions>
          <execution>
            <id>add-source</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>${project.build.directory}/generated-sources/swagger/</source>
                <source>src/provided/java</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.0.0-M3</version>
        <configuration>
          <systemPropertyVariables>
            <symphony-develop-bot1-identity>${symphony-develop-bot1-identity}</symphony-develop-bot1-identity>
            <symphony-develop-bot2-identity>${symphony-develop-bot2-identity}</symphony-develop-bot2-identity>
            <proxy>${symphony-proxy}</proxy>
          </systemPropertyVariables>
        </configuration>
      </plugin>

      <plugin>
        <groupId>io.swagger.codegen.v3</groupId>
        <artifactId>swagger-codegen-maven-plugin</artifactId>
        <version>3.0.8</version>
        <configuration>
          <language>jaxrs-cxf-client</language>
          <supportingFilesToGenerate></supportingFilesToGenerate>
          <generateSupportingFiles>false</generateSupportingFiles>
          <generateModelTests>false</generateModelTests>
          <generateApiTests>false</generateApiTests>
          <generateApis>true</generateApis>
          <interfaceOnly>true</interfaceOnly>
          <configOptions>
            <sourceFolder>/</sourceFolder>
          </configOptions>
          <modelPackage>com.symphony.api.model</modelPackage>

        </configuration>
        <executions>
          <execution>
            <id>agent</id>
            <goals>
              <goal>generate</goal>
            </goals>
            <configuration>
              <inputSpec>${project.basedir}/src/main/resources/agent-api-public.yaml</inputSpec>
              <apiPackage>com.symphony.api.agent</apiPackage>
            </configuration>
          </execution>
          <execution>
            <id>authentication</id>
            <goals>
              <goal>generate</goal>
            </goals>
            <configuration>
              <inputSpec>${project.basedir}/src/main/resources/authenticator-api-public.yaml</inputSpec>
              <apiPackage>com.symphony.api.authenticator</apiPackage>
            </configuration>
          </execution>
          <execution>
            <id>login</id>
            <goals>
              <goal>generate</goal>
            </goals>
            <configuration>
              <inputSpec>${project.basedir}/src/main/resources/login-api-public.yaml</inputSpec>
              <apiPackage>com.symphony.api.login</apiPackage>
            </configuration>
          </execution>
          <execution>
            <id>pod</id>
            <goals>
              <goal>generate</goal>
            </goals>
            <configuration>
              <inputSpec>${project.basedir}/src/main/resources/pod-api-public.yaml</inputSpec>
              <apiPackage>com.symphony.api.pod</apiPackage>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>com.google.code.maven-replacer-plugin</groupId>
        <artifactId>replacer</artifactId>
        <version>1.5.3</version>
        <executions>
          <execution>
            <phase>process-sources</phase>
            <goals>
              <goal>replace</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <basedir>${project.build.directory}/generated-sources/swagger</basedir>
          <includes>
            <include>**/*.java</include>
          </includes>
          <unescape>true</unescape>
          <replacements>
            <replacement>
              <token>Attachment\s</token>
              <value xml:space="preserve">Object </value>
            </replacement>
            <replacement>
              <!-- added this due to namespace collision on the AuthenticateRequest object -->
              <token>v1AuthenticateExtensionAppPost\(AuthenticateRequest\sbody\)</token>
              <value xml:space="preserve">v1AuthenticateExtensionAppPost(AppAuthenticateRequest body)</value>
            </replacement>
            <replacement>
              <!-- added this due to namespace collision on the AuthenticateRequest object -->
              <token>import\scom\.symphony\.api\.model\.AuthenticateRequest;</token>
              <value xml:space="preserve">import com.symphony.api.model.AppAuthenticateRequest;
import com.symphony.api.model.AuthenticateRequest;
							</value>
            </replacement>
          </replacements>
        </configuration>
      </plugin>
    </plugins>

    <pluginManagement>
    	<plugins>
    		<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
    		<plugin>
    			<groupId>org.eclipse.m2e</groupId>
    			<artifactId>lifecycle-mapping</artifactId>
    			<version>1.0.0</version>
    			<configuration>
    				<lifecycleMappingMetadata>
    					<pluginExecutions>
    						<pluginExecution>
    							<pluginExecutionFilter>
    								<groupId>
    									com.google.code.maven-replacer-plugin
    								</groupId>
    								<artifactId>replacer</artifactId>
    								<versionRange>
    									[1.5.3,)
    								</versionRange>
    								<goals>
    									<goal>replace</goal>
    								</goals>
    							</pluginExecutionFilter>
    							<action>
    								<ignore></ignore>
    							</action>
    						</pluginExecution>
    						<pluginExecution>
    							<pluginExecutionFilter>
    								<groupId>
    									io.swagger.codegen.v3
    								</groupId>
    								<artifactId>
    									swagger-codegen-maven-plugin
    								</artifactId>
    								<versionRange>
    									[3.0.8,)
    								</versionRange>
    								<goals>
    									<goal>generate</goal>
    								</goals>
    							</pluginExecutionFilter>
    							<action>
    								<ignore></ignore>
    							</action>
    						</pluginExecution>
    					</pluginExecutions>
    				</lifecycleMappingMetadata>
    			</configuration>
    		</plugin>
    	</plugins>
    </pluginManagement>
  </build>

  <dependencies>
    <dependency>
      <groupId>io.swagger.core.v3</groupId>
      <artifactId>swagger-jaxrs2</artifactId>
      <scope>compile</scope>
      <version>2.0.8</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.jaxrs</groupId>
      <artifactId>jackson-jaxrs-json-provider</artifactId>
      <version>2.9.8</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>jakarta.ws.rs</groupId>
      <artifactId>jakarta.ws.rs-api</artifactId>
      <version>2.1.5</version>
      <scope>compile</scope>
    </dependency>


    <!-- Apache CXF Example -->
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-rs-client</artifactId>
      <version>3.3.1</version>
      <scope>provided</scope>
    </dependency>


    <!-- Jersey Client Example -->
    <dependency>
      <groupId>org.glassfish.jersey.core</groupId>
      <artifactId>jersey-client</artifactId>
      <version>2.28</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.inject</groupId>
      <artifactId>jersey-hk2</artifactId>
      <version>2.28</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.media</groupId>
      <artifactId>jersey-media-json-jackson</artifactId>
      <version>2.28</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.connectors</groupId>
      <artifactId>jersey-apache-connector</artifactId>
      <version>2.28</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.media</groupId>
      <artifactId>jersey-media-multipart</artifactId>
      <version>2.28</version>
      <scope>provided</scope>
    </dependency>

    <!-- testing dependencies -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.github.deutschebank.symphony</groupId>
      <artifactId>symphony-java-client-identity</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>

    <!-- Used by the IOI example -->
    <dependency>
      <groupId>org.quickfixj</groupId>
      <artifactId>quickfixj-core</artifactId>
      <version>1.6.4</version>
      <scope>test</scope>
    </dependency>
  </dependencies>



</project>
