<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>
    <groupId>org.dspace</groupId>
    <artifactId>dspace-swordv2</artifactId>
    <packaging>war</packaging>
    <name>DSpace SWORD v2</name>
    <description>DSpace SWORD v2 Deposit Service Provider Web Application</description>

    <!--
       A Parent POM that Maven inherits DSpace Default
       POM attributes from.
    -->
    <parent>
        <groupId>org.dspace</groupId>
        <artifactId>dspace-parent</artifactId>
        <version>6.3</version>
        <relativePath>..</relativePath>
    </parent>

    <properties>
        <!-- This is the path to the root [dspace-src] directory. -->
        <root.basedir>${basedir}/..</root.basedir>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <attachClasses>true</attachClasses>
                    <!-- In version 2.1-alpha-1, this was incorrectly named warSourceExcludes -->
                    <packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes>
                    <warSourceExcludes>WEB-INF/lib/*.jar</warSourceExcludes>
                    <!-- Filter the web.xml (needed for IDE compatibility/debugging) -->
                    <filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
                </configuration>
                <executions>
                    <execution>
                        <phase>prepare-package</phase>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>


    <profiles>
        <profile>
            <id>oracle-support</id>
            <activation>
                <property>
                    <name>db.name</name>
                    <value>oracle</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>com.oracle</groupId>
                    <artifactId>ojdbc6</artifactId>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>postgres-support</id>
            <activation>
                <property>
                    <name>!db.name</name>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.postgresql</groupId>
                    <artifactId>postgresql</artifactId>
                </dependency>
            </dependencies>
        </profile>
    </profiles>

    <dependencies>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.swordapp</groupId>
            <artifactId>sword2-server</artifactId>
            <version>1.0</version>
            <type>jar</type>
            <classifier>classes</classifier>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.abdera</groupId>
                    <artifactId>abdera-client</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.swordapp</groupId>
            <artifactId>sword2-server</artifactId>
            <version>1.0</version>
            <type>war</type>
        </dependency>
        <dependency>
            <groupId>org.dspace</groupId>
            <artifactId>dspace-api</artifactId>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <exclusions>
                <exclusion>
                    <artifactId>jmxtools</artifactId>
                    <groupId>com.sun.jdmk</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jms</artifactId>
                    <groupId>javax.jms</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jmxri</artifactId>
                    <groupId>com.sun.jmx</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.abdera</groupId>
            <artifactId>abdera-client</artifactId>
            <version>1.1.3</version>

            <exclusions>
                <exclusion>
                    <groupId>org.apache.ws.commons.axiom</groupId>
                    <artifactId>axiom-impl</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.ws.commons.axiom</groupId>
                    <artifactId>axiom-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.codehaus.woodstox</groupId>
                    <artifactId>wstx-asl</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

</project>
