<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2019 Contributors to the Eclipse Foundation
  ~
  ~ See the NOTICE file(s) distributed with this work for additional
  ~ information regarding copyright ownership.
  ~
  ~ This program and the accompanying materials are made available under the
  ~ terms of the Eclipse Public License 2.0 which is available at
  ~ http://www.eclipse.org/legal/epl-2.0
  ~
  ~ SPDX-License-Identifier: EPL-2.0
  -->
<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>org.eclipse.ditto</groupId>
    <artifactId>ditto-client</artifactId>
    <packaging>bundle</packaging>
    <version>${revision}</version>

    <name>Eclipse Ditto Client</name>
    <description>Eclipse Ditto client SDK for Java.</description>
    <url>https://eclipse.org/ditto/</url>
    <inceptionYear>2019</inceptionYear>

    <organization>
        <name>Eclipse Foundation</name>
        <url>http://www.eclipse.org/</url>
    </organization>

    <licenses>
        <license>
            <name>Eclipse Public License - Version 2.0</name>
            <url>https://www.eclipse.org/org/documents/epl-2.0/index.php</url>
        </license>
    </licenses>

    <issueManagement>
        <system>GitHub Issues</system>
        <url>https://github.com/eclipse/ditto-clients/issues</url>
    </issueManagement>

    <prerequisites>
        <maven>3.5.0</maven>
    </prerequisites>

    <scm>
        <connection>${release.scm.connection}</connection>
        <developerConnection>${release.scm.developerConnection}</developerConnection>
        <url>${release.scm.url}</url>
    </scm>

    <ciManagement>
        <system>Jenkins</system>
        <url>https://ci.eclipse.org/ditto/</url>
    </ciManagement>

    <distributionManagement>
        <repository>
            <id>repo.eclipse.org</id>
            <name>Ditto Releases</name>
            <url>https://repo.eclipse.org/content/repositories/ditto-releases/</url>
        </repository>
        <snapshotRepository>
            <id>repo.eclipse.org</id>
            <name>Ditto Snapshots</name>
            <url>https://repo.eclipse.org/content/repositories/ditto-snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

    <developers>
        <developer>
            <id>geglocker</id>
            <name>Gerald Glocker</name>
            <email>gerald.glocker@bosch-si.com</email>
            <url>https://github.com/geglock</url>
            <organization>Bosch Software Innovations GmbH</organization>
            <organizationUrl>http://www.bosch-si.com</organizationUrl>
            <roles>
                <role>Lead</role>
                <role>Committer</role>
            </roles>
        </developer>
        <developer>
            <id>tjaeckle</id>
            <name>Thomas Jaeckle</name>
            <email>thomas.jaeckle@bosch-si.com</email>
            <url>https://github.com/thjaeckle</url>
            <organization>Bosch Software Innovations GmbH</organization>
            <organizationUrl>http://www.bosch-si.com</organizationUrl>
            <roles>
                <role>Lead</role>
                <role>Committer</role>
            </roles>
        </developer>

        <developer>
            <id>yucai</id>
            <name>Yufei Cai</name>
            <email>yufei.cai@bosch-si.com</email>
            <url>https://github.com/yufei-cai</url>
            <organization>Bosch Software Innovations GmbH</organization>
            <organizationUrl>http://www.bosch-si.com</organizationUrl>
            <roles>
                <role>Committer</role>
            </roles>
        </developer>
        <developer>
            <id>dfesenmeyer</id>
            <name>Daniel Fesenmeyer</name>
            <email>daniel.fesenmeyer@bosch-si.com</email>
            <url>https://github.com/danielFesenmeyer</url>
            <organization>Bosch Software Innovations GmbH</organization>
            <organizationUrl>http://www.bosch-si.com</organizationUrl>
            <roles>
                <role>Committer</role>
            </roles>
        </developer>
        <developer>
            <id>dguggemos</id>
            <name>Dominik Guggemos</name>
            <email>dominik.guggemos@bosch-si.com</email>
            <url>https://github.com/dguggemos</url>
            <organization>Bosch Software Innovations GmbH</organization>
            <organizationUrl>http://www.bosch-si.com</organizationUrl>
            <roles>
                <role>Committer</role>
            </roles>
        </developer>
        <developer>
            <id>jfickel</id>
            <name>Juergen Fickel</name>
            <email>juergen.fickel@bosch-si.com</email>
            <url>https://github.com/jufickel-b</url>
            <organization>Bosch Software Innovations GmbH</organization>
            <organizationUrl>http://www.bosch-si.com</organizationUrl>
            <roles>
                <role>Committer</role>
            </roles>
        </developer>
        <developer>
            <id>jkraeher</id>
            <name>Johannes Schneider</name>
            <email>johannes.schneider@bosch-si.com</email>
            <url>https://github.com/jokraehe</url>
            <organization>Bosch Software Innovations GmbH</organization>
            <organizationUrl>http://www.bosch-si.com</organizationUrl>
            <roles>
                <role>Committer</role>
            </roles>
        </developer>
        <developer>
            <id>ffendt</id>
            <name>Florian Fendt</name>
            <email>florian.fendt@bosch-si.com</email>
            <url>https://github.com/ffendt</url>
            <organization>Bosch Software Innovations GmbH</organization>
            <organizationUrl>http://www.bosch-si.com</organizationUrl>
            <roles>
                <role>Committer</role>
            </roles>
        </developer>
        <developer>
            <id>smaute</id>
            <name>Stefan Maute</name>
            <email>stefan.maute@bosch-si.com</email>
            <url>https://github.com/stmaute</url>
            <organization>Bosch Software Innovations GmbH</organization>
            <organizationUrl>http://www.bosch-si.com</organizationUrl>
            <roles>
                <role>Committer</role>
            </roles>
        </developer>
        <developer>
            <id>yklem</id>
            <name>Yannic Klem</name>
            <email>yannic.klem@bosch-si.com</email>
            <url>https://github.com/Yannic92</url>
            <organization>Bosch Software Innovations GmbH</organization>
            <organizationUrl>http://www.bosch-si.com</organizationUrl>
            <roles>
                <role>Committer</role>
            </roles>
        </developer>
    </developers>

    <properties>
        <revision>0-SNAPSHOT</revision>

        <!-- ### Compile dependencies versions -->
        <ditto.version>${revision}</ditto.version>
        <minimal-json.version>0.9.5</minimal-json.version>
        <nv-websocket-client.version>2.9</nv-websocket-client.version>
        <classindex.version>3.8</classindex.version>
        <slf4j.version>1.7.25</slf4j.version>

        <!-- ### Provided dependencies versions -->
        <jsr305.version>3.0.1</jsr305.version>

        <!-- ### Testing dependencies versions -->
        <logback.version>1.2.3</logback.version>
        <junit.version>4.12</junit.version>
        <assertj.version>3.11.1</assertj.version>
        <mutability-detector.version>0.9.6</mutability-detector.version>
        <equals-verifier.version>3.0.3</equals-verifier.version>
        <mockito.version>2.9.0</mockito.version>
        <jsonassert.version>1.2.3</jsonassert.version>

        <json-unit.version>1.28.1</json-unit.version>
        <pax.exam.version>4.8.0</pax.exam.version>
        <felix.version>5.4.0</felix.version>


        <javac.source>1.8</javac.source>
        <javac.target>1.8</javac.target>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <!-- configure timestamp format to be injected into legal docs -->
        <maven.build.timestamp.format>yyyy-MM-dd</maven.build.timestamp.format>
        <timestamp>${maven.build.timestamp}</timestamp>

        <release.scm.connection>scm:git:git@github.com:eclipse/ditto-clients.git</release.scm.connection>
        <release.scm.developerConnection>scm:git:https://github.com/eclipse/ditto-clients.git
        </release.scm.developerConnection>
        <release.scm.url>https://github.com/eclipse/ditto-clients.git</release.scm.url>

        <argLine>-Dfile.encoding=${project.build.sourceEncoding}</argLine>

        <!-- globally set version for checking binary compatibility against -->
        <!-- whoever changes this to ${revision} or ${project.version} is responsible for API breakage caused by this! -->
        <!-- in other words: never do that here! exclude the 'breakages' locally in the japicmp maven plugin if you intentionally break something -->
        <binary-compatibility-check.version>0-SNAPSHOT</binary-compatibility-check.version>
        <!-- skip until first release: -->
        <binary-compatibility-check.skip>true</binary-compatibility-check.skip>

        <ditto.thirdPartyLicences.excludedGroups>
            (org\.eclipse\.ditto.*)
        </ditto.thirdPartyLicences.excludedGroups>
    </properties>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>

            <resource>
                <directory>../legal</directory>
                <filtering>false</filtering>
                <targetPath>META-INF</targetPath>
                <excludes>
                    <exclude>NOTICE-THIRD-PARTY.md</exclude>
                    <exclude>templates/**</exclude>
                </excludes>
            </resource>
        </resources>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.7.0</version>
                    <configuration>
                        <source>${javac.source}</source>
                        <target>${javac.target}</target>
                        <encoding>${project.build.sourceEncoding}</encoding>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.0.2</version>
                </plugin>
                <plugin>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.0.2</version>
                </plugin>

                <!-- Declaration for the 3 following plugins is explicitly needed by Maven 3 -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.0.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.0.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.0.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.3</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.0.0-M1</version>
                    <configuration>
                        <systemProperties>
                            <kamon.auto-start>true</kamon.auto-start>
                        </systemProperties>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-report-plugin</artifactId>
                    <version>2.20.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>3.0.0-M1</version>
                    <executions>
                        <execution>
                            <id>integration-test</id>
                            <goals>
                                <goal>integration-test</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>verify</id>
                            <goals>
                                <goal>verify</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>2.5.2</version>
                </plugin>
                <plugin>
                    <groupId>com.mycila</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>3.0</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>1.17</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>1.4.1</version>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.8.3</version>
                </plugin>
                <plugin>
                    <groupId>com.github.siom79.japicmp</groupId>
                    <artifactId>japicmp-maven-plugin</artifactId>
                    <version>0.11.0</version>
                    <configuration>
                        <oldVersion>
                            <dependency>
                                <groupId>${project.groupId}</groupId>
                                <artifactId>${project.artifactId}</artifactId>
                                <version>${binary-compatibility-check.version}</version>
                                <type>${project.packaging}</type>
                            </dependency>
                        </oldVersion>
                        <newVersion>
                            <file>
                                <path>${project.build.directory}/${project.artifactId}-${project.version}.jar</path>
                            </file>
                        </newVersion>
                        <parameter>
                            <onlyModified>true</onlyModified>
                            <accessModifier>public</accessModifier>
                            <breakBuildOnModifications>false</breakBuildOnModifications>
                            <breakBuildOnBinaryIncompatibleModifications>true
                            </breakBuildOnBinaryIncompatibleModifications>
                            <onlyBinaryIncompatible>false</onlyBinaryIncompatible>
                            <includeSynthetic>false</includeSynthetic>
                            <ignoreMissingClasses>false</ignoreMissingClasses>
                            <skipPomModules>true</skipPomModules>
                            <htmlTitle>${project.name} :: Binary Compatibility Report</htmlTitle>
                            <excludes>
                                <!--<exclude></exclude>-->
                            </excludes>
                        </parameter>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>verify</phase>
                            <goals>
                                <goal>cmp</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>3.5.0</version>
                    <configuration>
                        <instructions>
                            <Bundle-Vendor>Eclipse Ditto</Bundle-Vendor>
                            <Bundle-DocURL>https://eclipse.org/ditto/</Bundle-DocURL>
                            <_noee>true</_noee>
                            <Bundle-RequiredExecutionEnvironment>JavaSE-1.8</Bundle-RequiredExecutionEnvironment>
                            <Include-Resource>
                                META-INF=${project.build.outputDirectory}/META-INF,
                                ditto-client-version.properties=${project.build.outputDirectory}/ditto-client-version.properties
                            </Include-Resource>
                        </instructions>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-scm-plugin</artifactId>
                    <version>1.9.5</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>2.5</version>
                    <configuration>
                        <generateBackupPoms>false</generateBackupPoms>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>1.6.8</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>1.6</version>
                </plugin>
                <plugin>
                    <groupId>org.eclipse.cbi.maven.plugins</groupId>
                    <artifactId>eclipse-jarsigner-plugin</artifactId>
                    <version>1.1.4</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>*IntegrationTest.java</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <configuration>
                    <systemPropertyVariables>
                        <client.bundle.artifact.location>${project.build.directory}/${project.build.finalName}.jar
                        </client.bundle.artifact.location>
                        <client.bundles.zip.location>
                            ${project.build.directory}/${project.artifactId}-${project.version}-bundles.zip
                        </client.bundles.zip.location>
                        <project.version>${project.version}</project.version>
                        <project.build.directory>${project.build.directory}</project.build.directory>
                    </systemPropertyVariables>
                    <includes>
                        <include>*IntegrationTest.java</include>
                    </includes>
                </configuration>
                <executions>
                    <execution>
                        <id>run-integration-tests</id>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>integration-test</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <_exportcontents>
                            !*.internal.*,
                            !*.internal,
                            org.eclipse.ditto.client*
                        </_exportcontents>
                        <_removeheaders>
                            Embed-Dependency,Embed-Transitive,Embedded-Artifacts,Embed-StripGroup,Embed-StripVersion,
                            Embed-Directory,Built-By,Tool,Created-By,Build-Jdk,Include-Resource,Private-Package,
                            Bnd-LastModified
                        </_removeheaders>
                        <Import-Package>
                            !org.eclipse.ditto.utils.jsr305.annotations,
                            org.eclipse.ditto.*,
                            org.slf4j.*,
                            com.neovisionaries.ws.client
                        </Import-Package>
                        <_noee>true</_noee>
                        <Bundle-RequiredExecutionEnvironment>JavaSE-1.8</Bundle-RequiredExecutionEnvironment>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>osgi-bin-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>./src/main/assembly/assembly.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>com.github.siom79.japicmp</groupId>
                <artifactId>japicmp-maven-plugin</artifactId>
                <configuration>
                    <parameter>
                        <excludes>
                        </excludes>
                    </parameter>
                    <skip>${binary-compatibility-check.skip}</skip>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-scm-plugin</artifactId>
                <configuration>
                    <tag>${project.version}</tag>
                </configuration>
            </plugin>

            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <inherited>false</inherited>
                <configuration>
                    <header>../legal/headers/license-header.txt</header>
                    <aggregate>true</aggregate>
                    <quiet>false</quiet>
                    <failIfMissing>true</failIfMissing>
                    <strictCheck>false</strictCheck>
                    <headerDefinitions>
                        <headerDefinition>../legal/headers/license-header-xml-def.xml</headerDefinition>
                    </headerDefinitions>
                    <includes>
                        <include>**/*.java</include>
                        <include>**/*.sh</include>
                        <include>**/pom.xml</include>
                    </includes>
                    <excludes>
                        <exclude>target/**</exclude>
                    </excludes>
                    <useDefaultExcludes>true</useDefaultExcludes>
                    <encoding>UTF-8</encoding>
                    <mapping>
                        <java>SLASHSTAR_STYLE</java>
                    </mapping>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <phase>validate</phase>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <inherited>true</inherited>
                <executions>
                    <execution>
                        <id>default-cli</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>add-third-party</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.outputDirectory}/META-INF</outputDirectory>
                            <excludedGroups>${ditto.thirdPartyLicences.excludedGroups}</excludedGroups>
                            <includedScopes>compile</includedScopes>
                            <failOnMissing>true</failOnMissing>
                            <fileTemplate>../legal/templates/third-party-file.ftl
                            </fileTemplate>
                            <thirdPartyFilename>NOTICE-THIRD-PARTY.md</thirdPartyFilename>
                            <licenseMergesFile>../legal/templates/licenses-merges-file
                            </licenseMergesFile>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>prepare</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <goals>
                            <goal>report-aggregate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-legal-docs</id>
                        <phase>none</phase>
                    </execution>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <includeScope>runtime</includeScope>
                            <outputDirectory>${project.build.directory}/dependencies</outputDirectory>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>false</overWriteSnapshots>
                            <overWriteIfNewer>true</overWriteIfNewer>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <!-- ### Compile ### -->
        <dependency>
            <groupId>com.eclipsesource.minimal-json</groupId>
            <artifactId>minimal-json</artifactId>
            <version>${minimal-json.version}</version>
        </dependency>

        <dependency>
            <groupId>com.neovisionaries</groupId>
            <artifactId>nv-websocket-client</artifactId>
            <version>${nv-websocket-client.version}</version>
        </dependency>

        <dependency>
            <groupId>org.atteo.classindex</groupId>
            <artifactId>classindex</artifactId>
            <version>${classindex.version}</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>

        <!-- ### Compile - Ditto artifacts ### -->
        <dependency>
            <groupId>org.eclipse.ditto</groupId>
            <artifactId>ditto-json</artifactId>
            <version>${ditto.version}</version>
        </dependency>

        <dependency>
            <groupId>org.eclipse.ditto</groupId>
            <artifactId>ditto-model-base</artifactId>
            <version>${ditto.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.ditto</groupId>
            <artifactId>ditto-model-things</artifactId>
            <version>${ditto.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.ditto</groupId>
            <artifactId>ditto-model-messages</artifactId>
            <version>${ditto.version}</version>
        </dependency>

        <dependency>
            <groupId>org.eclipse.ditto</groupId>
            <artifactId>ditto-signals-base</artifactId>
            <version>${ditto.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.ditto</groupId>
            <artifactId>ditto-signals-commands-base</artifactId>
            <version>${ditto.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.ditto</groupId>
            <artifactId>ditto-signals-commands-things</artifactId>
            <version>${ditto.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.ditto</groupId>
            <artifactId>ditto-signals-commands-live</artifactId>
            <version>${ditto.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.ditto</groupId>
            <artifactId>ditto-signals-commands-messages</artifactId>
            <version>${ditto.version}</version>
        </dependency>

        <dependency>
            <groupId>org.eclipse.ditto</groupId>
            <artifactId>ditto-signals-events-base</artifactId>
            <version>${ditto.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.ditto</groupId>
            <artifactId>ditto-signals-events-things</artifactId>
            <version>${ditto.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.ditto</groupId>
            <artifactId>ditto-protocol-adapter</artifactId>
            <version>${ditto.version}</version>
        </dependency>

        <!-- ### Provided ### -->
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <version>${jsr305.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- ### Provided - Ditto artifacts ### -->
        <dependency>
            <groupId>org.eclipse.ditto</groupId>
            <artifactId>ditto-utils-jsr305</artifactId>
            <version>${ditto.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- ### Testing ### -->
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>${logback.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>${assertj.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mutabilitydetector</groupId>
            <artifactId>MutabilityDetector</artifactId>
            <version>${mutability-detector.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>nl.jqno.equalsverifier</groupId>
            <artifactId>equalsverifier</artifactId>
            <version>${equals-verifier.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.skyscreamer</groupId>
            <artifactId>jsonassert</artifactId>
            <version>${jsonassert.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.javacrumbs.json-unit</groupId>
            <artifactId>json-unit</artifactId>
            <version>${json-unit.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.ops4j.pax.exam</groupId>
            <artifactId>pax-exam-junit4</artifactId>
            <version>${pax.exam.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.bundles</groupId>
            <artifactId>org.apache.servicemix.bundles.javax-inject</artifactId>
            <version>1_2</version>
            <scope>test</scope>
        </dependency>
        <!--
              pax-exam-container-native will run the OSGi platform.
              In our case its the felix framework defined within the profile section.
          -->
        <dependency>
            <groupId>org.ops4j.pax.exam</groupId>
            <artifactId>pax-exam-container-native</artifactId>
            <version>${pax.exam.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.exam</groupId>
            <artifactId>pax-exam-link-mvn</artifactId>
            <version>${pax.exam.version}</version>
            <scope>test</scope>
        </dependency>

        <!-- OSGI framework to test with -->
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.framework</artifactId>
            <version>${felix.version}</version>
            <scope>test</scope>
        </dependency>

        <!-- ### Testing - Ditto artifacts ### -->
        <dependency>
            <groupId>org.eclipse.ditto</groupId>
            <artifactId>ditto-json</artifactId>
            <type>test-jar</type>
            <version>${ditto.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.eclipse.ditto</groupId>
            <artifactId>ditto-model-base</artifactId>
            <type>test-jar</type>
            <version>${ditto.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.ditto</groupId>
            <artifactId>ditto-model-things</artifactId>
            <type>test-jar</type>
            <version>${ditto.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.ditto</groupId>
            <artifactId>ditto-signals-base</artifactId>
            <type>test-jar</type>
            <version>${ditto.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.ditto</groupId>
            <artifactId>ditto-signals-commands-base</artifactId>
            <type>test-jar</type>
            <version>${ditto.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.ditto</groupId>
            <artifactId>ditto-signals-commands-things</artifactId>
            <type>test-jar</type>
            <version>${ditto.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.ditto</groupId>
            <artifactId>ditto-signals-commands-live</artifactId>
            <type>test-jar</type>
            <version>${ditto.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.ditto</groupId>
            <artifactId>ditto-signals-events-base</artifactId>
            <type>test-jar</type>
            <version>${ditto.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.ditto</groupId>
            <artifactId>ditto-signals-events-things</artifactId>
            <type>test-jar</type>
            <version>${ditto.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <pluginRepositories>
        <pluginRepository>
            <id>eclipse-repo</id>
            <name>Eclipse CBI Repository</name>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <url>https://repo.eclipse.org/content/repositories/cbi-releases/</url>
        </pluginRepository>
    </pluginRepositories>

    <profiles>
        <profile>
            <id>generate-third-party-licenses</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                        <inherited>false</inherited>
                        <executions>
                            <execution>
                                <id>add-third-party</id>
                                <goals>
                                    <goal>add-third-party</goal>
                                </goals>
                                <configuration>
                                    <outputDirectory>../legal</outputDirectory>
                                    <excludedGroups>${ditto.thirdPartyLicences.excludedGroups}</excludedGroups>
                                    <includedScopes>compile</includedScopes>
                                    <failOnMissing>true</failOnMissing>
                                    <fileTemplate>../legal/templates/third-party-file.ftl</fileTemplate>
                                    <thirdPartyFilename>NOTICE-THIRD-PARTY.md</thirdPartyFilename>
                                    <licenseMergesFile>../legal/templates/licenses-merges-file</licenseMergesFile>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>performRelease</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-enforcer-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>enforce-no-snapshots</id>
                                <goals>
                                    <goal>enforce</goal>
                                </goals>
                                <configuration>
                                    <rules>
                                        <requireReleaseDeps>
                                            <message>No SNAPSHOT dependencies allowed in release!</message>
                                        </requireReleaseDeps>
                                        <requireReleaseVersion>
                                            <message>Artifact cannot be SNAPSHOT version in release!</message>
                                        </requireReleaseVersion>
                                    </rules>
                                    <fail>true</fail>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>signArtifactsEclipse</id>
            <activation>
                <property>
                    <name>signArtifactsEclipse</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.eclipse.cbi.maven.plugins</groupId>
                        <artifactId>eclipse-jarsigner-plugin</artifactId>
                        <configuration>
                            <excludeInnerJars>true</excludeInnerJars>
                        </configuration>
                        <executions>
                            <execution>
                                <id>sign-jars</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>signArtifactsMavenCentral</id>
            <activation>
                <property>
                    <name>signArtifacts</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>publishToEclipseMavenRepo</id>
            <activation>
                <property>
                    <name>publishToEclipseMavenRepo</name>
                    <value>true</value>
                </property>
            </activation>
            <distributionManagement>
                <repository>
                    <id>repo.eclipse.org</id>
                    <name>Project Repository - Releases</name>
                    <url>https://repo.eclipse.org/content/repositories/ditto-releases/</url>
                </repository>
                <snapshotRepository>
                    <id>repo.eclipse.org</id>
                    <name>Project Repository - Snapshots</name>
                    <url>https://repo.eclipse.org/content/repositories/ditto-snapshots/</url>
                </snapshotRepository>
            </distributionManagement>
        </profile>

        <profile>
            <id>publishToMavenCentral</id>
            <activation>
                <property>
                    <name>publishToMavenCentral</name>
                    <value>true</value>
                </property>
            </activation>
            <distributionManagement>
                <repository>
                    <id>ossrh</id>
                    <name>Eclipse Ditto Repository - Release</name>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
                </repository>
                <snapshotRepository>
                    <id>ossrh</id>
                    <name>Eclipse Ditto Repository - Snapshots</name>
                    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
            </distributionManagement>
            <build>
                <plugins>
                    <!-- see doc: http://central.sonatype.org/pages/apache-maven.html -->
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <skipStagingRepositoryClose>true</skipStagingRepositoryClose>
                            <autoReleaseAfterClose>false</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
