<?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 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</groupId>
        <artifactId>apache</artifactId>
        <version>6</version>
    </parent>

    <groupId>org.apache.sling</groupId>
    <artifactId>sling</artifactId>
    <packaging>pom</packaging>
    <version>7</version>

    <name>Apache Sling (Parent)</name>
    <description>The parent project for Apache Sling</description>
    <inceptionYear>2007</inceptionYear>

    <url>http://sling.apache.org</url>

    <prerequisites>
        <maven>2.0.7</maven>
    </prerequisites>


    <issueManagement>
        <system>Jira</system>
        <url>http://issues.apache.org/jira/browse/SLING</url>
    </issueManagement>


    <properties>
        <site.jira.version.id>12313945</site.jira.version.id>
        <site.javadoc.exclude />
        <organization.logo>http://sling.apache.org/site/media.data/logo.png</organization.logo>
    </properties>
    

    <scm>
        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/sling-7</connection>
        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/sling-7</developerConnection>
        <url>http://svn.apache.org/viewvc/sling/tags/sling-7</url>
    </scm>


    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.6</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>javadoc</report>
                        </reports>
                    </reportSet>
                </reportSets>
                <configuration>
                    <stylesheet>maven</stylesheet>
                    <excludePackageNames>*.impl:*.internal:${site.javadoc.exclude}</excludePackageNames>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-report-plugin</artifactId>
                <version>2.4.3</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-changes-plugin</artifactId>
                <version>2.1</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>jira-report</report>
                        </reports>
                    </reportSet>
                </reportSets>
                <configuration>
                    <fixVersionIds>${site.jira.version.id}</fixVersionIds>
                </configuration>
            </plugin>
        </plugins>
    </reporting>


    <build>
        <plugins>

            <!-- Require Java 5 or higher for building -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>1.0-beta-1</version>
                <executions>
                    <execution>
                        <id>enforce-java</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireJavaVersion>
                                    <message>
                                        Apache Sling must be compiled with Java
                                        5 or higher
                                    </message>
                                    <version>1.5.0</version>
                                </requireJavaVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- Attach sources for all builds -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <inherited>true</inherited>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- warn for SLING-443 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>process-resources</phase>
                        <configuration>
                            <tasks>
                                <echo>
********************** WARNING (SLING-443) **********************************
On most platforms, building Apache Sling currently requires setting 
MAVEN_OPTS="-Xmx256M", see https://issues.apache.org/jira/browse/SLING-443
You might get a "java.lang.OutOfMemoryError: Java heap space" if that
setting is not correct.
*****************************************************************************
                                </echo>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>ianal-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>verify-legal-files</goal>
                        </goals>
                        <configuration>
                            <!-- Fail the build if any artifacts are missing legal files -->
                            <strict>true</strict>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.sling</groupId>
                    <artifactId>maven-sling-plugin</artifactId>
                    <version>2.0.4-incubator</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.sling</groupId>
                    <artifactId>maven-jspc-plugin</artifactId>
                    <version>2.0.4-incubator</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.sling</groupId>
                    <artifactId>maven-jcrocm-plugin</artifactId>
                    <version>2.0.4-incubator</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-scr-plugin</artifactId>
                    <version>1.4.0</version>
                    <executions>
                        <execution>
                            <id>generate-scr-scrdescriptor</id>
                            <goals>
                                <goal>scr</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <!-- Compile for Java 5 and higher -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <source>1.5</source>
                        <target>1.5</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>2.0.1</version>
                    <inherited>true</inherited>
                    <configuration>
                        <instructions>
                            <Bundle-Category>sling</Bundle-Category>
                            <Bundle-DocURL>
                                http://sling.apache.org
                            </Bundle-DocURL>
                            <Bundle-Vendor>The Apache Software Foundation</Bundle-Vendor>
                            <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
                            <_versionpolicy>$${version;===;${@}}</_versionpolicy>
                        </instructions>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <configuration>
                        <tagBase>
                            https://svn.apache.org/repos/asf/sling/tags
                        </tagBase>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>2.2-beta-4</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>2.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>2.1-beta-1</version>
                </plugin>
                <plugin>
                    <groupId>org.mortbay.jetty</groupId>
                    <artifactId>maven-jetty-plugin</artifactId>
                    <version>6.1.20</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.cargo</groupId>
                    <artifactId>cargo-maven2-plugin</artifactId>
                    <version>1.0</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>ianal-maven-plugin</artifactId>
                    <version>1.0-alpha-1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.rat</groupId>
                    <artifactId>apache-rat-plugin</artifactId>
                    <version>0.6</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <!--
                Use this profile to install the OSGi bundle
                automatically, during development
            -->
            <id>autoInstallBundle</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.sling</groupId>
                        <artifactId>maven-sling-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>install-bundle</id>
                                <goals>
                                    <goal>install</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <!-- add assembly build to the generic release profile -->
            <id>apache-release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <configuration>
                            <descriptorRefs>
                                <descriptorRef>project</descriptorRef>
                            </descriptorRefs>
                        </configuration>
                        <executions>
                            <execution>
                                <id>make-assembly</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>attached</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
	    <!--
	    We should execute this profile manually to make sure that all files in our source code contain proper licenses.
	    This is very important and should not be skipped in any scenario.  It is very importnt for us to follow ASF policy.
	    Example:  mvn -P prepare-release install
	    -->    
        <profile>
            <id>rat</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.rat</groupId>
                        <artifactId>apache-rat-plugin</artifactId>
                        <configuration>
                            <excludes>
                                <!--  Used by maven-remote-resources-plugin -->
                                <exclude>src/main/appended-resources/META-INF/*</exclude>
                                <!--  Generated by maven-remote-resources-plugin -->
                                <exclude>velocity.log</exclude>
                                <!-- don't check anything in target -->
                                <exclude>target/*</exclude>
                            </excludes>
                        </configuration>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <mailingLists>
        <mailingList>
            <name>Apache Sling Development List</name>
            <subscribe>
                dev-subscribe@sling.apache.org
            </subscribe>
            <unsubscribe>
                dev-unsubscribe@sling.apache.org
            </unsubscribe>
            <post>dev at sling.apache.org</post>
            <archive>
                http://mail-archives.apache.org/mod_mbox/sling-dev/
            </archive>
            <otherArchives>
                <otherArchive>
                    http://sling-dev.markmail.org/
                </otherArchive>
                <otherArchive>
                    http://www.mail-archive.com/dev@sling.apache.org/
                </otherArchive>
            </otherArchives>
        </mailingList>
        <mailingList>
            <name>Apache Sling Source Control List</name>
            <subscribe>
                commits-subscribe@sling.apache.org
            </subscribe>
            <unsubscribe>
                commits-unsubscribe@sling.apache.org
            </unsubscribe>
            <archive>
                http://mail-archives.apache.org/mod_mbox/sling-commits/
            </archive>
            <otherArchives>
                <otherArchive>
                    http://sling-commits.markmail.org/
                </otherArchive>
                <otherArchive>
                    http://www.mail-archive.com/commits@sling.apache.org/
                </otherArchive>
            </otherArchives>
        </mailingList>
    </mailingLists>

    <!-- Please visit our website for the current information about the 
         Apache Sling project team. (see #SLING-1120 why we don't include
         the list here) -->
    <developers>
        <developer>
            <name>Apache Sling Project</name>
            <id>sling</id>
            <url>http://sling.apache.org/site/project-team.html</url>
        </developer>
    </developers>

    <dependencyManagement>

        <!-- OSGi Core and Compendium API -->
        <dependencies>
            <dependency>
                <groupId>org.osgi</groupId>
                <artifactId>org.osgi.core</artifactId>
                <version>4.1.0</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.osgi</groupId>
                <artifactId>org.osgi.compendium</artifactId>
                <version>4.1.0</version>
                <scope>provided</scope>
            </dependency>

            <!-- Web Application API -->
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>servlet-api</artifactId>
                <version>2.4</version>
                <scope>provided</scope>
            </dependency>

            <!-- JCR API -->
            <dependency>
                <groupId>javax.jcr</groupId>
                <artifactId>jcr</artifactId>
                <version>1.0</version>
                <scope>provided</scope>
            </dependency>

            <!-- Basic Logging -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>1.5.2</version>
                <scope>provided</scope>
            </dependency>

            <!-- Basic dependencies for Unit Tests -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.3</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.jmock</groupId>
                <artifactId>jmock-junit4</artifactId>
                <version>2.2.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-simple</artifactId>
                <version>1.5.2</version>
                <scope>test</scope>
            </dependency>


        </dependencies>
    </dependencyManagement>

    <distributionManagement>
        <site>
            <id>apache.sling.site</id>
            <url>
                scp://people.apache.org/www/sling.apache.org/generated
            </url>
        </site>
    </distributionManagement>
</project>
