Getting and Building Sling has been edited by Felix Meschberger (Jun 24, 2008).

Change summary:

Add configuration information for the incubator repository

(View changes)

Content:

Getting and Building Sling

A short recount on the first step for getting a running Sling instance after checking out the source from the SVN repository

Prerequisites

Before you begin, you should have installed the following tools on your system:

  • Java 5 or higher
  • Maven 2.0.7 (or later)

Configuring Maven

Many of the Sling modules have been released into the Apache Incubator Maven 2 repository. This repository is not visible by default to Maven 2. To enable its use, it is easiest if you configure it into your local maven settings found in $HOME/.m2/settings.xml by default:

<?xml version="1.0"?>
<settings>
  <profiles>
    <profile>
      <id>apache-incubation</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <repositories>
        <repository>
          <id>apache.incubating</id>
          <name>Apache Incubating Repository</name>
          <url>http://people.apache.org/repo/m2-incubating-repository</url>
        </repository>
      </repositories>
    </profile>
  </profiles>
</settings>


Getting a Running Instance

  1. Checkout Sling from the Repository
    $ svn checkout http://svn.apache.org/repos/asf/incubator/sling/trunk sling
    
  2. Enter the directory and do a full build and local install
    $ cd sling
    $ mvn clean install
    
  3. Enter the launchpad/app directory and launch Sling for the first time
    $ cd launchpad/app
    $ java -jar target/org.apache.sling.launchpad.app-2.0.0-incubator-SNAPSHOT.jar -c sling -f -
    

    Messages should now be printed to the console which is used as the "log file" because the -f command line option is set to - indicating to use standard output as the log file. The -c sling command line option instructs Sling to use the sling directory in the current directory for its data store, which is the Apache Felix bundle archive, the Jackrabbit repository data and configuration. You may also specify another directory here, either a relative or absolute path name (See also Configuration for more information).
    After all messages have been printed you should now be able to contact the Sling Management Console by pointing your web browser at http://localhost:8080/system/console. You will be prompted for a user name and password. Enter admin as both the user name and the passwort (this may be set on Configuration page later). From this console, you may manage the installed bundles, modify configuration objects, dump a configuration status and get some system information.
    To stop Sling, just hit Ctrl-C at the console or click the Stop button on the System Information page of the Sling Management Console.

Congratulations ! You should now have a running Sling instance, which you may start playing around with.

Reply via email to