<?xml version="1.0" encoding="UTF-8"?>
<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>10</version>
        <relativePath />
    </parent>

    <groupId>org.apache.sling</groupId>
    <artifactId>org.apache.sling.crankstart.core</artifactId>
    <packaging>jar</packaging>
    <version>1.0.0</version>

    <name>Apache Sling Crankstart Core</name>
    <inceptionYear>2014</inceptionYear>
    
    <description>
        A different way of starting Sling - core module
    </description>

    <scm>
      <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.crankstart.core-1.0.0</connection>
      <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.crankstart.core-1.0.0</developerConnection>
      <url>http://sling.apache.org/tags/org.apache.sling.crankstart.core-1.0.0</url>
    </scm>

    <properties>
        <pax.url.version>2.1.0</pax.url.version>
        <test.storage.base>${project.build.directory}</test.storage.base>
    </properties>
 
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <systemProperties>
                        <test.storage.base>${test.storage.base}</test.storage.base>
                    </systemProperties>
                </configuration>
            </plugin>
             <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>2.3</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <createDependencyReducedPom>false</createDependencyReducedPom>
                            <artifactSet>
                                <includes>
                                    <include>org.apache.felix:org.apache.felix.configadmin</include>
                                </includes>
                                <excludes>
                                    <exclude>org.osgi</exclude>
                                </excludes>
                            </artifactSet>
                            <filters>
                                <filter>
                                    <artifact>org.apache.felix:org.apache.felix.configadmin</artifact>
                                    <includes>
                                        <include>org/apache/felix/cm/file/Config*</include>
                                    </includes>
                                </filter>
                            </filters>
                            <relocations>
                                <relocation>
                                    <pattern>org.apache.felix.cm.file</pattern>
                                    <shadedPattern>org.apache.felix.SHADED.cm.file</shadedPattern>
                                </relocation>
                            </relocations>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
          </plugins>
    </build>   

    <dependencies>
       <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.compendium</artifactId>
            <version>4.2.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.framework</artifactId>
            <version>4.0.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.crankstart.api</artifactId>
            <version>1.0.0</version>
            <scope>provided</scope>
        </dependency>
        <!-- 
            We use a class from the config admin implementation to read config files,
            and we process it using maven-shade-plugin to avoid conflicts 
         -->
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.configadmin</artifactId>
            <version>1.2.8</version>
            <scope>compile</scope>
        </dependency>
         <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.6</version>
            <scope>provided</scope>
        </dependency>
         <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>1.7.6</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.url</groupId>
            <artifactId>pax-url-aether</artifactId>
            <version>${pax.url.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.url</groupId>
            <artifactId>pax-url-commons</artifactId>
            <version>${pax.url.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>
      </dependencies>
</project>
