<?xml version="1.0" encoding="UTF-8"?>
<!--
 ~
 ~ Copyright 2016-2021 chronicle.software
 ~
 ~ https://chronicle.software
 ~
 ~ 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">

    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>net.openhft</groupId>
        <artifactId>java-parent-pom</artifactId>
        <version>1.26.0</version>
        <relativePath />
    </parent>

    <artifactId>chronicle-values</artifactId>
    <version>2.26ea1</version>
    <name>OpenHFT/Chronicle-Values</name>
    <description>Chronicle-Values</description>
    <packaging>bundle</packaging>

    <dependencyManagement>
        <dependencies>

            <dependency>
                <groupId>net.openhft</groupId>
                <artifactId>third-party-bom</artifactId>
                <version>3.26.0</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>net.openhft</groupId>
                <artifactId>chronicle-bom</artifactId>
                <version>2.26ea28</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

        </dependencies>

    </dependencyManagement>

    <dependencies>

        <dependency>
            <groupId>net.openhft</groupId>
            <artifactId>chronicle-core</artifactId>
        </dependency>

        <dependency>
            <groupId>net.openhft</groupId>
            <artifactId>chronicle-bytes</artifactId>
        </dependency>

        <dependency>
            <groupId>net.openhft</groupId>
            <artifactId>compiler</artifactId>
        </dependency>

        <dependency>
            <groupId>com.squareup</groupId>
            <artifactId>javapoet</artifactId>
        </dependency>

        <dependency>
            <groupId>org.jetbrains</groupId>
            <artifactId>annotations</artifactId>
        </dependency>

        <!-- test dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <properties>
      <sonar.organization>openhft</sonar.organization>
      <sonar.host.url>https://sonarcloud.io</sonar.host.url>
    </properties>
 
    <repositories>
        <repository>
            <id>third-party-release</id>
            <name>ThirdParty Repository</name>
            <url>
                https://nexus.chronicle.software/content/repositories/thirdparty/
            </url>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>
        <repository>
            <id>chronicle-enterprise-snapshots</id>
            <name>Snapshot Repository</name>
            <url>
                https://nexus.chronicle.software/content/repositories/snapshots/
            </url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>chronicle-enterprise-release</id>
            <url>
                https://nexus.chronicle.software/content/repositories/releases/
            </url>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>
    </repositories>

    <build>
        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <sourceFileExcludes>
                        <exclude>net/openhft/chronicle/values/FieldModel.java</exclude>
                        <exclude>net/openhft/chronicle/values/ArrayFieldModel.java</exclude>
                        <exclude>net/openhft/chronicle/values/Enums.java</exclude>
                        <exclude>net/openhft/chronicle/values/CharSequences.java</exclude>
                        <exclude>net/openhft/chronicle/values/PointersBytesStore.java</exclude>
                        <exclude>net/openhft/chronicle/values/HeapByteable.java</exclude>
                    </sourceFileExcludes>
                    <failOnError>false</failOnError>
                    <additionalOptions>-Xdoclint:none</additionalOptions>
                </configuration>
            </plugin>

            <!--
                generate maven dependencies versions file that can be used later
                to install the right bundle in test phase.

                The file is:

                    target/classes/META-INF/maven/dependencies.properties
            -->
            <plugin>
                <groupId>org.apache.servicemix.tooling</groupId>
                <artifactId>depends-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>generate-depends-file</id>
                        <goals>
                            <goal>generate-depends-file</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
                        <Bundle-Name>OpenHFT :: ${project.artifactId}</Bundle-Name>
                        <Bundle-Version>${project.version}</Bundle-Version>
                        <Export-Package>
                            net.openhft.chronicle.values.*;-noimport:=true
                        </Export-Package>
                    </instructions>
                </configuration>
                <executions>
                    <!--
                      This execution makes sure that the manifest is available
                      when the tests are executed
                    -->
                    <execution>
                        <goals>
                            <goal>manifest</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>

    <profiles>
        <profile>
            <id>pre-java9</id>
            <activation>
                <jdk>1.8</jdk>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>com.sun</groupId>
                    <artifactId>tools</artifactId>
                    <version>${java.version}</version>
                    <scope>system</scope>
                    <systemPath>${java.home}/../lib/tools.jar</systemPath>
                </dependency>
            </dependencies>
        </profile>
    </profiles>

    <scm>
        <url>scm:git:git@github.com:OpenHFT/Chronicle-Values.git</url>
        <connection>scm:git:git@github.com:OpenHFT/Chronicle-Values.git</connection>
        <developerConnection>scm:git:git@github.com:OpenHFT/Chronicle-Values.git
        </developerConnection>
        <tag>chronicle-values-2.26ea1</tag>
    </scm>

</project>
