<?xml version="1.0"?>
<!--
    Copyright 2017 Nokia Corporation.

    Licensed 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/xsd/maven-4.0.0.xsd">
  <parent>
    <groupId>org.onap.vfc.nfvo.driver.vnfm.svnfm.nokiav2</groupId>
    <artifactId>vfc-nfvo-driver-vnfm-svnfm-nokiav2</artifactId>
    <version>1.2.0-SNAPSHOT</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.onap.vfc.nfvo.driver.vnfm.svnfm.nokiav2</groupId>
  <artifactId>vfc-nfvo-driver-vnfm-svnfm-nokiav2-clients</artifactId>
  <version>1.2.0-SNAPSHOT</version>
  <packaging>jar</packaging>
  <name>vfc/nfvo/driver/vnfm/svnfm/nokiav2/generatedapis</name>
  <properties>
    <gson-fire-version>1.8.2</gson-fire-version>
    <retrofit-version>2.3.0</retrofit-version>
    <rxjava-version>2.0.0</rxjava-version>
    <threetenbp-version>1.3.5</threetenbp-version>
    <oltu-version>1.0.1</oltu-version>
    <swagger-core-version>1.5.15</swagger-core-version>
  </properties>
  <build>
    <plugins>
<!--
Release AAI 
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>unpack</id>
            <phase>pre</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.onap.aai.aai-common</groupId>
                  <artifactId>aai-schema</artifactId>
                  <version>1.2.0</version>
                  <type>jar</type>
                  <destFileName>aai.json</destFileName>
                  <includes>**/aai_swagger_v11.yaml</includes>
                </artifactItem>
              </artifactItems>
              <outputDirectory>${project.basedir}/src/main/resources</outputDirectory>
              <overWriteReleases>true</overWriteReleases>
              <overWriteSnapshots>true</overWriteSnapshots>
            </configuration>
          </execution>
        </executions>
      </plugin>
-->
      <plugin>
        <groupId>io.swagger</groupId>
        <artifactId>swagger-codegen-maven-plugin</artifactId>
        <version>2.3.1</version>
        <executions>
          <execution>
            <id>cbamlcm</id>
            <goals>
              <goal>generate</goal>
            </goals>
            <configuration>
              <inputSpec>${basedir}/src/main/resources/nokia.vnfm.api.v3.lcm.json</inputSpec>
              <language>java</language>
              <library>retrofit2</library>
              <output>${project.build.directory}/generated-sources/cbam</output>
              <apiPackage>com.nokia.cbam.lcm.v32.api</apiPackage>
              <modelPackage>com.nokia.cbam.lcm.v32.model</modelPackage>
              <configOptions>
                <jackson>true</jackson>
                <sourceFolder>src/gen/java/main</sourceFolder>
                <withXml>true</withXml>
                <useRxJava2>true</useRxJava2>
              </configOptions>
            </configuration>
          </execution>
          <execution>
            <id>sov2</id>
            <goals>
              <goal>generate</goal>
            </goals>
            <configuration>
              <inputSpec>${basedir}/src/main/resources/so.vnfm.v2.json</inputSpec>
              <language>java</language>
              <library>retrofit2</library>
              <output>${project.build.directory}/generated-sources/sov2</output>
              <apiPackage>org.onap.vnfmadapter.so.v2.api</apiPackage>
              <modelPackage>org.onap.vnfmadapter.so.v2.model</modelPackage>
              <configOptions>
                <jackson>true</jackson>
                <sourceFolder>src/gen/java/main</sourceFolder>
                <withXml>true</withXml>
                <useRxJava2>true</useRxJava2>
              </configOptions>
            </configuration>
          </execution>
<!--
          <execution>
            <id>so</id>
            <goals>
              <goal>generate</goal>
            </goals>
            <configuration>
              <inputSpec>${basedir}/src/main/resources/so.vnfm.json</inputSpec>
              <language>java</language>
              <library>retrofit2</library>
              <output>${project.build.directory}/generated-sources/so</output>
              <apiPackage>org.onap.vnfmadapter.so.api</apiPackage>
              <modelPackage>org.onap.vnfmadapter.so.model</modelPackage>
              <configOptions>
                <jackson>true</jackson>
                <sourceFolder>src/gen/java/main</sourceFolder>
                <withXml>true</withXml>
                <useRxJava2>true</useRxJava2>
              </configOptions>
            </configuration>
          </execution>
-->
          <execution>
            <id>msb</id>
            <goals>
              <goal>generate</goal>
            </goals>
            <configuration>
              <inputSpec>${basedir}/src/main/resources/msb.json</inputSpec>
              <language>java</language>
              <library>retrofit2</library>
              <output>${project.build.directory}/generated-sources/msb</output>
              <apiPackage>org.onap.msb.api</apiPackage>
              <modelPackage>org.onap.msb.model</modelPackage>
              <configOptions>
                <generateSupportingFiles>false</generateSupportingFiles>
                <sourceFolder>src/gen/java/main</sourceFolder>
                <withXml>true</withXml>
                <useRxJava2>true</useRxJava2>
              </configOptions>
            </configuration>
          </execution>
          <execution>
            <id>aai</id>
            <goals>
              <goal>generate</goal>
            </goals>
            <configuration>
              <inputSpec>${basedir}/src/main/resources/aai.yaml</inputSpec>
              <language>java</language>
              <library>retrofit2</library>
              <output>${project.build.directory}/generated-sources/aai</output>
              <apiPackage>org.onap.aai.api</apiPackage>
              <modelPackage>org.onap.aai.model</modelPackage>
              <configOptions>
                <generateSupportingFiles>false</generateSupportingFiles>
                <sourceFolder>src/gen/java/main</sourceFolder>
                <withXml>true</withXml>
                <useRxJava2>true</useRxJava2>
              </configOptions>
            </configuration>
          </execution>
          <execution>
            <id>cbamlcn</id>
            <goals>
              <goal>generate</goal>
            </goals>
            <configuration>
              <inputSpec>${basedir}/src/main/resources/nokia.vnfm.api.v3.lcn.subscription.json</inputSpec>
              <language>java</language>
              <library>retrofit2</library>
              <output>${project.build.directory}/generated-sources/cbam</output>
              <apiPackage>com.nokia.cbam.lcn.v32.api</apiPackage>
              <modelPackage>com.nokia.cbam.lcn.v32.model</modelPackage>
              <configOptions>
                <generateSupportingFiles>false</generateSupportingFiles>
                <sourceFolder>src/gen/java/main</sourceFolder>
                <withXml>true</withXml>
                <useRxJava2>true</useRxJava2>
              </configOptions>
            </configuration>
          </execution>
          <execution>
            <id>cbamcatalog</id>
            <goals>
              <goal>generate</goal>
            </goals>
            <configuration>
              <inputSpec>${basedir}/src/main/resources/nokia.catalog.json</inputSpec>
              <language>java</language>
              <library>retrofit2</library>
              <output>${project.build.directory}/generated-sources/cbam</output>
              <apiPackage>com.nokia.cbam.catalog.v1.api</apiPackage>
              <modelPackage>com.nokia.cbam.catalog.v1.model</modelPackage>
              <configOptions>
                <generateSupportingFiles>false</generateSupportingFiles>
                <sourceFolder>src/gen/java/main</sourceFolder>
                <withXml>true</withXml>
                <useRxJava2>true</useRxJava2>
              </configOptions>
            </configuration>
          </execution>
          <execution>
            <id>catalog</id>
            <goals>
              <goal>generate</goal>
            </goals>
            <configuration>
              <inputSpec>${basedir}/src/main/resources/vfc.catalog.swagger.json</inputSpec>
              <language>java</language>
              <library>retrofit2</library>
              <output>${project.build.directory}/generated-sources/vfccatalog</output>
              <apiPackage>org.onap.vfccatalog.api</apiPackage>
              <modelPackage>org.onap.vfccatalog.model</modelPackage>
              <configOptions>
                <generateSupportingFiles>false</generateSupportingFiles>
                <sourceFolder>src/gen/java/main</sourceFolder>
                <withXml>true</withXml>
                <useRxJava2>true</useRxJava2>
              </configOptions>
            </configuration>
          </execution>
          <execution>
            <id>svnfm</id>
            <goals>
              <goal>generate</goal>
            </goals>
            <configuration>
              <inputSpec>${basedir}/src/main/resources/vfc.vnfdriver.swagger.json</inputSpec>
              <language>java</language>
              <library>retrofit2</library>
              <output>${project.build.directory}/generated-sources/vnfmdriver</output>
              <apiPackage>org.onap.vnfmdriver.api</apiPackage>
              <modelPackage>org.onap.vnfmdriver.model</modelPackage>
              <configOptions>
                <generateSupportingFiles>false</generateSupportingFiles>
                <sourceFolder>src/gen/java/main</sourceFolder>
                <withXml>true</withXml>
                <useRxJava2>true</useRxJava2>
              </configOptions>
            </configuration>
          </execution>
          <!--
          <execution>
            <id>aai</id>
            <goals>
              <goal>generate</goal>
            </goals>
            <configuration>
              <inputSpec>${basedir}/src/main/resources/aai_swagger_yaml/aai_swagger_v11.yaml</inputSpec>
              <language>java</language>
              <library>retrofit2</library>
              <output>${project.build.directory}/generated-sources/aai</output>
              <apiPackage>org.onap.aai.api</apiPackage>
              <modelPackage>org.onap.aai.model</modelPackage>
              <configOptions>
                <generateSupportingFiles>false</generateSupportingFiles>
                <sourceFolder>src/gen/java/main</sourceFolder>
                <withXml>true</withXml>
                <useRxJava2>true</useRxJava2>
              </configOptions>
            </configuration>
          </execution>
-->
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-patch-plugin</artifactId>
        <version>1.2</version>
        <configuration>
          <targetDirectory>${project.build.directory}/generated-sources</targetDirectory>
          <skipApplication>false</skipApplication>
        </configuration>
        <executions>
          <execution>
            <id>bugfix-patches</id>
            <configuration>
              <patchFile>src/main/resources/patch</patchFile>
              <strip>1</strip>
            </configuration>
            <phase>process-sources</phase>
            <goals>
              <goal>apply</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.7.0</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>io.swagger</groupId>
      <artifactId>swagger-annotations</artifactId>
      <version>${swagger-core-version}</version>
    </dependency>
    <dependency>
      <groupId>com.squareup.retrofit2</groupId>
      <artifactId>converter-gson</artifactId>
      <version>${retrofit-version}</version>
    </dependency>
    <dependency>
      <groupId>com.squareup.retrofit2</groupId>
      <artifactId>retrofit</artifactId>
      <version>${retrofit-version}</version>
    </dependency>
    <dependency>
      <groupId>com.squareup.retrofit2</groupId>
      <artifactId>converter-scalars</artifactId>
      <version>${retrofit-version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.oltu.oauth2</groupId>
      <artifactId>org.apache.oltu.oauth2.client</artifactId>
      <version>${oltu-version}</version>
    </dependency>
    <dependency>
      <groupId>io.gsonfire</groupId>
      <artifactId>gson-fire</artifactId>
      <version>${gson-fire-version}</version>
    </dependency>
    <dependency>
      <groupId>org.threeten</groupId>
      <artifactId>threetenbp</artifactId>
      <version>${threetenbp-version}</version>
    </dependency>
    <dependency>
      <groupId>io.reactivex.rxjava2</groupId>
      <artifactId>rxjava</artifactId>
      <version>${rxjava-version}</version>
    </dependency>
    <dependency>
      <groupId>com.squareup.retrofit2</groupId>
      <artifactId>adapter-rxjava2</artifactId>
      <version>${retrofit-version}</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <!-- the test code is generated into the main source code :( -->
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>25.0-jre</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>