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

    <!--
        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.apache.chemistry.opencmis</groupId>
        <artifactId>chemistry-opencmis</artifactId>
        <version>0.10.0</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <artifactId>chemistry-opencmis-server-jcr</artifactId>
    <name>OpenCMIS JCR Server Implementation</name>
    <packaging>war</packaging>

    <properties>
        <parentBasedir>../../</parentBasedir>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.3</version>
                <configuration>
                    <archive>
                        <!--
                            OSGi Bundle Support
                        -->
                        <manifestEntries>
                            <Bundle-Name>org.apache.chemistry.opencmis.server.jcr</Bundle-Name>
                            <Bundle-SymbolicName>org.apache.chemistry.opencmis.server.jcr</Bundle-SymbolicName>
                            <Bundle-Version>${project.version}</Bundle-Version>
                            <Import-Package>javax.servlet,javax.servlet.http,javax.servlet.resources</Import-Package>
                            <Bundle-Classpath>.</Bundle-Classpath>
                            <Web-ContextPath>cmis-jcr</Web-ContextPath>
                        </manifestEntries>
                    </archive>
                    <overlays>
                        <overlay>
                        </overlay>
                        <overlay>
                            <groupId>${project.groupId}</groupId>
                            <artifactId>chemistry-opencmis-server-bindings-war</artifactId>
                        </overlay>
                    </overlays>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>maven-jetty-plugin</artifactId>
                <version>6.1.23</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.surefire</groupId>
                        <artifactId>surefire-junit4</artifactId>
                        <version>2.14.1</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <includes>
                        <include>**/*Test.class</include>
                    </includes>
                  <systemProperties>
                      <org.apache.jackrabbit.repository.conf>${basedir}/src/test/resources/repository.xml</org.apache.jackrabbit.repository.conf>
                      <org.apache.jackrabbit.repository.home>${basedir}/target/jackrabbit-repo</org.apache.jackrabbit.repository.home>
                    </systemProperties> 
                </configuration>
            </plugin>            
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>chemistry-opencmis-commons-api</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>chemistry-opencmis-commons-impl</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>chemistry-opencmis-server-bindings-war</artifactId>
            <version>${project.version}</version>
            <type>war</type>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>chemistry-opencmis-server-support</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
            <version>3.2.1</version>
        </dependency>
        <dependency>
            <groupId>org.antlr</groupId>
            <artifactId>antlr-runtime</artifactId>            
            <version>3.2</version>
        </dependency>

        <dependency>
            <groupId>javax.jcr</groupId>
            <artifactId>jcr</artifactId>
            <version>2.0</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
        <groupId>org.apache.jackrabbit</groupId>
        <artifactId>jackrabbit-core</artifactId>
        <version>2.5.1</version>
        <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>develop</id>
            <!-- This profile includes an collocated Apache Jackrabbit JCR repository into
                 the web applications making it self contained. -->
            <dependencies>
                <dependency>
                    <groupId>javax.jcr</groupId>
                    <artifactId>jcr</artifactId>
                    <version>2.0</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.jackrabbit</groupId>
                    <artifactId>jackrabbit-core</artifactId>
                    <version>2.2.1</version>
                </dependency>
                <dependency>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                    <version>${slf4j.version}</version>
                </dependency>
                <dependency>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                    <version>${log4j.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.chemistry.opencmis</groupId>
                    <artifactId>chemistry-opencmis-server-bindings</artifactId>
                    <version>${project.version}</version>
                </dependency>
            </dependencies>
        </profile>
    </profiles>

</project>
