<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com).
  ~
  ~ WSO2 LLC. licenses this file to you 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">
    <groupId>org.wso2.orbit.com.h2database</groupId>
    <artifactId>h2-engine</artifactId>
    <version>2.2.224.wso2v2</version>
    <packaging>bundle</packaging>
    <modelVersion>4.0.0</modelVersion>
    <name>WSO2 Carbon Orbit - H2 OSGi Database Service</name>

    <distributionManagement>
        <repository>
            <id>wso2.releases</id>
            <name>WSO2 internal Repository</name>
            <url>https://maven.wso2.org/nexus/content/repositories/releases/</url>
        </repository>
    </distributionManagement>

    <dependencies>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <version>2.2.224</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.eclipse.osgi</groupId>
            <artifactId>org.eclipse.osgi</artifactId>
            <version>3.9.1.v20130814-1242</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.2</version>
            <optional>true</optional>
        </dependency>
    </dependencies>

    <properties>
        <h2.engine.orbit.version>2.2.224.wso2v2</h2.engine.orbit.version>
    </properties>

    <repositories>
        <repository>
            <id>wso2-nexus</id>
            <name>WSO2 internal Repository</name>
            <url>https://maven.wso2.org/nexus/content/groups/wso2-public/</url>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
                <checksumPolicy>fail</checksumPolicy>
            </releases>
        </repository>
    </repositories>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                        <Private-Package>org.h2.*</Private-Package>
                        <Export-Package>
                            org.wso2.carbon.h2.osgi.*;version="${h2.engine.orbit.version}",
                        </Export-Package>
                        <_exportcontents>org.h2.*;version="${h2.engine.orbit.version}"</_exportcontents>
                        <Bundle-Activator>org.wso2.carbon.h2.osgi.H2DatabaseServiceActivator</Bundle-Activator>
                        <Import-Package>
                            org.apache.lucene.analysis;version="[3.6.2,4.0.0)";resolution:=optional,
                            org.apache.lucene.analysis.standard;version="[3.6.2,4.0.0)";resolution:=optional,
                            org.apache.lucene.document;version="[3.6.2,4.0.0)";resolution:=optional,
                            org.apache.lucene.index;version="[3.6.2,4.0.0)";resolution:=optional,
                            org.apache.lucene.queryParser;version="[3.6.2,4.0.0)";resolution:=optional,
                            org.apache.lucene.search;version="[3.6.2,4.0.0)";resolution:=optional,
                            org.apache.lucene.store;version="[3.6.2,4.0.0)";resolution:=optional,
                            org.apache.lucene.util;version="[3.6.2,4.0.0)";resolution:=optional,
                            com.vividsolutions.jts.geom;version="1.14.0";resolution:=optional,
                            com.vividsolutions.jts.io;version="1.14.0";resolution:=optional,
                            org.h2;version="[${project.version},2.3.0)",
                            org.h2.api;version="[${project.version},2.3.0)",
                            org.h2.fulltext;version="[${project.version},2.3.0)",
                            org.h2.jdbcx;version="[${project.version},2.3.0)",
                            org.h2.util;version="[${project.version},2.3.0)",
                            org.h2.value;version="[${project.version},2.3.0)",
                            org.osgi.framework,
                            org.osgi.service.jdbc;resolution:=optional,
                            org.slf4j;version="[1.6.0,1.7.0)";resolution:=optional
                        </Import-Package>
                        <Embed-Dependency>
                            h2;scope=compile|runtime;inline=false;
                        </Embed-Dependency>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>8</source>
                    <target>8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
