<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>

    <parent>
        <groupId>io.camunda.connector</groupId>
        <artifactId>connector-http-parent</artifactId>
        <version>8.8.3</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <name>connector-http-polling</name>
    <description>Camunda Connector HTTP base functionality</description>
    <artifactId>connector-http-polling</artifactId>
    <packaging>jar</packaging>

    <licenses>
        <license>
            <name>Camunda Self-Managed Free Edition license</name>
            <url>
                https://camunda.com/legal/terms/cloud-terms-and-conditions/camunda-cloud-self-managed-free-edition-terms/
            </url>
        </license>
        <license>
            <name>Camunda Self-Managed Enterprise Edition license</name>
        </license>
    </licenses>

    <dependencies>
        <dependency>
            <groupId>io.camunda.connector</groupId>
            <artifactId>connector-http-base</artifactId>
            <version>${project.version}</version>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>cloud-function-plain</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.google.cloud.functions</groupId>
                        <artifactId>function-maven-plugin</artifactId>
                        <configuration>
                            <functionTarget>io.camunda.connector.runtime.cloud.PlainCloudConnectorFunction
                            </functionTarget>
                            <port>9083</port>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <plugins>
            <plugin>
                <groupId>io.camunda.connector</groupId>
                <artifactId>element-template-generator-maven-plugin</artifactId>
                <version>${project.version}</version>
                <configuration>
                    <connectors>
                        <connector>
                            <connectorClass>io.camunda.connector.http.polling.HttpPollingConnector</connectorClass>
                            <files>
                                <file>
                                    <templateId>io.camunda.connectors.http.Polling</templateId>
                                    <templateFileName>http-polling-connector.json</templateFileName>
                                </file>
                                <file>
                                    <templateId>io.camunda.connectors.http.Polling.Boundary.v1</templateId>
                                    <templateFileName>http-polling-connector-boundary.json</templateFileName>
                                </file>
                            </files>
                            <generateHybridTemplates>false</generateHybridTemplates>
                            <features>
                                <ACKNOWLEDGEMENT_STRATEGY_SELECTION>false</ACKNOWLEDGEMENT_STRATEGY_SELECTION>
                                <INBOUND_DEDUPLICATION>false</INBOUND_DEDUPLICATION>
                            </features>
                        </connector>
                    </connectors>
                    <versionHistoryEnabled>true</versionHistoryEnabled>
                    <includeDependencies>
                        <includeDependency>io.camunda.connector:connector-http-base</includeDependency>
                    </includeDependencies>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
