Setting up

To use Slice in your project, you have to perform a simple setup.

Maven configuration

Dependencies

Include the following Maven dependencies into your project:

<dependency>
    <groupId>com.cognifide.slice</groupId>
    <artifactId>slice-core-api</artifactId>
    <version>3.0.0</version>
</dependency>
<dependency>
    <groupId>com.cognifide.slice</groupId>
    <artifactId>slice-core</artifactId>
    <version>3.0.0</version>
</dependency>
<dependency>
    <groupId>com.cognifide.slice</groupId>
    <artifactId>slice-mapper</artifactId>
    <version>3.0.0</version>
</dependency>
<dependency>
    <groupId>com.cognifide.slice</groupId>
    <artifactId>slice-mapper-api</artifactId>
    <version>3.0.0</version>
</dependency>
<dependency>
    <groupId>com.cognifide.slice</groupId>
    <artifactId>slice-cq</artifactId>
    <version>3.0.0</version>
</dependency>
<dependency>
    <groupId>com.cognifide.slice</groupId>
    <artifactId>slice-cq-taglib</artifactId>
    <version>3.0.0</version>
</dependency>
<dependency>
    <groupId>com.cognifide.slice</groupId>
    <artifactId>slice-validation-api</artifactId>
    <version>3.0.0</version>
</dependency>
<dependency>
    <groupId>com.cognifide.slice</groupId>
    <artifactId>slice-validation</artifactId>
    <version>3.0.0</version>
</dependency>

Depending on your project you might want to set the scope of the dependencies to provided.

Repositories

Slice is deployed to Maven central repository which means you don't have to specify any repositories to fetch id. However, you might want to add the following repositories to fetch CQ dependencies or other OSGi bundles.

<repositories>
    <repository>
        <id>adobe-public-releases</id>
        <name>Adobe Public Repository</name>
        <url>http://repo.adobe.com/nexus/content/groups/public</url>
        <releases>
            <enabled>true</enabled>
            <updatePolicy>never</updatePolicy>
        </releases>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
    <repository>
        <id>com.springsource.repository.bundles.external</id>
        <name>SpringSource Enterprise Bundle Repository - SpringSource Bundle Releases</name>
        <url>http://repository.springsource.com/maven/bundles/external/</url>
    </repository>
</repositories>

Prepare activator

The information on how to write a correct activator is enclosed in this page: Writing activator