<?xml version="1.0" encoding="UTF-8"?>
<!--
 Licensed to the Apache Software Foundation (ASF) under one
 or more contributor license agreements.  See the NOTICE file
 distributed with this work for additional information
 regarding copyright ownership.  The ASF 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">

    <parent>
        <groupId>org.apache.aries</groupId>
        <artifactId>java5-parent</artifactId>
        <version>1.0.0</version>
        <relativePath />
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <groupId>org.apache.aries.transaction</groupId>
    <artifactId>org.apache.aries.transaction.manager</artifactId>
    <packaging>bundle</packaging>
    <name>Apache Aries Transaction Manager</name> 
    <version>1.0.0</version>

     <scm>
         <connection>scm:svn:http://svn.apache.org/repos/asf/aries/tags/org.apache.aries.transaction.manager-1.0.0</connection>
         <developerConnection>scm:svn:https://svn.apache.org/repos/asf/aries/tags/org.apache.aries.transaction.manager-1.0.0</developerConnection>
         <url>http://svn.apache.org/viewvc/aries/tags/org.apache.aries.transaction.manager-1.0.0</url>
     </scm>
    <properties>
        <aries.osgi.export>
            org.apache.geronimo.transaction.manager;version="2.2.1";provide:=true,
            org.apache.geronimo.transaction*;version="2.2.1",
            javax.transaction*;version="1.1.0"
        </aries.osgi.export>
        <aries.osgi.import>
            org.springframework.*;resolution:=optional;version="[2.5,4)",
            !org.apache.geronimo.transaction*,
            javax.resource.spi;resolution:=optional,
            org.osgi.framework,
            org.osgi.service.cm,
            javax.transaction*,
            *
        </aries.osgi.import>
        <aries.osgi.private.pkg>
            org.objectweb.howl.log*,
            org.apache.aries.transaction
        </aries.osgi.private.pkg>
        <aries.osgi.activator>
            org.apache.aries.transaction.Activator
        </aries.osgi.activator>
        <aries.osgi.export.service>
            javax.transaction.TransactionManager,
            javax.transaction.TransactionSynchronizationRegistry,
            javax.transaction.UserTransaction,
            org.apache.geronimo.transaction.manager.RecoverableTransactionManager
        </aries.osgi.export.service>
        <aries.osgi.include.resource>
            {maven-resources},
            javax/resource/spi/XATerminator.class=target/classes/javax/resource/spi/XATerminator.class
        </aries.osgi.include.resource>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.apache.aries</groupId>
            <artifactId>org.apache.aries.util</artifactId>
            <scope>provided</scope>
            <version>1.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.core</artifactId>
            <version>4.1.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.compendium</artifactId>
            <version>4.1.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.components</groupId>
            <artifactId>geronimo-transaction</artifactId>
            <version>2.2.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.objectweb.howl</groupId>
            <artifactId>howl</artifactId>
            <version>1.0.1-1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-tx</artifactId>
            <optional>true</optional>
            <version>2.5.6</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>unpack-sources</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.apache.geronimo.components</groupId>
                                    <artifactId>geronimo-transaction</artifactId>
                                    <classifier>sources</classifier>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.objectweb.howl</groupId>
                                    <artifactId>howl</artifactId>
                                    <classifier>sources</classifier>
                                </artifactItem>
                            </artifactItems>
                            <outputDirectory>${project.build.directory}/sources</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <configuration>
                            <tasks>
                                <copy todir="${project.build.directory}/sources">
                                    <fileset dir="${basedir}/src/main/java" />
                                </copy>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!--<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <executions>
                    <execution>
                        <id>package1</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <minmemory>128m</minmemory>
                            <maxmemory>512m</maxmemory>
                            <sourcepath>${project.build.directory}/sources</sourcepath>
                        </configuration>
                    </execution>
                </executions>
            </plugin> -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>1.1</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <artifactSet>
                                <includes>
                                    <include>org.apache.geronimo.components:geronimo-transaction</include>
                                    <include>org.objectweb.howl:howl</include>
                                    <include>${project.groupId}:${project.artifactId}</include>
                                </includes>
                            </artifactSet>
                            <filters>
                                <filter>
                                    <artifact>org.apache.geronimo.components:geronimo-transaction</artifact>
                                    <excludes>
                                        <exclude>org/**</exclude>
                                    </excludes>
                                </filter>
                                <filter>
                                    <artifact>org.objectweb.howl:howl</artifact>
                                    <excludes>
                                        <exclude>org/**</exclude>
                                    </excludes>
                                </filter>
                            </filters>
                            <createSourcesJar>true</createSourcesJar>
                            <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
                            <createDependencyReducedPom>true</createDependencyReducedPom>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>


</project>
