<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright 2021 OPS4J.

    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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.ops4j.pax.transx</groupId>
        <artifactId>pax-transx</artifactId>
        <version>0.5.4</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>pax-transx-tm-api</artifactId>
    <packaging>bundle</packaging>

    <dependencies>

        <!-- APIs -->

        <dependency>
            <groupId>javax.transaction</groupId>
            <artifactId>javax.transaction-api</artifactId>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Import-Package>
                            <!--
                                Important note about javax.transaction[.xa] packages:
                                 - javax.transaction.xa is part of JTA API only up to version 1.2
                                 - it was removed in JTA API 1.3, because since then, it is provided by JDK itself
                                 - JDK since version 9 (or definitely since the version where Corba support was removed)
                                   doesn't provide javax.transaction package at all - this *has to* be provided by
                                   external library/bundle
                                 - it has to be versionless
                            -->
                            javax.transaction.xa;version=!
                        </Import-Package>
                        <Export-Package>
                            org.ops4j.pax.transx.tm;uses:="javax.transaction.xa"
                        </Export-Package>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
