<?xml version="1.0" encoding="UTF-8"?>
<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>
    <groupId>fish.payara.cloud.connectors</groupId>
    <artifactId>cloud-connectors</artifactId>
    <version>0.6.0</version>
    <packaging>pom</packaging>
    <name>Payara Cloud Connectors</name>
    <description>Project for JCA modules that connect to various cloud services</description>
    <url>http://www.payara.org</url>
    <licenses>
        <license>
            <name>GPL Version 2 with Classpath Exception</name>
            <url>https://github.com/payara/Payara/blob/master/LICENSE.txt</url>
        </license>
    </licenses>
    <developers>
        <developer>
            <id>smillidge</id>
            <name>Steve Millidge</name>
            <organization>Payara Foundation</organization>
            <organizationUrl>http://www.payara.org</organizationUrl>
        </developer>
    </developers>
    <scm>
        <connection>scm:git:git:github.com/payara/Cloud-Connectors.git</connection>
        <developerConnection>git@github.com:payara/Cloud-Connectors.git</developerConnection>
        <url>https://github.com/payara/Cloud-Connectors</url>
        <tag>master</tag>
    </scm>
    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/payara/Cloud-Connectors/issues</url>
    </issueManagement>
    <modules>
        <module>Kafka/KafkaJCAAPI</module>
        <module>Kafka/KafkaRAR</module>
        <module>Kafka/KafkaExample</module>
        <module>AmazonSQS/AmazonSQSJCAAPI</module>
        <module>AmazonSQS/AmazonSQSRAR</module>
        <module>AmazonSQS/AmazonSQSExample</module>
        <module>MQTT/MQTTJCAAPI</module>
        <module>MQTT/MQTTRAR</module>
        <module>MQTT/MQTTExample</module>
        <module>MQTT/MQTTSendExample</module>
        <module>MQTT/MQTTReceiveExample</module>
        <module>MQTT/MQTTSendJAXRS</module>
        <module>AzureServiceBus/AzureSBJCAAPI</module>
        <module>AzureServiceBus/AzureSBRAR</module>
        <module>AzureServiceBus/AzureSBExample</module>
    </modules>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>
    <dependencies>
        <dependency>
            <groupId>jakarta.platform</groupId>
            <artifactId>jakarta.jakartaee-api</artifactId>
            <version>8.0.0</version>
            <type>jar</type>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>7.0.0</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    
    <profiles>
        <profile>
            <!-- Required extras for deployment to Maven central. -->
            <id>release</id>
            <build>
                <plugins>
                    <!-- Generate Sources JAR -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.2.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- Generate Javadoc JAR -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.2.0</version>
                        <configuration>
                            <javadocVersion>${javadoc.version}</javadocVersion>
                            <notimestamp>true</notimestamp>
                            <splitindex>true</splitindex>
                            <doctitle>Arquillian connector</doctitle>
                            <links>
                                <link>https://docs.oracle.com/javaee/${javaee.version}/api/</link>
                            </links>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    
                    <!-- Sign the files using GPG -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>payara-enterprise</id>
            <distributionManagement>
                <repository>
                    <id>payara-enterprise</id>
                    <name>Payara Enterprise Nexus</name>
                    <url>https://nexus.payara.fish/content/repositories/payara-enterprise</url>
                </repository>
            </distributionManagement>
            <repositories>
                <repository>
                    <id>payara-enterprise</id>
                    <name>Payara Enterprise Nexus</name>
                    <url>https://nexus.payara.fish/content/repositories/payara-enterprise</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </repository>
            </repositories>
        </profile>
        <profile>
            <id>payara-community</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <distributionManagement>
                <snapshotRepository>
                    <id>ossrh</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
                <repository>
                    <id>ossrh</id>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
            </distributionManagement>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.8</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
