<?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>
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.apache.sling</groupId>
        <artifactId>sling</artifactId>
        <version>1-incubator-SNAPSHOT</version>
    </parent>

    <artifactId>sling-sample</artifactId>
    <version>2.0.0-incubator-SNAPSHOT</version>
    <packaging>bundle</packaging>

    <name>Sling - Sample Sling Application</name>
    <description>
        This bundle provides a simple Sling Application to show some of the
        features and functionalities of Sling, such as node type definition,
        content mapping, running JSPs off the repository and the bundle.
    </description>

    <build>
        <plugins>
            <!-- Handle the @ocm JavaDoc tags to generate the mapping descriptors -->
            <plugin>
                <groupId>org.apache.sling</groupId>
                <artifactId>maven-jcrocm-plugin</artifactId>
            </plugin>
            <!-- Compile JSP scripts into the bundle -->
            <plugin>
                <groupId>org.apache.sling</groupId>
                <artifactId>maven-jspc-plugin</artifactId>
                <executions>
                    <execution>
                        <id>compile-jsp</id>
                        <goals>
                            <goal>jspc</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Installation and Deployment support -->
            <plugin>
                <groupId>org.apache.sling</groupId>
                <artifactId>maven-sling-plugin</artifactId>
            </plugin>
            <!-- Generation of SCR descriptors -->
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-scr-plugin</artifactId>
            </plugin>
            <!-- Bundling the sample project -->
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <!-- we have to export for the classes to be visible -->
                        <Export-Package>
                            org.apache.sling.sample
                        </Export-Package>
                        
                        <!-- node types to be created -->
                        <Sling-Nodetypes>
                            SLING-INF/nodetypes/test.cnd
                        </Sling-Nodetypes>
                        
                        <!-- initial content to be loaded on bundle installation -->
                        <Sling-Initial-Content>
                            SLING-INF/content
                        </Sling-Initial-Content>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>sling-component-api</artifactId>
            <version>2.0.0-incubator-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>sling-content-jcr</artifactId>
            <version>2.0.0-incubator-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>sling-core</artifactId>
            <version>2.0.0-incubator-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>sling-scripting-core</artifactId>
            <version>2.0.0-incubator-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>sling-scripting-jsp-taglib</artifactId>
            <version>2.0.0-incubator-SNAPSHOT</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>osgi_R4_core</artifactId>
        </dependency>
    </dependencies>
</project>
