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

<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.smooks</groupId>
        <artifactId>testres</artifactId>
        <version>2.0.0-M1</version>
        <relativePath>../testres/pom.xml</relativePath>
    </parent>

    <name>Smooks :: All</name>
    <artifactId>smooks-all</artifactId>
    <packaging>bundle</packaging>

    <dependencies>
        <dependency>
            <groupId>org.smooks</groupId>
            <artifactId>smooks-commons</artifactId>
        </dependency>
        <dependency>
            <groupId>org.smooks</groupId>
            <artifactId>smooks-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.smooks</groupId>
            <artifactId>smooks-scribe-core</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.testng</groupId>
                    <artifactId>testng</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.smooks</groupId>
            <artifactId>smooks-scribe-hibernate</artifactId>
        </dependency>
        <dependency>
            <groupId>org.smooks</groupId>
            <artifactId>smooks-scribe-ibatis</artifactId>
        </dependency>
        <dependency>
            <groupId>org.smooks</groupId>
            <artifactId>smooks-scribe-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>osgi_R4_core</artifactId>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>osgi_R4_compendium</artifactId>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.jboss.shrinkwrap</groupId>
            <artifactId>shrinkwrap-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.shrinkwrap</groupId>
            <artifactId>shrinkwrap-impl-base</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Readding core dependencies - DO NOT SCOPE AS "provided" -->
        <dependency>
            <groupId>com.thoughtworks.xstream</groupId>
            <artifactId>xstream</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mvel</groupId>
            <artifactId>mvel2</artifactId>
        </dependency>
        <dependency>
            <groupId>jaxen</groupId>
            <artifactId>jaxen</artifactId>
        </dependency>

        <!-- Bundles -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>com.springsource.org.apache.commons.logging</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.jaxen</groupId>
            <artifactId>com.springsource.org.jaxen</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.freemarker</groupId>
            <artifactId>freemarker</artifactId>
        </dependency>

        <dependency>
            <groupId>org.objectweb.asm</groupId>
            <artifactId>com.springsource.org.objectweb.asm</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.objectweb.asm</groupId>
            <artifactId>com.springsource.org.objectweb.asm.tree.analysis</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.objectweb.asm</groupId>
            <artifactId>com.springsource.org.objectweb.asm.tree</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.objectweb.asm</groupId>
            <artifactId>com.springsource.org.objectweb.asm.util</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.ant</groupId>
            <artifactId>ant</artifactId>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>src-dependencies</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <classifier>sources</classifier>
                            <excludeTransitive>true</excludeTransitive>
                            <failOnMissingClassifierArtifact>false</failOnMissingClassifierArtifact>
                            <outputDirectory>${project.build.directory}/sources</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <ant dir="${project.basedir}" antfile="merge-jars.xml">
                                    <property name="smooks.version" value="${project.version}"/>
                                </ant>
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <id>bundle-manifest</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>manifest</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>org.smooks.osgi</Bundle-SymbolicName>
                        <Bundle-Name>Smooks OSGi</Bundle-Name>
                        <Bundle-Version>${project.version}</Bundle-Version>
                        <Bundle-Activator>org.smooks.SmooksActivator</Bundle-Activator>
                        <Export-Package>
                            org.smooks.*;-split-package:=merge-first;version="${project.version}",
                            META-INF.xsd.smooks,
                            META-INF.xsd.smooks.*;-split-package:=merge-first,
                            !META-INF.services.*,
                            !META-INF.maven.*
                        </Export-Package>
                        <Import-Package>
                            org.osgi.framework,
                            org.jaxen.*;version="${spring.jaxen.version}",
                            org.apache.commons.*,
                            freemarker.*;version="${freemarker.version}",
                            groovy.xml;version="${spring.groovy.version}",
                            groovy.xml.dom;version="${spring.groovy.version}",
                            org.codehaus.groovy.*;version="${spring.groovy.version}",
                            org.codehaus.groovy.reflection;version="${spring.groovy.version}",
                            org.codehaus.groovy.runtime;version="${spring.groovy.version}",
                            org.codehaus.groovy.runtime.callsite;version="${spring.groovy.version}",
                            org.codehaus.groovy.runtime.typehandling;version="${spring.groovy.version}",
                            javax.swing.tree,
                            !org.apache.commons.cli.*,
                            !META-INF.services.javax.xml.parsers.*,*;resolution:=optional
                        </Import-Package>
                        <Embed-Dependency>milyn*;scope=provided;type=!pom;inline=true</Embed-Dependency>
                        <_exportcontents>true</_exportcontents>
                        <_failok>true</_failok>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.ops4j</groupId>
                <artifactId>maven-pax-plugin</artifactId>
                <configuration>
                    <provision>
                        <param>--log=true</param>
                        <param>--platform=felix</param>
                        <param>--workingDirectory=target/runner</param>
                    </provision>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-artifacts</id>
                        <phase>package</phase>
                        <goals>
                            <goal>attach-artifact</goal>
                        </goals>
                        <configuration>
                            <artifacts>
                                <artifact>
                                    <file>target/classes/features.xml</file>
                                    <type>xml</type>
                                    <classifier>features</classifier>
                                </artifact>
                            </artifacts>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>com.springsource.repository.bundles.release</id>
            <name>SpringSource Enterprise Bundle Repository - SpringSource Bundle Releases</name>
            <url>http://repository.springsource.com/maven/bundles/release</url>
        </repository>

        <repository>
            <id>com.springsource.repository.bundles.external</id>
            <name>SpringSource Enterprise Bundle Repository - External Bundle Releases</name>
            <url>http://repository.springsource.com/maven/bundles/external</url>
        </repository>
    </repositories>
</project>
