<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (C) 2015 Red Hat, Inc.

    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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>io.fabric8</groupId>
    <artifactId>kubernetes-model-generator</artifactId>
    <version>7.5.1</version>
  </parent>

  <artifactId>openshift-model-installer</artifactId>
  <packaging>bundle</packaging>
  <name>Fabric8 :: OpenShift Model :: Installer</name>
  <description>DEPRECATED: This module is deprecated and will be removed in a future release. Please migrate away from using this module and its models.</description>

  <properties>
    <clone-kube>true</clone-kube>
    <osgi.include.resources>
      ${osgi.include.resources.default}
    </osgi.include.resources>
    <osgi.import>*</osgi.import>
    <osgi.export>
      io.fabric8.openshift.api.model.installer**,
    </osgi.export>
  </properties>

  <dependencies>
    <dependency>
      <groupId>io.fabric8</groupId>
      <artifactId>kubernetes-model-core</artifactId>
    </dependency>
    <dependency>
      <groupId>io.fabric8</groupId>
      <artifactId>openshift-model-config</artifactId>
    </dependency>
    <dependency>
      <groupId>io.fabric8</groupId>
      <artifactId>openshift-model-machine</artifactId>
    </dependency>
  </dependencies>

  <profiles>
    <profile>
      <id>generate</id>
      <build>
        <plugins>
          <plugin>
            <groupId>io.fabric8</groupId>
            <artifactId>openapi-model-generator-maven-plugin</artifactId>
            <configuration >
              <settings combine.self="append">
                <schemas>
                  <schema>${openapi.schema.openshift-generated}</schema>
                </schemas>
                <packageMappings combine.self="append">
                  <com.github.openshift.installer.pkg.types.aws>io.fabric8.openshift.api.model.installer.aws.v1</com.github.openshift.installer.pkg.types.aws>
                  <com.github.openshift.installer.pkg.types.baremetal>io.fabric8.openshift.api.model.installer.baremetal.v1</com.github.openshift.installer.pkg.types.baremetal>
                  <com.github.openshift.installer.pkg.types.external>io.fabric8.openshift.api.model.installer.external.v1</com.github.openshift.installer.pkg.types.external>
                  <com.github.openshift.installer.pkg.types.gcp>io.fabric8.openshift.api.model.installer.gcp.v1</com.github.openshift.installer.pkg.types.gcp>
                  <com.github.openshift.installer.pkg.types.ibmcloud>io.fabric8.openshift.api.model.installer.ibmcloud.v1</com.github.openshift.installer.pkg.types.ibmcloud>
                  <com.github.openshift.installer.pkg.types.none>io.fabric8.openshift.api.model.installer.none.v1</com.github.openshift.installer.pkg.types.none>
                  <com.github.openshift.installer.pkg.types.nutanix>io.fabric8.openshift.api.model.installer.nutanix.v1</com.github.openshift.installer.pkg.types.nutanix>
                  <com.github.openshift.installer.pkg.types.openstack>io.fabric8.openshift.api.model.installer.openstack.v1</com.github.openshift.installer.pkg.types.openstack>
                  <com.github.openshift.installer.pkg.types.ovirt>io.fabric8.openshift.api.model.installer.ovirt.v1</com.github.openshift.installer.pkg.types.ovirt>
                  <com.github.openshift.installer.pkg.types.powervc>io.fabric8.openshift.api.model.installer.powervc.v1</com.github.openshift.installer.pkg.types.powervc>
                  <com.github.openshift.installer.pkg.types.powervs>io.fabric8.openshift.api.model.installer.powervs.v1</com.github.openshift.installer.pkg.types.powervs>
                  <com.github.openshift.installer.pkg.types.vsphere>io.fabric8.openshift.api.model.installer.vsphere.v1</com.github.openshift.installer.pkg.types.vsphere>
                </packageMappings>
                <includeGenerationRegexes>
                  <includeGenerationRegex>^io\.openshift\.install\..*$</includeGenerationRegex>
                  <includeGenerationRegex>^com\.github\.openshift\.installer\..*$</includeGenerationRegex>
                </includeGenerationRegexes>
                <skipGenerationRegexes>
                  <skipGenerationRegex>^io\.openshift\.cloudcredential\.v1\.ProviderCodec$</skipGenerationRegex>
                  <skipGenerationRegex>^com\.github\.openshift\.installer\.types\.azure\.v1\..*$</skipGenerationRegex>
                </skipGenerationRegexes>
                <fieldNameMappings>
                  <clusterNetworks>clusterNetworkList</clusterNetworks>
                </fieldNameMappings>
                <refToJavaTypeMappings>
                  <property>
                    <name>#/components/schemas/com.github.openshift.installer.pkg.ipnet.IPNet</name>
                    <value>java.lang.String</value>
                  </property>
                  <property>
                    <name>#/components/schemas/com.github.openshift.installer.pkg.types.azure.MachinePool</name>
                    <value>java.lang.Object</value>
                  </property>
                  <property>
                    <name>#/components/schemas/com.github.openshift.installer.pkg.types.azure.Platform</name>
                    <value>java.lang.Object</value>
                  </property>
                  <property>
                    <name>#/components/schemas/com.github.openshift.installer.pkg.types.azure.Metadata</name>
                    <value>java.lang.Object</value>
                  </property>
                </refToJavaTypeMappings>
              </settings>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
