<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
  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">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.apache.sling</groupId>
        <artifactId>sling</artifactId>
        <version>1-incubator-SNAPSHOT</version>
        <relativePath>../parent/pom.xml</relativePath>
    </parent>

    <artifactId>sling-app</artifactId>
    <packaging>jar</packaging>
    <version>2.0.0-incubator-SNAPSHOT</version>

    <name>Sling - Standalone Application</name>
    <description>
        Standalone Application comprising base bundles and installing
        Sling required bundles on demand
    </description>

    <scm>
        <connection>
            scm:svn:http://svn.apache.org/repos/asf/incubator/sling/trunk/sling-app
        </connection>
        <developerConnection>
            scm:svn:https://svn.apache.org/repos/asf/incubator/sling/trunk/sling-app
        </developerConnection>
        <url>
            http://svn.apache.org/viewvc/incubator/sling/trunk/sling-app
        </url>
    </scm>

    <build>
        <plugins>
            <!-- Bundles to list in the installer properties file -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.0-alpha-4</version>
                <executions>
                    <execution>
                        <id>copy-core-bundles</id>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <includeArtifactIds>
                                sling-log
                            </includeArtifactIds>
                            <excludeTransitive>true</excludeTransitive>
                            <outputDirectory>
                                ${project.build.outputDirectory}/resources/corebundles
                            </outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-base-bundles</id>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <excludeArtifactIds>
                                org.apache.felix.framework,org.osgi.core,org.osgi.compendium,sling-log
                            </excludeArtifactIds>
                            <excludeTransitive>true</excludeTransitive>
                            <outputDirectory>
                                ${project.build.outputDirectory}/resources/bundles
                            </outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>inline-framework-bundles</id>
                        <goals>
                            <goal>unpack-dependencies</goal>
                        </goals>
                        <configuration>
                            <includeArtifactIds>
                                org.apache.felix.framework,org.osgi.core,org.osgi.compendium
                            </includeArtifactIds>
                            <excludeTransitive>true</excludeTransitive>
                            <outputDirectory>
                                ${project.build.outputDirectory}
                            </outputDirectory>
                            <excludes>META-INF/**</excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <mainClass>
                                org.apache.sling.launcher.main.Main
                            </mainClass>
                            <addDefaultImplementationEntries>
                                true
                            </addDefaultImplementationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <!--
            Core Felix Archives bundled with the WebApp, making up the
            WebApp Classpath. These can only be updated by updating the
            WebApp.
            
            These dependencies are marked as provided because they should
            not be inherited transitively as the sling-app library contains
            them.
        -->

        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.osgi.core</artifactId>
            <version>1.0.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.osgi.compendium</artifactId>
            <version>0.9.0-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>

        <!--
            Depend on current Felix Framework snapshot due to a bug
            in synchronous shutdown, which prevents Sling from shutting
            controllably.
        -->
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.framework</artifactId>
            <version>1.1.0-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>sling-log</artifactId>
            <version>2.0.0-incubator-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.bundlerepository</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>sling-assembly</artifactId>
            <version>2.0.0-incubator-SNAPSHOT</version>
        </dependency>

        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.eventadmin</artifactId>
            <version>0.9.0-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.scr</artifactId>
            <version>0.9.0-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.configadmin</artifactId>
            <version>0.9.0-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.metatype</artifactId>
            <version>0.9.0-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.http.jetty</artifactId>
            <version>0.9.0-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.apache.felix.commons</groupId>
            <artifactId>
                org.apache.felix.commons.servlet-api
            </artifactId>
            <version>2.4.0-0002-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>sling-console-web</artifactId>
            <version>2.0.0-incubator-SNAPSHOT</version>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>dist</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <version>2.2-beta-1</version>
                        <executions>
                            <execution>
                                <id>assemble-distribution</id>
                                <configuration>
                                    <descriptors>
                                        <descriptor>
                                            assembly.xml
                                        </descriptor>
                                    </descriptors>
                                    <appendAssemblyId>
                                        false
                                    </appendAssemblyId>
                                </configuration>
                                <phase>package</phase>
                                <goals>
                                    <goal>attached</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        
        <!--
            The "full" profile also includes all Sling bundles plus
            the dependencies of Sling from the Apache Felix Commons
            subproject. 
        -->
        <profile>
            <id>full</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <configuration>
                            <classifier>full</classifier>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
            <dependencies>
                <!--
                    Commons Dependencies provided by the Apache Felix project
                -->
                <dependency>
                    <groupId>org.apache.felix.commons</groupId>
                    <artifactId>
                        org.apache.felix.commons.commons-io
                    </artifactId>
                    <version>1.3.2-0002-SNAPSHOT</version>
                </dependency>

                <dependency>
                    <groupId>org.apache.felix.commons</groupId>
                    <artifactId>
                        org.apache.felix.commons.commons-fileupload
                    </artifactId>
                    <version>1.1.1-0001-SNAPSHOT</version>
                </dependency>

                <dependency>
                    <groupId>org.apache.felix.commons</groupId>
                    <artifactId>
                        org.apache.felix.commons.commons-collections
                    </artifactId>
                    <version>3.2.0-0001-SNAPSHOT</version>
                </dependency>

                <dependency>
                    <groupId>org.apache.felix.commons</groupId>
                    <artifactId>
                        org.apache.felix.commons.commons-beanutils
                    </artifactId>
                    <version>1.7.0-0001-SNAPSHOT</version>
                </dependency>

                <dependency>
                    <groupId>org.apache.felix.commons</groupId>
                    <artifactId>
                        org.apache.felix.commons.commons-codec
                    </artifactId>
                    <version>1.3.0-0001-SNAPSHOT</version>
                </dependency>

                <dependency>
                    <groupId>org.apache.felix.commons</groupId>
                    <artifactId>
                        org.apache.felix.commons.jsp-api
                    </artifactId>
                    <version>2.0.0-0001-SNAPSHOT</version>
                </dependency>

                <dependency>
                    <groupId>org.apache.felix.commons</groupId>
                    <artifactId>
                        org.apache.felix.commons.commons-el
                    </artifactId>
                    <version>1.0.0-0001-SNAPSHOT</version>
                </dependency>

                <dependency>
                    <groupId>org.apache.felix.commons</groupId>
                    <artifactId>
                        org.apache.felix.commons.cglib-full
                    </artifactId>
                    <version>2.0.2-0001-SNAPSHOT</version>
                </dependency>

                <!--
                    Finally all the Sling bundles not yet included in the
                    base sling-app
                -->
                <dependency>
                    <groupId>org.apache.sling</groupId>
                    <artifactId>sling-jasper-sling</artifactId>
                    <version>2.0.0-incubator-SNAPSHOT</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.sling</groupId>
                    <artifactId>sling-mime</artifactId>
                    <version>2.0.0-incubator-SNAPSHOT</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.sling</groupId>
                    <artifactId>sling-jackrabbit-api</artifactId>
                    <version>2.0.0-incubator-SNAPSHOT</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.sling</groupId>
                    <artifactId>sling-jackrabbit-server</artifactId>
                    <version>2.0.0-incubator-SNAPSHOT</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.sling</groupId>
                    <artifactId>
                        sling-jackrabbit-classloader
                    </artifactId>
                    <version>2.0.0-incubator-SNAPSHOT</version>
                </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</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>
                </dependency>
            </dependencies>
        </profile>
    </profiles>
</project>

